Regime Change Indicator

Optuma Forums Optuma Scripting Regime Change Indicator

This topic contains 3 replies, has 2 voices, and was last updated by Matthew Matthew 4 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44563

    Michael
    • Topics: 1
    • Replies: 1
    • Posts: 2

     

    There is an indicator described at this this web site that appears to be useful for analyzing the trendiness of the price action.
    http://systemtradersuccess.com/using-self-similarity-metric-intraday-data-define-market-regimes/

    I tried programming it and came up with this

    Y = ACC( truerange, 10) / (HIGHESTHIGH(BARS=10) – LOWESTLOW(BARS=10));
    STD(Day(PERIODAMOUNT=1), y, TYPE=Percentage)

    I don’t think this is correct. The problem is in the second line, I am trying to find the percentile rank of the current value in the formula relative to the past year. Is there a function that finds the percentile rank?

    Thank you, Mike

    #44571
    Matthew
    Matthew
    • Topics: 3
    • Replies: 13
    • Posts: 16

    Hi Mike,

    Thank you for your post.

    I’ve had a look at the link you listed, and the rules on that page to see if i can build a corresponding script.  Please try the following and see how you go:

    V1 = HIGH() – LOW() ;
    V2 = ACC(V1, RANGE=Look Back Period, BARS=10) ;
    V3 = HIGHESTHIGH(BARS=10) – LOWESTLOW(BARS=10) ;
    V4 = V2 / V3 ;
    V5 = MA(V4, BARS=60, CALC=Close) ;
    Z=(V5-MA(V5, BARS=252))/STD(V5, BARS=252);
    Exp(-1*(z*z)/2) / Sqrt(2* 3.141592 )

     

    #44583

    Michael
    • Topics: 1
    • Replies: 1
    • Posts: 2

     Thank you. Are the last two lines the standard code for a z-score?

     

    Z=(V5-MA(V5, BARS=252))/STD(V5, BARS=252);
    Exp(-1*(z*z)/2) / Sqrt(2* 3.141592 )

    #44587
    Matthew
    Matthew
    • Topics: 3
    • Replies: 13
    • Posts: 16

    Hi Michael,

    That’s correct.  We don’t have a function which does the calculation automatically so that was the manual breakdown of the calc.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This