Hello,
I am newbie here and i have few days start using fxDeema to create my EA.
This is the most difficult part for my EA i thing.They way to calculate my stop loss
I have a custom indicator which gives me that trendlines objects on the chart.D-hi, D-low ,D-open, D- PP, D- R1, D-R2, D-R3, D-S1, D-S2, D-S3(PIVOT POINT lines).
I need two variables, a and b.
If cur. is EUY/USD a=80,if cur. is EUR/YEN a=100....... if cur. is GBP/CHF a =60
If current_Price - D-PP > a
{ b= current_Price - D-PP + 10)
else If current_Price - D-R2 > a
{ b= current_Price - D-PP + 10).......
.....else if current_Price - D-S2 > a
{ b= current_Price - D-S2+ 10)
On BUY NOW make stopLoss=b
I will appreciate any help.