How to hide stop loss and take profit from Broker

 

Hello Everyone.

Is it possible if we could hide stop loss and take profit values from Broker in an Expert Advisor?

I would really appreciate if anyone could help in this regard.

Thanks.

SoberCanadian

 

Yes, just don't set the SL or TP values explicitly within the trade as sent to the broker but setup your EA to monitor the trade and market price at all times so it can close the trade when the market reaches the internally defined SL or TP.

There are lots of drawbacks to this approach though. If the market gaps it will potentially gap well below your SL price causing you to lose much more money on the trade than you intended. (of course it could also gap in your favor, causing you to take more profit than you intended as well)

Also consider that your trade is "floating" with unbounded risk potential if your terminal loses connection to the broker's server for any reason and that you'll want to create some manner of persistence layer for those occasions where the EA needs to be reloaded (system reboot, terminal reboot, etc) and latch back onto the trade again.

Are you suspecting your broker is running your stops? Or just want to be prepared for the possibility?

I had this happen to me once, had two brokers (live accounts) running side-by-side but a live trade only in one of the broker's accounts and I watched right before my eyes as the broker's price action (the one with which I had a live trade) suddenly spiked downwards nearly 20pips taking out my stops in the process then within a matter of seconds it spiked back up to resume "normal" price activity. The other broker's price activity, side by side open at the same time on dual monitors, reflected none of this odd behavior.

Needless to say IMO the solution to this is not to develop ever more obscure methods of keeping your broker from doing unsavory things but rather the solution is to seek out a broker that simply doesn't do it. In my case, after a call to the broker in question confirmed they were aware of the odd price activity but compelled to do nothing about it, I changed brokers. I use stops now and don't have issues with apparent stop-hunting. If you have a broker that runs your stops then that could be the tip of the iceberg, who knows what else they are up to that you aren't aware of how to detect. If we had to choose from one of two MT4 brokers that would be one thing, but we have dozens of choices these days.

Reason: