ERR_STRING_PARAMETER_EXPECTED 4062 String parameter expected. - page 2

 

But, the best would be, that if EA opens new order, when get a new trading signal. In order to I wouldn't open new order when my position has closed by stop.

Thanks for your cooperation!

 

Ok, it has already worked better. It opens new order, when there is no opened order. So the final exercise, that my EA open new order when gets new trading signal.

Thank you in anticipation!

p.s.:this is a good conversation with myself :D

 

It's just an attempt, but doesn't work....

   double MaPrevious;
   
   MaPrevious=iMA(NULL,0,MovingPeriod,0,MODE_EMA,PRICE_CLOSE,1);
   
//---- calculate open orders by current symbol
   if(Close[0]<MaPrevious && Close[0]>MaPrevious && CalculateCurrentOrders(Symbol())==0) CheckForOpen();
   else                                    CheckForClose();
Reason: