Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to use Historical data when CalculateOnEachTick

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

    How to use Historical data when CalculateOnEachTick

    Hello Support,

    How can I plot using Historical data while CalculateOnEachTick?

    I use some volume code from your BuySellVolume, and would like to just process historical volume (like the Volume[]) before the realtime bar starts.

    How do I do this properly? What variable to test?

    I have tried googling this over the forum, nothing came out.

    Thank you.

    Mokaru Z.

    #2
    Hello Mokaru Zen,

    OnEachTick is a realtime only property.

    You can use tick relay to calculate BuySellVolume however that will only be an estimate and will not match how it works in realtime. BuySellVolume uses OnMarketData which is a realtime data override, with TickReplay that only shows the ask/bid prices at the time of the last event so it would not be the full ask/bid volume like it would be in realtime.

    Comment


      #3
      Hello Support,

      I just use "if (State == State.Historical)" , it works.

      Best regards,
      Mokaru Z.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X