Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

two start times and end times in strategy

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

    two start times and end times in strategy

    i'm trying to have two times in my strategy but its not working. it works with one. i'm trying to do a morning session and an afternoon session. i get a ton of losses during lunch. so, i'm trying to take that part of the day out. any suggestions?
    Attached Files

    #2
    Hello SteveReiza,

    Thank you for your post.

    To set multiple time filters, you will need to use multiple condition groups. I suggest creating a bool variable on the Inputs and Variables screen. You could call it something like "TimeForTrades" and set the default value to false. Then, in one of your condition sets you will select "If any" of the following conditions are true. Next, click group and create a condition group that checks "if all" are true for the start/end times. This would be similar to the time filter condition group in the example at the very bottom of this page:


    After that, create a second condition group with your other time filter for the other portion of the day when you'd like to allow trades. Once both time filter condition groups are created, set the action to change TimeForTrades to be true.

    You will also need to create a separate set that checks if it is not within the desired time filters and, if so, set the TimeForTrades bool to false.

    Finally, in any of your condition sets that result in trades you will need to add a check that TimeForTrades is true in your condition. Here is an example video that checks if it is between 10am-12pm or 2pm-4pm, and if so it sets the bool to true. If it is greater than 4pm, less than 10am, or between 12pm-2pm it sets the bool to false. Then, my condition to enter a long position checks if TimeForTrades is true and if the price is greater than the SMA(14) indicator. This is just an example that could be modified to suit your own needs:
    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    Please let us know if we may be of further assistance.

    Comment


      #3
      awesome, alright thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X