How to disable (mt4/5) AutoTrading at certain upper and lower prices on chart?

 

Hi there!

Dear friends, I like automated gold trading using a bot, and very often I reach through technical analysis to the conclusion that the gold price will move intraday inside a price span that includes an upper and lower price. 

These points (prices) are most likely where the trend will reverse. But the problem is that my bot cannot detect this crucial points and places orders contrary to the immediate trend reversal.

Now I need an EA or script that I can set the exact upper and lower prices (say 2621.92 as the upper boundary price and 2529.43 as the lower boundary price) so that it can disable AutoTrading upon reaching the corser to the two set prices.

This way I can avoid mior and sometimes major losses.

Can anybody help in this regard by devising a script or EA? I dont know coding whatsoever! 

I will appreciate in advance.

Thanks

XAUUSD - Gold vs US Dollar - Precious metals quotes online
XAUUSD - Gold vs US Dollar - Precious metals quotes online
  • 2024.09.20
  • www.mql5.com
XAUUSD - Gold vs US Dollar - Price charts for non-ferrous precious metals from world exchanges. View and analyze price history using indicators and popular instruments. Choose the necessary ones and post the charts on websites or social networks.
 

Leave OnTick beforeit reaches the trading part like (not tested just typed!):

void OnTick() {
    .....
    if (bid > max || ask < min) return;
    ....
}
 
Carl Schreiber #:

Leave OnTick beforeit reaches the trading part like (not tested just typed!):

Hi,

Dear Carl, thank you for your reply. 

As I said before, I am not familiar with coding at all :).

I just need an EA that can be deployed on a separate XAU/USD chart, so I can input the two upper and lower control prices in it.

This EA should disable AutoTrading function of mt4/5 upon couser reaching either of the upper and lower prices.

This would stop my bot from taking positions at te set prices.

Thanks in advance to anybody helping for resolving this.

    

 
Hi

You need to find some freelancer then to code this for you. There is a possibility to turn off AutoTrading button from the script. It’s not so difficult but requires using some libraries so it’s not just that simple to write a few lines here.

It would be much easier to modify the code of your EA just like someone suggested above and I think if you have the access to the code you can do this on your own even. 

Have a nice day👍📊

 
Marzena Maria Szmit #:
Hi

You need to find some freelancer then to code this for you. There is a possibility to turn off AutoTrading button from the script. It’s not so difficult but requires using some libraries so it’s not just that simple to write a few lines here.

It would be much easier to modify the code of your EA just like someone suggested above and I think if you have the access to the code you can do this on your own even. 

Have a nice day👍📊

Hello

Dear Marzena, thanks for your good intention of help.

I think you are right. I need to find someone to code it.

Regards.