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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X