Prevent SL to trigger during wide spread

 

Hi experts :)

I'm rather new to MT5, so I have limited knowhow.

I'm running an EA, which placed orders incl. TP and SL (all good). However, during marked closure - or that very volatile hour - my broker has high spreads (e.g. 29 pips on EURGBP), which sometimes triggers my SL "unwantedly". Meaning: I lose my trade to SL, due to wide spreads during that hour.

Is there a smart way, by code, or by a known EA, to prevent MT5 to take those SL-trades, when the spread is wide? - Or even simply during that particular hour during the day?

 
OK_Den:

Hi experts :)


I'm rather new to MT5, so I have limited knowhow.

I'm running an EA, which placed orders incl. TP and SL (all good). However, during marked closure - or that very volatile hour - my broker has high spreads (e.g. 29 pips on EURGBP), which sometimes triggers my SL "unwantedly". Meaning: I lose my trade to SL, due to wide spreads during that hour.

Is there a smart way, by code, or by a known EA, to prevent MT5 to take those SL-trades, when the spread is wide? - Or even simply during that particular hour during the day?

Hi Den, 

I am new to Forex (& CFD) world as well but just to think, how about you remove your SL just before that market close hour  & bring it back after that hour passes ? 

 
OK_Den:

Hi experts :)


I'm rather new to MT5, so I have limited knowhow.

I'm running an EA, which placed orders incl. TP and SL (all good). However, during marked closure - or that very volatile hour - my broker has high spreads (e.g. 29 pips on EURGBP), which sometimes triggers my SL "unwantedly". Meaning: I lose my trade to SL, due to wide spreads during that hour.

Is there a smart way, by code, or by a known EA, to prevent MT5 to take those SL-trades, when the spread is wide? - Or even simply during that particular hour during the day?

by virtual sl ea or script, but you need to have a mt5 open while the trades are open, or the ea or script will not work.

OR do as @SD_Aus suggested.

 
Michael Charles Schefe #:

by virtual sl ea or script, but you need to have a mt5 open while the trades are open, or the ea or script will not work.

OR do as @SD_Aus suggested.

MT5 is running on a VPS, so it's always online.

Might anyone have knowlegde of such script or EA being available to block SL-losses, of offset SL, during XY-time range during the day?

 
If it’s your own code you can always add that function. Remove stoploss on open order if spread is bigger then xxx
 
OK_Den #:

MT5 is running on a VPS, so it's always online.

Might anyone have knowlegde of such script or EA being available to block SL-losses, of offset SL, during XY-time range during the day?

search codebase, there are a few eas there that do that.

 
OK_Den: I'm running an EA, which placed orders incl. TP and SL (all good). However, during marked closure - or that very volatile hour - my broker has high spreads (e.g. 29 pips on EURGBP), which sometimes triggers my SL "unwantedly". Meaning: I lose my trade to SL, due to wide spreads during that hour. Is there a smart way, by code, or by a known EA, to prevent MT5 to take those SL-trades, when the spread is wide? - Or even simply during that particular hour during the day?


The "smart" way is to close out your trades before known periods of high volatility or low liquidity. It is "not smart" to remove or widen stops.

Closing out can also save you on swap-costs for end-of-day roll-over.

Then after that specific period is over, re-evaluate the trade setup based on your strategy and trading rules.

 
Michael Charles Schefe #:

search codebase, there are a few eas there that do that.

Could you maybe refer me to such EA ?:)
 
You could make the SL constantly move below the bid during when the spread is high. It's a creative solution


If spread >= 20, SL = bid - offset