Ea spred and 1 position

 
I need to place in the robot opening positions when the spread is less than 15 points and opening only one position at a time and on one signal or one for 20 minutes
 
Lukasz Pawel Staniszewski:
I need to place in the robot opening positions when the spread is less than 15 points and opening only one position at a time and on one signal or one for 20 minutes

do it then....

 
Lukasz Pawel Staniszewski:
I need to place in the robot opening positions when the spread is less than 15 points and opening only one position at a time and on one signal or one for 20 minutes
int spread_points=(int)MathRound(spread/SymbolInfoDouble(Symbol(),SYMBOL_POINT));
{if (spread_points < 15)
 m_trade.Sell(Lotsize,m_symbol.Name(),Bid,0,0,NULL); // To open sell position                 
 m_trade.Buy(Lotsize,m_symbol.Name(),Ask,0,0,NULL);  // To open buy position
 }
// Note: I have not compiled/test this yet but I think it should work.