Hi all,
I'm trying to give an option of whether to use an ATR or a Manual pip value for the Take profit.
However if (Use_ATR) is false then the TP order is always placed at (apparently) the trade open price instead of a value Manual_Stop_Loss away from the open.
I'm a total beginner so any help would be appreciated.
Thank you.
El Choco
------------
if(Use_ATR)
tp_pips = NormalizeDouble(ATR*ATR_Multiple,Digits);
else
tp_pips = Manual_Take_Profit * Point;
double tp_long=NormalizeDouble(Ask + tp_pips,Digits);
double tp_short=NormalizeDouble(Bid - tp_pips,Digits);
-----------------------
I'm trying to give an option of whether to use an ATR or a Manual pip value for the Take profit.
However if (Use_ATR) is false then the TP order is always placed at (apparently) the trade open price instead of a value Manual_Stop_Loss away from the open.
I'm a total beginner so any help would be appreciated.
Thank you.
El Choco
------------
if(Use_ATR)
tp_pips = NormalizeDouble(ATR*ATR_Multiple,Digits);
else
tp_pips = Manual_Take_Profit * Point;
double tp_long=NormalizeDouble(Ask + tp_pips,Digits);
double tp_short=NormalizeDouble(Bid - tp_pips,Digits);
-----------------------