View Single Post
  #8 (permalink)  
Old 01-22-2009, 06:14 AM
wolfe's Avatar
wolfe wolfe is offline
Senior Member
 
Join Date: Jan 2006
Posts: 820
wolfe is on a distinguished road
Quote:
Originally Posted by pip thief View Post
another quick question for you. If i have an ea placing my trades but it doesn't have a feature that watches the spread in order to keep it out of the market during news flow, such as max spread = 3 any more dont trade. how would I go about doing that as I don't code and really don't use ea's but just trying something new. Once again I appreciate your help.
Something simple like this:

PHP Code:
extern int Max_Spread 3;

if (
MarketInfo(Symbol(),MODE_SPREAD) <= Max_Spread)
 {
  
//Your OrderSend() code here
 

If the current spread is less than or equal to your Max Spread, order will open. If greater than your Max Spread, it won't.
Reply With Quote