Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Replay Glitch? Multiple Orders are submitted.

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

    Market Replay Glitch? Multiple Orders are submitted.

    I'm replaying market data (on max) to test my strategy, I noticed that in certain situation there is some kind of glitch that submit multiple orders on the same candles. If I back-test instead of market replay, I see each entry as just one order instead of a bunch (see attached).

    Is it a known issue? am I missing something?

    Thanks!

    #2
    Hello darkgreen,

    Thank you for your post.

    You should expect that a strategy running real-time (live brokerage account, live market simulation, Market Replay etc...) will produce different results than the performance results generated during a backtest. This difference may be more easily seen on certain Bars types (e.g. Point and Figure) than others due to their inherent nature in bar formation.

    During a backtest you can select conservative or liberal fill algorithms which will produce different results. Fills are determined based on 4 data points, OHLC of a bar since that is the only information that is known during a backtest and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick'.

    Also, here is a link to the differences on real-time vs backtest (historical).


    In this particular case, if you don't want it to enter more than once per bar, you could set up a bool to control that. For example you could set a bool called something like TradeTaken and set that to false initially.

    Then, once you take the trade, set the bool to true, and then you can set that back to false on IsFirstTickOfBar.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    181 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    334 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    258 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    358 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    187 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X