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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
115 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
161 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
83 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
127 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
87 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment