The end goal here is that I want to capture these images for the past 2 years. What is the best way to do this? Knowing that the image capture doesn't work if the chart isn't updated. I am wondering if there is a way I can run market replay for the past 2 years, but that is too time consuming to run tick by tick when all I really need it 5 minute bars. Is there a way I can run market replay with 5 minute fidelity? Or what other options do I have? I was thinking I could load the chart a few month at a time and code a scroll/capture routine but NT8 doesn't support bar scrolling programmatically. What can I do? Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Screen capture historic 5min bars chart
Collapse
X
-
Screen capture historic 5min bars chart
Hello, I wrote an indicator that captures the chart OnBarUpdate where IsFirstTickOfBar is true. This way I get a chart capture every time a bar closes and a new bar is started. I have tested this to work almost identically if the Calculate property of the indicator is either On Bar Close, On Tick, or On Price Change. During live data this works as expected and mentioned above. I also have a check there where I don't run the image capture if State == State.Historical, because I noticed this gets called a whole lot when the chart is initializing to build the past few bars as needed.
The end goal here is that I want to capture these images for the past 2 years. What is the best way to do this? Knowing that the image capture doesn't work if the chart isn't updated. I am wondering if there is a way I can run market replay for the past 2 years, but that is too time consuming to run tick by tick when all I really need it 5 minute bars. Is there a way I can run market replay with 5 minute fidelity? Or what other options do I have? I was thinking I could load the chart a few month at a time and code a scroll/capture routine but NT8 doesn't support bar scrolling programmatically. What can I do? Thanks.Tags: None
-
Hello arabisoft, thanks for your post.
You would need to use the Playback connection to do this. Since the Playback data we provide does not go back over 2 years, you will need to download historical data while connected to your data provider. This can be done from the Tools>Historical data menu.
Please let me know if I can assist any further.
-
Hi Chris, thank you. A few questions
1- how far back does your payback data go for NQ/ES?
2- if I were to download the data, does it have to be tick/payback data or can it be just backtest second/minute data?
3- if it isn't playback data, and just backtest minute data instead, will I be able to control the rate at which it's progressing?
Thanks.
Comment
-
Hello, thanks for your reply.
1. We record popular futures and forex markets up to 90 days back. You can record incoming data into your platform as well.
2. You do need historical tick data for replay to work on historical playback mode.
3. Tick data is required to use historical playback, minute data and above can not be replayed, but can be backtested in the Strategy Analyzer.
Best regards,
-ChrisL
Comment
-
Ok, thanks. A couple more.
1- Can I download tick data and use it for replay? Will replay work with regular tick data or do I have to download ask/bid ticks as well?
2- programmatically, is there a way to force a chart render during historical state of runtime? Is there a command in NT8 library that would force the chart to update?
Thanks.
M
Comment
-
Hello, thanks for your reply.
1. When you are connected to your data provider, go to Tools>Historical data load tab. From there you can download historical data from your data provider. The playback system will only use the last tick series to replay the data. Level 3 data will not be available, however, you can use Tick Replay to determine the best bid or ask at the time a tick enters the system. See the example titled "Accessing the current best bid and ask at the time of a trade":
https://ninjatrader.com/support/help...ick_replay.htm
2. NinjaTrader checks to see if OnRender should be called every 250ms. There is the ForceRefresh method to make the interval reset and make the OnRender method run as soon as possible. Now, this is different than making the chart update. If you want to force OnBarUpdate to be called, use the Update() method. Whether these methods are useful depends highly on what exactly you are doing in the script. E.g. If I ran a script that runs OnEachTick and it adds something like an SMA, I would want to call Update on the SMA object so I know the SMA object is getting updated in sync with my host indicator.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment