adding a zero on the end of each take profit and stop would be a solution if you can't code it
also, u may need to send the order withouut TP & SL & use OrderModify() for SL & TP
I found 100 pips a day expert advisor by Metaquotes and it works great, except with 5 digit brokers. Would anyone be willing to code it for a 5 digit broker?
Here is the location where I downloaded it: https://www.mql5.com/go?link=http://www.fxstreet.com/metatrader/addons/ccde1717-6b80-4679-8fe2-639a8ee28547
Thank you! I very much appreciate it.
Sherry
The performance of the EA seems good, as shown in the picture:
However,
the EA has no protective stop loss at all. Each trade goes on
indefinitely loosing until it reaches the profit level, at which the
trailing stop starts working.
Adding a variation of 3% in price as stop loss (that is, for a buy
stop_loss= Ask – 0.03*Ask), and setting the lot to the minimum possible,
the result is as shown in the picture:
AB.
//++++ These are adjusted for 5 digit brokers. double pips2points, // slippage 3 pips 3=points 30=points pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
You need to modify TP, SL and slippage.
can u please tell me were to paste this code in ea
Would anyone be willing to code this EA to work at Smart Trade FX?
Here is the location where I downloaded it: https://www.mql5.com/go?link=http://www.fxstreet.com/metatrader/addons/ccde1717-6b80-4679-8fe2-639a8ee28547
Thank you! I very much appreciate it.
Sherry
extern double Lots = 0.01;
// int init
double gdPoint;
int init()
{
//----
gdPoint = Point;
// check if we are on a 5 digit broker
if(Digits==3||Digits==5){
gdPoint = gdPoint*10;
Slippage =Slippage*10;
lTrailingStop= lTrailingStop*10;
}
//----
return(0);
}
put this in the ea from the line extern double Lots = 5;
so you replace this line with the new line at the top of this code
and that will load on any broker
extern double Lots = 0.01;
// int init
double gdPoint;
int init()
{
//----
gdPoint = Point;
// check if we are on a 5 digit broker
if(Digits==3||Digits==5){
gdPoint = gdPoint*10;
Slippage =Slippage*10;
lTrailingStop= lTrailingStop*10;
}
//----
return(0);
}
put this in the ea from the line extern double Lots = 5;
so you replace this line with the new line at the top of this code
and that will load on any broker
and to add on you may need to replace Point with gdPoint every where in the code
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Would anyone be willing to code this EA to work at Smart Trade FX?
Here is the location where I downloaded it: https://www.mql5.com/go?link=http://www.fxstreet.com/metatrader/addons/ccde1717-6b80-4679-8fe2-639a8ee28547
Thank you! I very much appreciate it.
Sherry