Download MetaTrader 5

where is my error code?

To add comments, please log in or register
Download MetaTrader 5 and start trading today!
tito78
22
tito78 2016.11.26 23:21 

hello friends, I am not very good, but I try

where is my error in this  code?


double iMA = iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0);-
       if( OrdersTotal() == 0 )
         {
         if( Ask > iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0) Open_Order( OP_BUY,  lot );
         if( Bid < iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0) Open_Order( OP_SELL, lot ); 

         }



thank you

Yerlan Imangeldinov
1030
Yerlan Imangeldinov 2016.11.26 23:43  
double MA= iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0);
       if( OrdersTotal() == 0 )
         {
         if( Ask > iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0) Open_Order( OP_BUY,  lot );
         if( Bid < iMA(NULL,0,1,2,MODE_SMA,PRICE_OPEN,0) Open_Order( OP_SELL, lot );  

         }
whroeder1
14470
whroeder1 2016.11.27 00:49  
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
  3. where is my error in this  code?
    "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
To add comments, please log in or register