Hello Expert Coders,
Need your help for this Trade Managing EA. Right now, it just moves SL to breakeven (to a user defined extern level) when the price reaches certain (user defined extern) profit level. I want to do little dynamic calculation with this code
... and then take it into the breakeven calculation.
The pseudo code is something like this
Note: read above +/- as plus or minus and are all in 5 digit double value.
Attached expert (warning: dont use it for live environment, particularly with testing mode to true)
Need your help for this Trade Managing EA. Right now, it just moves SL to breakeven (to a user defined extern level) when the price reaches certain (user defined extern) profit level. I want to do little dynamic calculation with this code
Inserted Code
double costOfBusiness = OrderCommission()+OrderSwap() / tickValue*OrderLots();
... and then take it into the breakeven calculation.
The pseudo code is something like this
Inserted Code
NewBreakevenSLPrice = OrderPrice +/- costOfBusiness +/-Spread +/-Slippage +/- smallProfitinPoints
Note: read above +/- as plus or minus and are all in 5 digit double value.
Attached expert (warning: dont use it for live environment, particularly with testing mode to true)
Attached File(s)
stRangeExpert.mq4
6 KB
|
310 downloads