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:	121
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 NullPointStrategies, Today, 05:17 AM
        0 responses
        44 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        65 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        42 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X