Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to access tick-by-tick data in a historical data?
Collapse
X
-
How to access tick-by-tick data in a historical data?
Everyday I woke up and start an strategy I have in my NT7, it works fine and I got the data I need in a tick-by-tick basis for I am running on real time feed, problem is I need to access the tick-by-tick data of yesterday and once I stop my script I no longer have that info. I saw NinjaTrader have the data for I can see it in the Historical Data Manager Window, how can i do it in a Strategy script?Tags: None
-
Hello rstriquer,
Thank you for writing in.
If you wish for your script to access historical tick data, you will need to add a secondary tick series to your script.
More information about working with scripts with multiple series can be found here: https://ninjatrader.com/support/help...nstruments.htm
Please, let us know if we may be of further assistance.Zachary G.NinjaTrader Customer Service
-
It does not work, lets say I do this ...
If I am working on a real time data the Close[0] delivers me data every tick, but whenever I am working on Historical data it gets me only the last tick data of the bar. How can I get the "intra data" of the bar on a historical bar?Code:protected override void Initialize() { CalculateOnBarClose = false; } protected override void OnBarUpdate() { if (!Historical) { Print(Close[0]); } }
Comment
-
Hello,
Thank you for the reply.
As Zachary posted, you would need to add a 1 tick secondary series to see intrabar data historically.
There is a sample here: http://ninjatrader.com/support/forum...ead.php?t=6652
Additionally there is a sample strategy called SampleMultiTimeFrame that comes with the platform, this sample demonstrates adding a secondary series and limiting the logic to the BarsInProgress index.
Close[0] specifically will always return the last Closed bars value of the Primary series being processed. This would entail that if you were on a 5 minute series, this would either report the last 5 minute closed bar, or each Tick in realtime with COBC = false. Historically this would not make a difference, instead you could Add a secondary series and use the BarsInProgress index to delegate logic. using the secondary series you could see OnBarUpdate called for each tick of the 1 tick series to do logic.
I look forward to being of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
23 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
115 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
224 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
406 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|

Comment