Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Timely Executions using indicators

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

    Timely Executions using indicators

    I'm sure I'm missing something obvious here but can't find a solution browsing the forums.

    I'm building a strategy that uses the Short Terms Swings indicator that turns red for down trends / green for up trends. I'd like to execute long or short buys based off this indicator. I'm getting executions based off the indicator but they are executed 2 bars too late. I'd like the order to be executed right when the indicator changes direction. I've experimented with the

    CalculateOnBarClose = false;

    but that doesn't seem to change the behavior. My order execution code occurs within the OnBarUpdate() event so maybe that's the problem. Should I be using a different event to be checking my indicator?

    Thanks in advance!

    #2
    Welcome to our forums - toggling CalculateOnBarClose in backtesting will not have any effects, it would be true in all cases as the intrabar formation is simply not know here you would work only with the granularity the underlying series can provide (OHLCV values of it).

    In realtime you can submit orders on each tick with CalculateOnBarClose set to false (the OnBarUpdate then gets called for each tick).

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 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
    567 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