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 7 months ago.

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

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

     

    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: 67
    • Posts: 70

    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: 2
    • Replies: 1
    • Posts: 3

     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: 67
    • Posts: 70

    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

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close