How to add StopLoss using custom indicator Prices
-
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.
-
I don't know, it looks that all of this is to be put in a custom block
The situation looks to special to be handled by the system blocks -
Ok, so let's say that i write the code in the custom block,which i want to return me the variable b = stopLoss.
1.In the BUY NOW/SELL NOW i have that options No Stop-loss,Fixed pips, % of take - profit, custom(price level), custom(pips), custom(price fraction).How can i use variable b as stopLoss?
2.Also the trendline objects in my chart D-hi, D-low ,D-open, D- PP, D- R1, D-R2, D-R3, D-S1, D-S2, D-S3 have specific prices,but there are no static,may change day to day.Writing only the nameS should read the prices which they have or should i do something more?