Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Approaching Crossover

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

    Approaching Crossover

    Is there any way to determine when moving averages are approaching eachother. So bar[0] would identify that the two lines are approaching each other, but have not yet crossed.

    #2
    Hello digitaldaze,

    Thanks for your 1st post in the NinjaTrader forums!

    You can track the math difference between the moving averages.

    An example of this would be the MACD indicator which includes a "Diff" plot that shows the difference between the 12 and 26 period moving averages.

    You could create a custom series that would allow you to store the difference between the 2 moving averages and you can then check to see if the difference value is approaching zero.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply and for your welcome. More questions....

      1) When I create a series how do I populate it with the strategy builder? I must be missing it somewhere.
      2) If I read the Slope() description properly, i can determine that if the slope is > 1, then it is escalating at 45 degrees or more. If I check for Slope of an EMA line > .5, can I assume we are checking for ~ 22.5 degree escalation? Reverse direction in the negative -.5, -.25, -1, etc?

      Comment


        #4
        Hello digitaldaze,

        Thanks for your reply.

        I've created a short video to help with populating a custom series as well as how to use the Print statement so that you can see values being calculated: https://paul-ninjatrader.tinytake.co...MF8xMzc5NTY1OA

        For the slope I would recommend printing out the values you are determining as a first step.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        1 view
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,770 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        944 views
        0 likes
        Last Post spwizard  
        Started by Max238, Today, 01:28 AM
        0 responses
        11 views
        0 likes
        Last Post Max238
        by Max238
         
        Working...
        X