Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time series

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

    Time series

    I am trying to put in a time series with the strategy wizard. FROM 6PM TO 3 AM. When I run the strategy analyzer it doesn't work.

    >= 6:00 PM
    <= 3:00 AM

    #2
    Hello RonSims,
    Welcome to the forum and I am happy to assist you.

    The logic >=6:00PM and <=3:00AM will return true only from Midnight to 3:00AM

    You could set a code like
    Code:
    if ((ToTime(Time[0]) >= ToTime(18, 0 ,0) && ToTime(Time[0]) <= ToTime(23,59,0)) || (ToTime(Time[0]) >= ToTime(0,0,0) && ToTime(Time[0]) <= ToTime(3,0,0)))
    {
      //do something
    }
    Also please make sure what session template you are using. If you are using a session template which has a break at midnight then you can expect a different result from what you are expecting.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Can I put 2 time periods on the strategy wizard ? 12 am to 3 am - 9am to 1 pm

      Comment


        #4
        Hello RonSims,
        Yes, you can put 2 time filters via the strategy wizard.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        648 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        574 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X