MT4 code to close all trades if equity reached a certain percentage

 

Hi,

I have an mt4 EA and I would like to add mt4 code into this EA to stop all trades and delete pending orders if equity reached a certain percentage.

I searched on MQL5 forum but I don't find mt4 code.

I would like to stop all trades and delete pending orders for this day if my equity reach +2% of my balance and continue to trade the next day if it's a trading day (saturday and sunday excluded), what would be the mt4 code?

Thank you for your help and for your answer.

 
You can post this as a job to: Freelance.