disable trading if spread is too wide

 
How can I disable trading if spread is too wide?
 

Before your EA trades, get it to check 

SymbolInfoInteger(Symbol(),SYMBOL_SPREAD)
 
ycomp: How can I disable trading if spread is too wide?
  1. Get the spread
  2. Compare against "too wide"
  3. Ignore the tick.
What's the problem?
if( SymbolInfoInteger(Symbol(),SYMBOL_SPREAD) > 50 )
if(        MarketInfo(Symbol(),  MODE_SPREAD) > 50 )
if( Ask - Bid                                 > 50 * _Point)
if( Ask - Bid                                 >  5 * pips2dbl)
 
WHRoeder:
ycomp: How can I disable trading if spread is too wide?
  1. Get the spread
  2. Compare against "too wide"
  3. Ignore the tick.
What's the problem?

ah, sorry I wasn't specific enough...

I meant I wanted to know how to disable manual trading. Kind of like to prevent stupid costly mistakes that I've done a few times, like entering a trade when it is much wider than normal.

 

Show both the ask and bid lines on your chart.

Show the spread in Comment().

Draw a large colored OBJ_LABEL displaying the spread or a message "No trades!"

Add buttons to your chart to place your trades, rather than the usual interface. Code the spread check into those.

Lots of possibilities. 

 
Hand build guides are just nice to have. :)
Reason: