Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:

          Paul H.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Mestor, 03-10-2023, 01:50 AM
          16 responses
          388 views
          0 likes
          Last Post z.franck  
          Started by rtwave, 04-12-2024, 09:30 AM
          4 responses
          31 views
          0 likes
          Last Post rtwave
          by rtwave
           
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          29 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          22 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          7 views
          0 likes
          Last Post funk10101  
          Working...
          X