• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Somehow, Put correct time with tick information

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_JoshP
    replied
    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.

    Leave a comment:


  • ChuckAllen
    started a topic Somehow, Put correct time with tick information

    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.

Latest Posts

Collapse

Topics Statistics Last Post
Started by faustf, Today, 06:28 AM
1 response
3 views
0 likes
Last Post NinjaTrader_PaulH  
Started by svadukia, Today, 05:41 AM
3 responses
4 views
0 likes
Last Post NinjaTrader_PaulH  
Started by iq200, Today, 05:47 AM
0 responses
2 views
0 likes
Last Post iq200
by iq200
 
Started by giogio1, 11-10-2019, 11:23 PM
5 responses
18 views
0 likes
Last Post NinjaTrader_Jim  
Started by StevenNelson, Yesterday, 07:31 PM
1 response
14 views
0 likes
Last Post NinjaTrader_ChrisSch  
Working...
X