Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit Time to Execute Trades

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

    Limit Time to Execute Trades

    Hi

    I'm trying to develop a strategy that only trades overnight and London session (6:00pm - 9:00am). Anyone know why this language is causing no trades to execute?

    Click image for larger version

Name:	image.png
Views:	103
Size:	7.9 KB
ID:	1313743

    #2
    Hello conniejforextrader,

    Thank you for your post.

    This is because "If All" means all of the following conditions need to be met in order for any actions to be triggered.

    Your conditions specify that the time needs to be both after 6PM AND earlier than 9AM. These can't both be true at once.

    Instead of an "If All", your time filter conditions should be in a separate set and use "If Any" ("or" instead of "and").

    Please let us know if you have any further questions.

    Comment


      #3
      Thank you for the quick response.

      If I did "earlier than 9AM" how would it know not to take trades until after 6pm?

      Comment


        #4
        Hello conniejforextrader,

        It won't - you still need the other condition specifically not to trade after 6pm. Both condition are needed, except instead of using 'If All' they need to be using 'If Any'.

        Please let us know if you have any further questions.

        Comment


          #5
          Got it. Thanks!

          Comment


            #6
            Is this right? But if I use "any" how would it know to only take trades when the EMAs cross occurs during 6pm - 9am??

            Click image for larger version

Name:	image.png
Views:	95
Size:	11.0 KB
ID:	1313936

            Comment


              #7
              Hello,

              You can group these two time conditions together under 'If any', and leave the set as 'If all'. Next to 'add', click on 'group'. You can group these two time conditions there with 'If Any'.
              Last edited by NinjaTrader_Gaby; 08-13-2024, 07:11 AM.

              Comment


                #8
                That worked. Thanks!

                Comment


                  #9
                  Originally posted by NinjaTrader_Gaby View Post
                  Hello conniejforextrader,
                  Your conditions specify that the time needs to be both after 6PM AND earlier than 9AM. These can't both be true at once.
                  Can you please explain this? Why can't both conditions be true? 7PM IS after 6PM and it IS before 9AM (of the next day)...

                  Comment


                    #10
                    Hello money0101,

                    It is per day (24 hours). In a single day, 7PM is not before 9AM. It is after.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by NullPointStrategies, Today, 05:17 AM
                    0 responses
                    41 views
                    0 likes
                    Last Post NullPointStrategies  
                    Started by argusthome, 03-08-2026, 10:06 AM
                    0 responses
                    124 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    64 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
                    46 views
                    0 likes
                    Last Post TheRealMorford  
                    Working...
                    X