Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last price? Newbie needs help

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

    Last price? Newbie needs help

    I am new to Ninjatrader and have limited progamming knowledge.

    I am building an automated strategy using Condition Builder. I cant find a field for last price? How do I build a condition where last price < low of two bars ago?
    ie lastprice < Low[1]

    thanks

    #2
    Hi Trade_Cents,

    The first step you want to do is to turn off Calculate on Bar Close on the first page of the Wizard.

    The condition statement would be Close[0] < Low[1].

    The reason that we turn off Calculate on Bar Close is that so each time the price changes it is calculated right then and not when the bar closes for that time period.

    I have provided a link below that will explain the Calculate on Bar Close
    http://www.ninjatrader.com/support/h...onbarclose.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hi Trade_Cents,

      The first step you want to do is to turn off Calculate on Bar Close on the first page of the Wizard.

      The condition statement would be Close[0] < Low[1].

      The reason that we turn off Calculate on Bar Close is that so each time the price changes it is calculated right then and not when the bar closes for that time period.

      I have provided a link below that will explain the Calculate on Bar Close


      Let me know if I can be of further assistance.
      So in above example Low[1] would be the low of the most recent closed bar? Low[2] would be the low of second most recent closed bar, etc?

      Comment


        #4
        Trade_Cents,

        Correct. The number represents how far back the BarsAgo should look when calculating.

        With Calculate on Bar Close set to False the 0 is the current bar that is forming. 1 would be the bar to the left and 2 would be the second bar to the left, and so on.

        The link below will explain the BarsAgo and they work

        http://www.ninjatrader.com/support/f...ad.php?t=19346
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Cal View Post
          Trade_Cents,

          Correct. The number represents how far back the BarsAgo should look when calculating.

          With Calculate on Bar Close set to False the 0 is the current bar that is forming. 1 would be the bar to the left and 2 would be the second bar to the left, and so on.

          The link below will explain the BarsAgo and they work

          http://www.ninjatrader.com/support/f...ad.php?t=19346
          NinjaTrader_Cal,
          thank you for your help!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          67 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          149 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          99 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          286 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X