Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Confused about OnBarUpdate event

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

    Confused about OnBarUpdate event

    Hi

    I have an OnBarUpdate event with a simple print statement in it:

    Code:
    Print("Bar closed -- " + Time[0].ToUniversalTime().ToString() + " -- " + Close[0]);
    When I look at the output window, and compare what is printed out with actual price data (on tradingview.com), the time that is printed corresponds to the previous bar's close price.

    For example, on the 15M USDZAR chart, you can see the 07h15 AM close price on the 18th of July 2014 was 10.69350. The output window of NT lists these entries however:

    Code:
    Bar closed -- 2014-07-18 07:15:00 AM -- 10.7075
    Bar closed -- 2014-07-18 07:30:00 AM -- 10.6935
    As you can see, the 07h15 AM close price is listed as the 07h30 AM close price, and so forth.

    It makes no difference if I set CalculateOnBarClose to true or false.

    Please advise.
    Last edited by Ravish; 07-21-2014, 07:55 AM.

    #2
    Hello Ravish,

    Thanks for your post.

    NinjaTrader stamps the bar time at the close time of the bar. For example a 15 minute bar that starts on 7:00:01 will show a time on the chart of 07:15.

    Here is a link to the help guide explanation of how bars are buit in NinjaTrader: http://www.ninjatrader.com/support/h..._are_built.htm

    Please let me know if I can be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sjsj2732, Yesterday, 04:31 AM
    0 responses
    31 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    286 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    283 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    133 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    91 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X