Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy analyzer getting mad at midnight

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

    Strategy analyzer getting mad at midnight

    Run simple strategy and at some point of time analyzer got completely off its mind (see the pic - 17/03 00:00).

    By debug prints there are nothing even close to generate that amount of orders.

    I also print from OnPositionUpdate and it didnt show any activity there too.

    What my prints shows - is that 16/03 23:59 there was command to enter short. Position changed to short.

    The other attempt to change position was on 17/03 00:04 (ExitShort method called). Position didnt change and since then all the attempts to call Exit/Enter Short/Long methods were ignored and the position was actually closed on the end of the backtest run with status Exit On Close.


    The situation probaly related to the attempt to open position just before midnight (because several days before 17/03 was OK and if I pick another timeframe 17/03 is OK - there is no orders on 16/03 23:59)

    The other thing which might contributed to the issue is - the strategy uses 2 TFs - main (where only 2 simple indicators are for signals) and 1 tick (to execute orders immediately on a signal)
    Attached Files

    #2
    We needed a reproducible scenario, preferable based on SampleMaCrossOver on order to reproduce.

    In case the issue only is reproducible with your custom strategy, then I suggest debugging your strategy (TraceOrders etc.) to isolate the culprit

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    605 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    351 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
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    561 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X