Hi I need help to code an EA
The concept is simple:
Parameter: magic number; if blank then it will check all open position
1. EA will monitor all open positions
2. It will check each position's profit in pips (pips must be > 1pip from open price).
3. IF there is one position with positive profit (>1pip), then do nothing
4. ELSE means all positions have < 1 pips, thus close all trades.
Note: Profit checking at point 3 needs to look on pip value not $ value as sometimes swap can give false logic if calculate against $ value.
Will anyone kindly help me to code this EA? I can't offer anything but I will keep the coder's name in the EA as credit.
Thanks much
The concept is simple:
Parameter: magic number; if blank then it will check all open position
1. EA will monitor all open positions
2. It will check each position's profit in pips (pips must be > 1pip from open price).
3. IF there is one position with positive profit (>1pip), then do nothing
4. ELSE means all positions have < 1 pips, thus close all trades.
Note: Profit checking at point 3 needs to look on pip value not $ value as sometimes swap can give false logic if calculate against $ value.
Will anyone kindly help me to code this EA? I can't offer anything but I will keep the coder's name in the EA as credit.
Thanks much