Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Somehow, Put correct time with tick information
Collapse
X
-
Time[] is not the tick time. It is simply the bar time.
If you want tick time you need to work out of OnMarketData() or OnMarketDepth().
Index of 0 is always the most recent bar. Index 1 is always the previous bar, index 2 is the bar before that, etc.
If you want to access bars that are still building you need to be running your script with CalculateOnBarClose = false.
-
Somehow, Put correct time with tick information
If you have a 1 minute bar standard with ability to access each tick...when using OnBarUpdate() and FirstTickOfBar, the times always show 00 for seconds for EVERY tick bar. When getting information on the new/partial/tick bars, before the full minute bar's information is available, the seconds should reflect close to the real time.
There should be 2 bar/prices/time that can be related to the FirstTickOfBar...One for the previous Completed Minute Bar and one for the partial/new Minute Bar that is being built.
When the previous/full Minute bar is accessed, the current time[1], Open[1], Close[1], etc. seem perfect.
There should be a way to access the Partially built Tick/Minute bar...
For example: Time[0], Open[0], Close[0],... would be the info of the FirstTickOfBar after receiving the 1st Tick's information and Only when in the FirstTickOfBar mode.
The 2nd Tick/Minute bar should probably include the Price data from the 1st & 2nd bars, but the Time of the 2nd Tick/Minute bar. When on that bar Time[0], Open[0], etc. should reflect that bar.
The 3rd Tick/Minute bar should probably include the Price data from the 1st, 2nd, and 3rd bars, but the Time of the 3rd Tick/Minute bar, etc. When on that bar Time[0], Open[0], etc. should reflect that bar.
The offsets [0], [1], etc. should be discussed and decided upon based on your programming...just so the Time and Price data is available.
Maybe even something like TTime[x], TOpen[x], etc. to represent TickTime, TickOpen, etc...when in FirstTickOfBar mode.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
10 responses
36 views
0 likes
|
Last Post Today, 11:10 AM | ||
Started by DayTradingDEMON, Today, 09:28 AM
|
4 responses
24 views
0 likes
|
Last Post Today, 10:47 AM | ||
Started by geddyisodin, Yesterday, 05:20 AM
|
9 responses
50 views
0 likes
|
Last Post Today, 10:45 AM | ||
Started by George21, Today, 10:07 AM
|
1 response
15 views
0 likes
|
Last Post Today, 10:43 AM | ||
Started by Stanfillirenfro, Today, 07:23 AM
|
9 responses
24 views
0 likes
|
Last Post Today, 10:16 AM |
Leave a comment: