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 NullPointStrategies, Today, 05:17 AM
    0 responses
    39 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    124 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    64 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    41 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    46 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X