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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          88 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          134 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          68 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          118 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          67 views
          0 likes
          Last Post PaulMohn  
          Working...
          X