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.
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!
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
NinjaTrader
How are plots affected during transition from historical to real time?
Collapse
X
-
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.Tags: None
- Likes 1
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GussJ, 03-04-2020, 03:11 PM
|
15 responses
3,268 views
0 likes
|
Last Post Today, 03:15 PM | ||
Started by Tim-c, Today, 02:10 PM
|
1 response
7 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
2 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
50 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
10 responses
401 views
1 like
|
Last Post
by beobast
Today, 02:35 PM
|
Comment