Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Current price on strategy builder

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

    Current price on strategy builder

    Hi everyone,
    I couldn't manage to set the current price (last traded) as a condition to build a strategy.
    Is it actually possible to do it?
    Price line hasn't plot, can't choose to set 'on each tick' on a sma 1.
    Thanks for reading

    #2
    Hello cusacco,
    You can use Close[0] & define your conditions, this is the Last Traded Price. Hope it helps!

    Comment


      #3
      Hello s.kinra, thanks for your interest.
      I've tried that but it isn't what im looking for, as it is the last price of a bar. I would need price on each tick to be taken into consideration.

      Comment


        #4
        Hello cusacco,
        Be sure to use
        Code:
        Calculate = Calculate.OnEachTick;
        so Close[0] will be updated with every tick.

        Comment


          #5
          Hello cusacco,

          Thanks for your post and welcome to the NinjaTrader forums!

          As forum member s.kinra has advised you could change the strategy calculate Mode to Calculate.OnEachTick or Calculate.OnPriceChange and in these modes it shifts the current bar from the "just closed bar' to the "current forming bar" The Close of the currently forming bar is the latest price as the bar has not closed.

          Alternately, if you want to stay with Calculate.OnBarClose, you could use Misc>ask or Misc>bid. Please see the help guide here on the getCurrentAsk() and GetCurrentBid() methods for important information:

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          53 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          70 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X