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:	124
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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        77 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X