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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
67 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
36 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
60 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment