Quote:
|
Originally Posted by jdun
Could someone tell me the code for stop loss and tp. I need to add it to this EA.
|
jdun,
The code of SL & TP has already written in this EA:
Look at these lines:
PHP Code:
if (Symbol()=="GBPUSD") {
PipsForEntry= 13;
TrailingStop = 40;
TakeProfit = 45;
InitialStopLoss=33;
} else if (Symbol()=="EURUSD") {
PipsForEntry= 13;
TrailingStop = 30;
TakeProfit = 45;
InitialStopLoss=23;
} else if (Symbol()=="USDCHF") {
PipsForEntry= 13;
TrailingStop = 30;
TakeProfit = 45;
InitialStopLoss=15;
} else {
PipsForEntry= 13;
TrailingStop = 30;
TakeProfit = 45;
InitialStopLoss=30;
}
If you want to make SL & TP external variables which you can set, you have to comment the above lines of code and uncomment these lines:
PHP Code:
/*
extern int PipsForEntry= 5;
extern double TrailingStop = 40;
extern double TakeProfit = 120;
extern double InitialStopLoss=50;
*/