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 futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        8 views
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        7 views
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        7 views
        0 likes
        Last Post 00nevest  
        Working...
        X