The unit for Slippage is points. In your OrderSend(..., 3, ...) the 3 is in pips and must also be converted.

Why convert pips to points with all the over head of a function call and then multiply by Point to create a double. One multiply is sufficient:

//++++ 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

Function pips2Points()User Input ParametersImplementationint ticket = OrderSend(Symbol(), OP_BUY, 1, Ask, 3, Ask-sl, Ask+tp);

Original Article: http://kolier.li/example/how-make-ea-auto-fits-4-5-6-and-any-digits-form-platforms-unit-pips