Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to detect the abrupt direction changes of an indicator?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to detect the abrupt direction changes of an indicator?

    Hi,

    I am using the VWMA indicator. I would like to detect abrupt parabolic changes of direction like this one:


    Click image for larger version

Name:	direction_change.png
Views:	130
Size:	2.6 KB
ID:	1222232

    The entry would be trigger at the red arrow. So let's say that the green line was 5 bars before the red arrow.. I thought of verifying:
    Close[0] < Close[5]
    Close[1] < Close[4]
    Close[2] < Close[3]

    But that looks a bit sketchy. Is there a better solution?


    Attached Files

    #2
    Hello Vincere,

    This thread will remain open for any community members that would like to provide you custom logic.

    For any logic you come up with, I am happy to assist with writing this as C#.

    Try and state the rules you are looking for.

    For example are you looking for the current price to be 5 ticks lower than the current bars high and the previous bars high to be 10 ticks greater than the previous bar's low?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Vincere,

      You might want to consider Slope or Linear Regression Slope functions.
      Slope: https://ninjatrader.com/support/help...html?slope.htm
      Linear Regression Slope: https://ninjatrader.com/support/help...sion_slope.htm

      For example, to find an exponential/geometric increasing slope, I believe this pseudo logic will help get you there:

      Math.Abs(Slope(VWAP, 1, 2)) > Math.Abs(Slope(VWAP,1,3)) > Math.Abs(Slope(VWAP,1,4))...
      That is, as you go back in time (previous bars) the slope of the indicator (VWAP) will be less and less if it is in the parabolic shape.

      Further, you can verify that the highest point was in the middle (or near the middle) of your look back period by using the Highest function.


      Hope that helps!
      Matt

      Comment


        #4
        Hi StealthM93,

        Thanks, that makes more sense than my approach!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        90 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        137 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        68 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        120 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        71 views
        0 likes
        Last Post PaulMohn  
        Working...
        X