Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Current Price at which an instrument is trading

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

    Current Price at which an instrument is trading

    Hi,

    Greetings !

    I have seen GetCurrentBid() and GetCurrentAsk(). What I would like is the Price for the current TICK (most recent). Thank you.

    Anthony

    #2
    If you are using Calculate.OnPriceChange or Calulate.OnEachTick,
    just use Close[0]

    Comment


      #3
      Hello Anthony_0709,

      Thanks for your post.

      As forum member bltdavid advised, changing to the calculate mode of the strategy to Calculate.OnEachTick or Calculate.OnPriceChange will provide the current price. In Calculate.OnBarClose your strategy would execute once per bar and the bar index of [0] would point to the just-closed bar and the bar that is forming is unknown to the strategy. Note that using the other two modes changes the indexing so [0] would now point to the currently forming bar and [1] would point to the just-closed bar. Close[0] would be the current right edge price of the currently forming bar.
      Reference: https://ninjatrader.com/support/help...?calculate.htm

      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