if (Point == 0.00001 || Point == 0.001) { sqMaxEntrySlippage *= 10; StopLoss *= 10; TakeProfit *= 10; // And so on }
Subject changed from Cannot configure MaxSlippage to Cannot configure MaxSlippage, for 5-digit brokers
i have made changes in the template, so i have right in the MQL code ZERO slippage
but i think, its already set up in pips, not sure...
//+------------------------------------------------------------------+
// -- SQ internal variables
// add word "extern" in front of the variable you want
// to make configurable
//+------------------------------------------------------------------+
int sqMaxEntrySlippage = 0; //zero means unlimited slippage
int sqMaxCloseSlippage = 0; //zero means unlimited slippage
These are declared as int, assigned value in pips but OrderSend expects in Points. For 4-digit brokers, value in pips == value in Points. But for 5-digit brokers, Point is 0.1 pip
Status changed from New to Fixed
int sqMaxEntrySlippage = 5; //Max tolerated entry slippage in pips. Zero means unlimited slippage int sqMaxCloseSlippage = 0; //Max tolerated close slippage in pips. Zero means unlimited slippage bool autoCorrectMaxSlippage = true; //If set to true, it will automatically adjust max slippage according to symbol digits (*10 for 3 and 5 digit symbols)
This behaviour could be turned off by setting autoCorrectMaxSlippage = false.
If you want to be able to alter max slippage settings right in EA parameters, just add the word "extern" before the variable declaration (or "input" if you are using MT5).