Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy with "session begins"

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

    Strategy with "session begins"

    when backtesting,
    regarding the 89sma using the 1 minute charts and the "session begins" at 9:30est.

    seems that the 89sma doesn't have enough bars to be accurate. for example: 8:30est "session begins" will have the 89sma at a different level which makes sense so i would assume that a chart would need to be started at 89minutes before it would be accurate or 8:01est.

    how would i go about using a chart that starts at 8:01est and a strategy to start at 9:30est?

    #2
    Originally posted by duck_CA View Post
    when backtesting,
    regarding the 89sma using the 1 minute charts and the "session begins" at 9:30est.

    seems that the 89sma doesn't have enough bars to be accurate. for example: 8:30est "session begins" will have the 89sma at a different level which makes sense so i would assume that a chart would need to be started at 89minutes before it would be accurate or 8:01est.

    how would i go about using a chart that starts at 8:01est and a strategy to start at 9:30est?
    Hello,

    Thank you for your post.

    You will have to set a time frame for your strategy, see this reference: http://www.ninjatrader-support2.com/...ead.php?t=3226
    Ray S.NinjaTrader Customer Service

    Comment


      #3
      thanks, i can now backtest using a setting of 8:00 for "session begins" while the code below will only trigger trades starting at 9:30

      Code:
      [FONT=Courier New][COLOR=#008000]// Only trade between 9:30 AM and 1:45 PM[/COLOR][/FONT] 
      [FONT=Courier New][COLOR=#0000ff]if[/COLOR] (ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 134500)[/FONT] 
      [FONT=Courier New]{[/FONT] 
      [FONT=Courier New][COLOR=#008000]  // Strategy logic goes here[/COLOR][/FONT] 
      [FONT=Courier New]}[/FONT]
      should this work for trading "live" as well?

      Comment


        #4
        Originally posted by duck_CA View Post
        thanks, i can now backtest using a setting of 8:00 for "session begins" while the code below will only trigger trades starting at 9:30

        Code:
        [FONT=Courier New][COLOR=#008000]// Only trade between 9:30 AM and 1:45 PM[/COLOR][/FONT] 
        [FONT=Courier New][COLOR=#0000ff]if[/COLOR] (ToTime(Time[0]) >= 93000 && ToTime(Time[0]) <= 134500)[/FONT] 
        [FONT=Courier New]{[/FONT] 
        [FONT=Courier New][COLOR=#008000] // Strategy logic goes here[/COLOR][/FONT] 
        [FONT=Courier New]}[/FONT]
        should this work for trading "live" as well?
        -->Correct!
        Ray S.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        23 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        120 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        63 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        45 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X