How do I go about doing this? Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Accessing Historical Data from Live Strategy
Collapse
X
-
Accessing Historical Data from Live Strategy
I have a strategy that needs to look at the prior n bars in order to calculate market conditions. Of course I can just wait for n bars to be processed in the strategy, but if n is large I'd like to pull that from historical data (rather than wait several hours/days each time the strategy is started in real time before trading).
How do I go about doing this? Thanks -
You don't need to do anything special, other than making sure you have enough bars loaded in the chart you're running the strategy and in the strategy be sure to do a check of having enough bars (eg. something like CurrentBar > n where n is the number of bars you minimally need).
HTH
-
Ok, great. I figured that when I started a strategy up, there would be no bars available until it had been running long enough to collect those bars. Good to know it can use historical bars automatically if they exist.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment