Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Needing to get Close[0] or actuall current price in Indicator OnOrderUpdate

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

    Needing to get Close[0] or actuall current price in Indicator OnOrderUpdate

    Hola,

    I need to get the current (at the moment) price ... Last price or Close[ ] inside OnOrderUpdate (Indicator)

    the price I'm getting with Close[0] is nowhere near the current price...

    is there anything like GetCurrentBid/Ask ??

    ???

    #2
    Hi llanqui, thanks for posting. OnOrderUpdate is a non-data-driven event, so you will need to use TriggerCustomEvent inside of OnOrderUpdate to access the latest Close[0] value. I also have a full example using this here, but it's not related to OnOrderUpdate:
    I have a plot I have added to my indicator AddPlot(new Stroke(Brushes.AliceBlue, 0), PlotStyle.Dot, "Buys"); When State == State.RealTime in the OnStateChange() method I am trying to access historical values of the Buys Series but I am getting argumentOutOfRange exceptions. The Count is > 0. Why is this


    If any questions come up please let me know.

    Kind regards,
    -ChrisL

    Comment


      #3
      Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      42 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      25 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      162 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      98 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      157 views
      2 likes
      Last Post CaptainJack  
      Working...
      X