Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How are plots affected during transition from historical to real time?

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

    How are plots affected during transition from historical to real time?

    Have working strategy, tick based, running properly for several weeks with two overlay plots. Just added two additional plots. All four overlay plots added via AddPlot() in State.SetDefaults. Tick replay is enabled. Historical and real time tick data is available from provider. Data for plots 1 and 2 is calculated from start of State.Historical and continuously calculated during real time. Data for plots 3 and 4 only begins to calculate once real time data is available. Plots 3 and 4 behave as expected. Plots 1 and 2 work as expected only through historical data processing but do not plot thereafter. However, Print() confirms that plots 1 and 2 data series are updated from beginning of historical data processing and throughout real time processing, tick by tick. But the data is not displayed once historical processing completes. What happens between end of historical processing and start of real time processing to cause this? Why are the only plots affected the ones that were not updated during historical processing? What am I doing wrong here?

    UPDATE to original post. BEFORE ANYONE SPENDS TIME ON THIS, I have identified the problem and it is just a clumsy botch on my part. The original plots (now plots 3 and 4) were to display stop levels, and so they had to be set to transparent brushes when flat. I plugged the AddPlot statements for the additional plots (now plots 1 and 2) in above the AddPlot statements for the original plot, but failed to correctly change the PlotBrushes[][] indexing in the OnBarUpdate code that followed. So plots 1 and 2 were present, but transparent. Ugh.
    Last edited by jvanelli; 09-03-2019, 10:33 PM.

    #2
    Hello jvanelli,

    With TickReplay enabled, I would not expect any change from historical to real-time. Without TickReplay Calculate will always be .OnBarClose in historical data. In real-time if you have Calculate set to .OnPriceChange, or .OnEachTick this would behave differently than the historical data which would still be .OnBarClose.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X