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 argusthome, Yesterday, 10:06 AM
          0 responses
          20 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          18 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          14 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          9 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          40 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X