Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting-Timeframe-Session Begins/Ends

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

    Backtesting-Timeframe-Session Begins/Ends

    I started off using Strategy Analyzer to backtest trading during the busier times of the day. I set Timeframe - Session Begins to 9:30 AM and Session Ends to 10:30 AM, and EnterLong, follow with a dynamic stopLoss.

    When I try to code (ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 103000) and EnterLong, the behavior is quite different.

    How exactly is Session Begins/Ends calculated? Is it in OnBarUpdate, or is it using the Advanced Programming framework?

    Thanks.

    #2
    maxsys,

    Not sure I quite follow you. The session begin/end times as defined by the UI is literally which bars time frames to allow the strategy to run on. If you wanted to code an additional time filter within a session definition you would then use those ToTime() checks, otherwise you don't need to if this is already done by your session begin/end times.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh.

      Based on that input, I double checked the Strategy Analyzer Chart and Trade Entry times. I am using Range bars and the Strategy Analyzer data does not match up precisely with the real data. For instance, SA goes Long ZB 12-09 8/14 @ 6:18 @ 116"065. On my chart, the closest bar is 6:25 with a high of 117'030 and a low of 117'000. This test was using 6 Range bars. My older range bar data looks suspicious too.

      Comment


        #4
        maxsys, are you evaluating the same days back setting / chart history in both the SA and the regular charts? This could produce different signals if those are not aligned.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by GussJ, 03-04-2020, 03:11 PM
        15 responses
        3,268 views
        0 likes
        Last Post xiinteractive  
        Started by Tim-c, Today, 02:10 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        2 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        50 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        10 responses
        401 views
        1 like
        Last Post beobast
        by beobast
         
        Working...
        X