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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    23 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X