Protect margin against next week "Market Gap"

 

Hi friends,
Hope you are doing well.

my full question is:
How to detect last tick of week for my broker to protect margin against next week possible "Market Gap". In other words by detecting this tick, my EA would be able to put TP/SL or Pending orders when current candle has no more tick to reverse its direction.

Is it possible anyway?

Any solution is fully appreciated!

 
HosseinKOGO: my full question is: How to detect last tick of week for my broker to protect margin against next week possible "Market Gap". In other words by detecting this tick, my EA would be able to put TP/SL or Pending orders when current candle has no more tick to reverse its direction. Is it possible anyway? Any solution is fully appreciated!
  1. You can never know when the last tick will arrive for the week. All you can do is define a proper time to decide what you want to do.
  2. Usually brokers prevent trading during the last few minutes of the day or week. So you will have to issue the S/L and T/P before that time.
  3. S/L or T/P will do nothing for the Week Gap. When the Week opens and if the gap price is beyond your stops, that is where the price will close your position. So if the gap is 3 times larger than your S/L, you will lose 3 times your S/L risk.
  4. You should never calculate Risk based on Margin % alone. You should always calculate your Risk based on a S/L size, or some kind of risk assessment of when the trade become invalid, be that based on volatility, or swing points.
 
Fernando Carreiro:

      2.Usually brokers prevent trading during the last few minutes of the day or week. So you will have to issue the S/L and T/P before that time.

        I've got some ideas from your reply, however I have no solution. So please advise me about these:
        Since they stop trading themselves, they know which tick is the last tick for that server, right?

        Then isn't it possible either (1)by some command to ask their servers or (2)knowing the rule behind their decision to stop that server(if there is any fixed rule)?
        For example if the rule is about spread width, we can guess the last tick approximately and adjust SL/TP/Pendings.
        Or is there any command to ask server the right time?

        Fernando Carreiro:
          3. S/L or T/P will do nothing for the Week Gap. When the Week opens and if the gap price is beyond your stops, that is where the price will close your position. So if the gap is 3 times larger than your S/L, you will lose 3 times your S/L risk.

            Are you certainly sure? I see in backtest my SL/TP works during the gap.
            What about Pending orders in live trade?


            Thank you for sharing your knowledge

             
            HosseinKOGO: Since they stop trading themselves, they know which tick is the last tick for that server, right?

            No! And who is "themselves"?

            Brokers are not the ones trading (unless they are market makers or dealing desks). The traders are all over the world using many different brokers, including banks and other financial institutions. How will you know who will be the last one to trade before the market closes?

            You will never know, and I have already stated that retail brokers ends the trade session before the market closes. Only institutions and specialised professional traders have access to continue trading until the bell rings, so you will never know when the last tick arrives.

            You will have to place your stops before the end of the trading session which can be many minutes before the market closes.

            HosseinKOGO: Are you certainly sure? I see in backtest my SL/TP works during the gap.

            I am ABSOLUTELY SURE! On a real account you have gaps and slippage, and wide opening spreads, which is nothing compared to the back-tests.

            A back-test in not real, it is an approximation. The Strategy Tester (especially on MT4) sets the stop at exactly the price you set. On MT5 you can simulate slippage to some degree but not completely.

             
            Fernando Carreiro:

            No! And who is "themselves"?

            Brokers are not the ones trading (unless they are market makers or dealing desks). The traders are all over the world using many different brokers, including banks and other financial institutions. How will you know who will be the last one to trade before the market closes?

            You will never know, and I have already stated that retail brokers ends the trade session before the market closes. Only institutions and specialised professional traders have access to continue trading until the bell rings, so you will never know when the last tick arrives.

            You will have to place your stops before the end of the trading session which can be many minutes before the market closes.

            I am ABSOLUTELY SURE! On a real account you have gaps and slippage, and wide opening spreads, which is nothing compared to the back-tests.

            A back-test in not real, it is an approximation. The Strategy Tester (especially on MT4) sets the stop at exactly the price you set. On MT5 you can simulate slippage to some degree but not completely.

            I mean my broker knows the exact time to stop its own server as you already mentioned, right?
            So can we ask the broker which tick/second is the last before its server stops availability?(by code)

             
            HosseinKOGO: I mean my broker knows the exact time to stop its own server as you already mentioned, right? So can we ask the broker which tick/second is the last before its server stops availability?(by code)

            You are still not getting it. NOOOOOOOO!

            The last tick can come from anywhere in the world and can even arrive at the exact same second that ends the trade session!

            If you were to set an order at that exact moment, then YOUR trade would become the LAST tick.

            And just like you, many. many others might do exactly the same thing and then their orders would become the last tick.

            So, I repeat myself yet again! .... NOOOOOO! There is NO WAY of knowing when the last tick will arrive.

             
            Fernando Carreiro:

                Usually brokers prevent trading during the last few minutes of the day or week. So you will have to issue the S/L and T/P before that time.

                  Man you said this(above in bold) and also I've noticed my broker does this.
                  My thought is if my broker last tick is not the global last tick, then my broker could send me a signal saying "hey trader! this is our last(few) tick(s) for our platform. So take the right decisions".
                  However since you are sure SL/TP/Pending orders does nothing with the gap, it would be useless to decide about putting SL/TP/Pendings.

                  Thank you for sharing your knowledge pal.
                  Have a lovely day!

                  Reason: