Altos,
Attached is the EA we discussed. I placed it here in case anybody else wants it.
It works as follows:
Attach to any active chart on your MT4 something that generates ticks all the time as it only processes on a tick.
It will gather up and manage as a single set upto 10 separate sets of trades and there can be upto 10 trades per set.
Each set is distinguished by the Comment field 1st two characters.
The 1st charactor is a letter prefix that you can set in the EA say "P" for pair this will be the same across all sets.
The 2nd is the set it belongs to ie: P1 = set one P3= set three.
You can have sets 0-9 so ten sets.
If the TP or SL total is reached for a set it will close the entire set.
It has an information display on the chart.
EA Parameters:
sPrefix = Single character prefix that you must put as the first Comment character when you open the trade.
dTP = Take Profit value - this is the sum of all trades in the set
dSL = Stop Loss value - sum of all trades in the set MUST be negative
iCheckPeriod = number of seconds between refreshing the data and checking for close actions. If you have this set at 0 then it will check every tick. But may be cpu intensive as it has to query your account everytime and sort through all the open trades.
iTradeDelay = number of seconds delay between retrys if a close action fails. I would leave this at 0.5 seconds unless you have need to alter it.
If dTP or dSL are set to 0 then it will not close any trades with that feature.
You can run multiple versions by using more than one chart but you must use a different prefix for each version.
PLEASE TEST ON DEMO to ensure that it works properly for you.
Regards
Attached is the EA we discussed. I placed it here in case anybody else wants it.
It works as follows:
Attach to any active chart on your MT4 something that generates ticks all the time as it only processes on a tick.
It will gather up and manage as a single set upto 10 separate sets of trades and there can be upto 10 trades per set.
Each set is distinguished by the Comment field 1st two characters.
The 1st charactor is a letter prefix that you can set in the EA say "P" for pair this will be the same across all sets.
The 2nd is the set it belongs to ie: P1 = set one P3= set three.
You can have sets 0-9 so ten sets.
If the TP or SL total is reached for a set it will close the entire set.
It has an information display on the chart.
EA Parameters:
sPrefix = Single character prefix that you must put as the first Comment character when you open the trade.
dTP = Take Profit value - this is the sum of all trades in the set
dSL = Stop Loss value - sum of all trades in the set MUST be negative
iCheckPeriod = number of seconds between refreshing the data and checking for close actions. If you have this set at 0 then it will check every tick. But may be cpu intensive as it has to query your account everytime and sort through all the open trades.
iTradeDelay = number of seconds delay between retrys if a close action fails. I would leave this at 0.5 seconds unless you have need to alter it.
If dTP or dSL are set to 0 then it will not close any trades with that feature.
You can run multiple versions by using more than one chart but you must use a different prefix for each version.
PLEASE TEST ON DEMO to ensure that it works properly for you.
Regards
Attached File(s)
Close Pairs v3.ex4
6 KB
|
1,132 downloads