Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

market replay - days to load

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

    market replay - days to load

    How do I get my strategy to only run the timeframe I select with the play,pause when using market replay.
    Currently once I start the market replay it seems to run through the last 3 days or so through my entire strategy resulting in trades being entered, exit, cancelled, etc.
    I see that you can manually set days to load. Can it be done programatically and can it be 0?
    I already have:
    PHP Code:
    if (Historical)return; 
    
    Seems to have no affect when used with market replay?

    Thanks

    #2
    Hi trtrav,

    There's no programmatic control here, but you can set in the GUI the from and to date.

    if (Historical) return; works the same in market replay as live, but maybe not the way you expect. Market replay simulates a real time feed, so the tick by tick playback will flag bars with Historical = false. There can still be historical bars, but the script shouldn't calculate them if you have that return statement. To check what your strategy is doing on Historical/ RealTime bars add this statement

    Print(CurrentBar + " Historical: " + Historical);

    Since you are returning out when Historical, you should expect that this statement will always look like: # Historical: false and will only receive output when there is playback.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    57 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    143 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    161 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    97 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    276 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X