Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateonBarClose question

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

    CalculateonBarClose question

    I'm trying to troubleshoot a situation where my live strategy delayed entry by a full bar and would like some clarification on my understanding if I may..

    On a strategy with CalculateOnBarClose = true;

    1) OnBarUpdate is run after the close price of the bar is generated so any entry/exit orders will be shown on the following bar soon after (allowing for fill timing)

    2) The minimum lookback period for CrossAbove is 1 and this value would represent the bar just closed (currentbar) before the OnBarUpdate is run?

    3) For indicators with the "BarsAgo" variable, [0] would also represent the currentbar after it was closed and just before OnBarUpdateis run?

    4) If I was using DM(DMValue).DiPlus and DM(DMValue).DiMinus for the CrossAbove calculation, would it use 2 or more decimal places for the comparison?


    Thanks

    #2
    jmtoll, your understand is correct - it will take one bar for the CrossAbove / CrossBelow to trigger with CalculateOnBarClose = true - the comparison can have up to double precision, but will limited by the instrument's ticksize rouding applied.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    630 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    566 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X