Prevent Large Slippage With Metatrader 5 EA

 
Hi,

Do any members have any tips to prevent major slippage during times of low liquidity or high volatility? I am developing an EA for scalping and running into issues with large slippage during certain times of the day. I would like to prevent trades that are more apt to slippage. 

I don't think the slippage filter or deviation filter work with my broker as I have tested both functions. I am thinking of implementing a vwap filter but not sure if a vwap filter would work. Any other ideas would be helpful.

-Brad
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
Predefined Macro Substitutions - Named Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

On what market ?

To open or to close ?

What slippage or deviation filter are you talking about ?

 
Alain Verleyen:

On what market ?

To open or to close ?

What slippage or deviation filter are you talking about ?

On what market? FX Majors

To open or to close? Open

What slippage or deviation filter are you talking about? 

https://www.metatrader5.com/en/mobile-trading/android/help/trade/positions_manage/open_positions/position_instant#deviation

Instant Execution - Opening and Closing Positions - MetaTrader 5 Android Help
Instant Execution - Opening and Closing Positions - MetaTrader 5 Android Help
  • www.metatrader5.com
In this execution mode , a market order is filled at the price offered to the broker. The mobile platform automatically inserts current prices in...
 
Brad Penn:

On what market? FX Majors

To open or to close? Open

What slippage or deviation filter are you talking about? 

https://www.metatrader5.com/en/mobile-trading/android/help/trade/positions_manage/open_positions/position_instant#deviation

This slippage/deviation only works on Market maker brokers.

You can try limit orders.

Reason: