does anyone have a code snippet where orders closed and the ea is disabled on a chart, after reaching specific profit or loss? Disabling the ea should only be on the current chart not in general for all charts.
Example: trading 3 pairs, 1 account, the ea is working mit unique magic number on each pair, one pair hits the loss (negative profit calculation) closing all trades and disable the ea on this pair, like removing it (1st choice) or disabled trading (ea active, 2nd choice), independent from the account balance or equity overall or the other running charts/pairs?
The profit/loss calculation must be done on the open orders (+- profit) of this chart/pair, not on account balance or equity!
thx for any suggestions