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
Delta value printed from strategy not matching chart data window
Collapse
X
-
Do you mean the actual output of CurrentBars[2] or the Closes[2][0]? Closes[2][0] is printing the current Last price of ES.
-
-
-
Hello Lance El Camino,
With or without TickReplay?
I am assuming you mean with TickReplay.
As the indicator updates with the 1-tick series, you would want to move the logic to the BarsInProgress of that 1 tick series. With TickReplay enabled and Calculate set to OnEachTick, BarsInProgress 0 would be updating before BarsInProgress 1, so the last tick update of BarsInProgress 1 would not be included with the last tick update of BarsInProgress 0.
I've adjusted the code to work with TickReplay and print during BarsInProgress 1 (after the 1 tick series has updated the indicator) and the values are still the same.
Chelsea B.NinjaTrader Customer Service
Comment
-
Thank you again! I've been using Market Replay OnEachTick for everything. I also noticed that when I reloaded the historical data on the actual chart the values matched and the values of volume for the ES Volume chart changed for the current bar from what it was before I reloaded the historical data. I believe that was the issue this whole time. Could it be that there are minor hiccups when running Market Replay OnEachTick? Seems like when a lot of volume hits it slows down or pauses to process each tick and affects the bar construction on the Volume chart.
Comment
-
Would there be any advantage to calling the Volumetric Bar Delta instead of Order Flow Cumulative Delta?
Comment
-
Comment
-
Comment
-
Hello Lance El Camino,
I've been using Market Replay OnEachTick for everything.
I am asking if in the historical data if you are using TickReplay. TickReplay is different than Playback with Market Replay or Tick data.
Below is a link to a video on Playback.
https://www.youtube.com/watch?v=CktT...vDBcC&index=17
In historical if TickReplay is not enabled, Calculate will always be OnBarClose and will not update intra-bar for each price change or tick with OnEachTick or OnPriceChange.
This means in the historical data, you are actually running the script with OnBarClose as you do not have TickReplay enabled.
TickReplay must be enabled for a script to update Calculate for OnEachTick or OnPriceChange historically.
https://ninjatrader.com/support/foru...377#post773377
I also noticed that when I reloaded the historical data on the actual chart the values matched and the values of volume for the ES Volume chart changed for the current bar from what it was before I reloaded the historical data. I believe that was the issue this whole time. Could it be that there are minor hiccups when running Market Replay OnEachTick?
To confirm, if you start by following the exact steps I have shown in the video, the values are not matching the chart when you first apply the strategy?
If you reload the values match the chart or are still not matching the chart?
Would there be any advantage to calling the Volumetric Bar Delta instead of Order Flow Cumulative Delta?Chelsea B.NinjaTrader Customer Service
Comment
-
Comment
-
Sorry I didn't answer your question, "If you reload the values match the chart or are still not matching the chart?" If I reload it matches. So that's what I believe was the initial problem. If running realtime data I thought Tick Replay wasn't necessary?
Comment
-
Hello Lance El Camino,
For historical data loading in Playback, yes TickReplay still has to be enabled to allow Calculate to update for OnEachTick or OnPriceChange in historical.
Playback with Market Replay is real-time data only. This is not historical data. This plays back as real-time.
If you are not processing historical data, and you are doing an 'if (State == State.Historical) return' to not preocess the historical data, this would not apply. However, even in real-time I am getting the exact same values as the chart for every tick update.
Are you only processing the real-time data by returning in historical?
Are you printing the State in your print to confirm this is historical or real-time?Chelsea B.NinjaTrader Customer Service
Comment
-
My replay data is set to Market Replay. Also, there is a time difference in the output of BIP 0 and BIP 1 in the strategy.
Comment
-
Hello Lance El Camino,
It is expected a 1 tick series which has the time stamp of each tick, would be different than the time stamp of the close time of a larger primary bar.
Following the exact steps shown in the video I have provided you, with the exact code in the video, are you getting different behavior than what is shown in the video?Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by adeelshahzad, Today, 11:49 AM
|
3 responses
4 views
0 likes
|
Last Post Today, 12:22 PM | ||
Started by spottysallrite, Today, 11:31 AM
|
2 responses
7 views
0 likes
|
Last Post Today, 12:21 PM | ||
Started by johnMoss, 03-04-2024, 01:53 PM
|
2 responses
33 views
0 likes
|
Last Post
by Overnhou
Today, 11:21 AM
|
||
Started by Padan, Today, 02:02 AM
|
5 responses
17 views
0 likes
|
Last Post Today, 11:14 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
8 responses
29 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
Comment