Download MetaTrader 5

Max spread for EA

To add comments, please log in or register
Find out the most discussed Forum topics. Have a look at the Wall section!
sami awan
79
sami awan 2016.07.19 21:20 
I want my EA to enter trades only when spread is below 2 pips. What parameter i should use?
Carl Schreiber
6591
Carl Schreiber 2016.07.20 05:54  
Ask-Bid or read about MarketInfo(,MODE_SPREAD)
honest_knave
Moderator
2213
honest_knave 2016.07.20 10:52  
int maxspread = 20; // maximum spread in POINTS

if(SymbolInfoInteger(NULL,SYMBOL_SPREAD) <= maxspread && ...
To add comments, please log in or register