When passing values for slippage into OrderClose do adjustments need to be made for brokers with different digits? So for a four digit broker I would pass '3' for example, but for a five digits this would be '30'?
- Simple Solution for Requotes?
- error 138 in backtesting, please take a look into this code
- 4/5 digit broker question.
WBC
Thats correct
void HandleDigits() { // Automatically handles full-pip and sub-pip accounts if (Digits == 4 || Digits == 2) { Real.Slippage = Slippage; } if (Digits == 5 || Digits == 3) { Real.Slippage = Slippage*10; } }
Use Real.Slippage in your OrderSend
Good Luck
-BB-
Of course if your EA is multi-currency, you would use MarketInfo to get the digits of the pair of interest if its not the chart pair
Just because the broker is 'sub-pip' does not guarantee all pairs are quoted in sub-pips...
In particular, where a broker has changed their minimum MODE_LOTSTEP, you may have a mixture of full & sub-pip pairs...
FWIW
-BB-
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register