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 DannyP96, 05-18-2026, 02:38 PM
        1 response
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        115 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        69 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        226 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        411 views
        0 likes
        Last Post CaptainJack  
        Working...
        X