ordersend and orderclose slippage

 

If I put slippage of let's say 10, what does it mean with a 5 digit broker and what does it mean with a 4 digit broker?

My guess is that with 5 digit broker, it's a slippage of 0.00001 and with 4 digit, it's 0.0001, but is that really so?

 

nope

5 digits: 0.00010

4 digits: 0.0010

 
You must adjust TP, SL, and slippage for 5 digit brokers
//++++ 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