Download MetaTrader 5

Max spread for EA

To add comments, please log in or register
sami awan
79
sami awan  
I want my EA to enter trades only when spread is below 2 pips. What parameter i should use?
Carl Schreiber
6691
Carl Schreiber  
Ask-Bid or read about MarketInfo(,MODE_SPREAD)
honest_knave
Moderator
2431
honest_knave  
int maxspread = 20; // maximum spread in POINTS

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