Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose LOW[0] High[0]

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

    CalculateOnBarClose LOW[0] High[0]

    When CalculateOnBarClose is set to false and I am backtesting, what value does the LOW[0] or HIGH[0] return ... does it still "Closeout" the bar and give me the LOW[0] of that closed out bar when loading historical data regardless of the CalculateOnBarClose setting?

    OR should I be using LOW[1] or HIGH[1]?

    Here is my real life problem and the way I am addressing it:
    if (Historical || CalculateOnBarClose == true)
    then I use the LOW[0] and HIGH[0]

    if (!Historical && CalculateOnBarClose == false)
    then I use the CLOSE[0] ... which is the HIGH[0] or LOW[0] since this is a tick right?

    All of this stems from my Tradestation poisioning ... with intrabar calculations the LOW[0] and HIGH[0] of the ticks were really the close of the tick ... I am trying to duplicate this by using the code above.

    Is this correct?

    -Lars

    #2
    In backtesting CalculateOnBarClose has no purpose. It is always true. Close[0], Low[0] etc all return the latest bar at its close.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Latest bar at it's close.

      Originally posted by Josh View Post
      return the latest bar at its close.
      So does that mean when CalculateOnBarClose is set to false that the LOW[0] will bring the last "closed" bar's LOW and not the bar that is in progress?

      -Lars

      Comment


        #4
        "0" always will denote the bar in progress. This has nothing to do with CalculateOnBarClose=true/false. More info: http://www.ninjatrader-support.com/H...BarClose1.html

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        77 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        27 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        62 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X