Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars ago in Condition builder

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

    Bars ago in Condition builder

    I'm new to NT and I've tried to use the Bars ago feature in condition builder of the Stategy wizard (applied on tutorial 1), but unfortunately this parameter has no effect on the generated code. Can anyone tell me how to solve this problem ?

    #2
    Master, welcome to the forums! Which condition did you try to model using the wizard and where / how would you expect the 'barsAgo' parameter to change the generated code?

    This just refers to how many bars back you want a value ( price, indicator ) to be accessed - http://www.ninjatrader-support.com/H...mparisons.html

    Comment


      #3
      Bertrand, thanks for your reply. With some indicators, when I fill the Bars ago parameter the indicator translates into "indicator[Bars ago]", but with other indicators (like the SMA in the tutorial1 of the NThelp file) it translates only into "indicator" and the Bars ago parameter is skipped.

      Comment


        #4
        Master, sorry not fully following, please see my shot, the yellow marked part is the barsAgo parameter as set from the wizard / condition builder. Perhaps you can clarify what you expect vs what you see? Thanks
        Attached Files

        Comment


          #5
          Bertrand, please find these 2 screenshots : the 8 bars ago indicated in the condition builder are not taken into account in the generated script, wich remain unchanged.
          Attached Files

          Comment


            #6
            Thanks Master, this is expected, first one has to be a data series input for CrossAbove / Below so you can't specifiy a barsAgo parameter, for the second one (right hand side) you could enter one.

            Comment


              #7
              Many thanks for your reply, Bertrand.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              558 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              324 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              545 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              547 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X