Is it possible to make an EA that will not make a trade despite all the requirements being fulfilled because the spread widens? This would prevent being stopped out for some reason like news or stop hunting.
- Floating spread or fixed spread ?
- Spread in MT5
- FOREX - Trends, forecasts and implications
Yes, it is possible
monitor MarketInfo(Symbol(), MODE_SPREAD)
... or
spread = Ask - Bid
before taking action. You wouldn't want to have a stoploss set on the server in this case.
Spread = (Ask-Bid)*10000;
if (Spread > 20 )
{
Spread = Spread/100;
}
if (Spread > 20 )
{
Spread = Spread/100;
}
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