Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to Configure Look Back Period Condition

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

    How to Configure Look Back Period Condition

    Hi, need help to configure a condition in strategy builder. I want to enter long, for example, when MACD crosses above zero line on the current bar and a doji bar has formed within a range of 10 bars. Any advice would be highly appreciated. Thanks!

    #2
    Hello timwey,

    For the crossover condition you can use the standard crossabove or crossbelow operator for that. For the doji condition you would have to configure the individual price conditions that make up the dogji bar in your set. Alternatively you could use an indicator that produces a signal for doji bars with the builder as well.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thank you for your quick response Jesse, in other words, it is not possible to look back within a range of bars for the formation of doji bar using an indicator?

      Comment


        #4
        Hello timwey,

        To make a variable range would require manual coding, you can look up a fixed range like 10 bars in the builder. You would have to make individual price conditions to do that. For example if you wanted to check if there was a doji on the current bar you would make your price conditions using 0 bars ago. If you then also wanted to check on the previous bar you would make additional conditions for that as well using 1 bars ago. Using groups would be the best way to do that if you need to check if any one of X number of conditions had become true, for example if any one of your conditions that are looking at 0 to 10 bars ago becomes true.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Jesse, I will try it out, thanks for your advice, much appreciated.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by birdog, Yesterday, 06:25 AM
          5 responses
          29 views
          0 likes
          Last Post birdog
          by birdog
           
          Started by jeb1000, Yesterday, 02:36 PM
          5 responses
          11 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by owen5819, Today, 09:48 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by owen5819, Today, 09:35 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by gyilaoliver, Today, 07:25 AM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X