• 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

    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.

    #2
    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.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by GrossBitZeCoinTrader, Today, 02:15 AM
    0 responses
    1 view
    0 likes
    Last Post GrossBitZeCoinTrader  
    Started by Papercut110, Yesterday, 09:08 PM
    0 responses
    6 views
    0 likes
    Last Post Papercut110  
    Started by iq200, 11-09-2019, 08:26 AM
    5 responses
    59 views
    0 likes
    Last Post koganam
    by koganam
     
    Started by johng964, Yesterday, 02:57 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by spamula, Yesterday, 03:00 PM
    2 responses
    18 views
    0 likes
    Last Post spamula
    by spamula
     
    Working...
    X