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

Indicator change direction -> how to build in Strategy Builder

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

    Indicator change direction -> how to build in Strategy Builder

    Hello People,

    I have a very simple question: How can I tell the Strategy Builder, I want to go Long when an Indicator (for example SMA) change the direction it´s going? So the SMA ran down for a time and then now it begins to move up. I want to place an order at this point

    Thanks!

    #2
    Hello Chris_GRM,

    Thank you for your note.

    The simplest way would be to use Rising and Falling under the Misc folder in the Conditions and Actions screen. You can select an SMA as the input series for Rising or Falling, and if that equals true, then submit an entry or exit depending on which it is doing.

    I've attached a very simple example strategy that enters once a 14 period SMA is rising and exits when the SMA starts to fall.

    Please let us know if we may be of further assistance to you.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate,

      thank you for your reply and the example.This is what I was looking for, unfortunately I have one more question. I want to add, that the SMA needed to fall for, for example, 2 candlesticks and only if it rises than I want to Enter Long. So what must be added in the conditions section?

      Thanks

      best regards,
      Christian

      Comment


        #4
        Hello Chris_GRM,

        Thank you for your reply.

        Rising and Falling can only be evaluated on the current bar, they just check to see if the indicator value on the current bar is greater or less than on the previous bar. If you're wanting to assess this over several bars, you can simply compare the values of the SMA for the bars prior and check that they were decreasing or increasing over the last x number of bars. Here's a simple example that is a modified version of the above example. We enter long if the SMA decreased between the bar 3 bars ago and the bar 2 bar ago, continued to decrease between the bar 2 bars ago and 1 bar ago, and is currently rising. We then exit when the opposite is true.

        Please let us know if we may be of further assistance to you.
        Attached Files
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,281 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Working...
        X