Candlesitck above averege

Back to topics list To post a new topic, please log in or register
avatar
41
KeepMarcos 2016.02.10 19:02
 

Heey. This forum is GREAT!!!! Tanks Brothers!
I'm new to MQL, and I'm a big doubt.
the code below inserts a market order if the sale price and the purchase is above or below the average.
I would like to know how to make a candle is above or below average send the order. 

 Sorry if there are gross errors of English!

 

MA=iMA(NULL,0,MA,0,MODE_EMA,PRICE_CLOSE,0);

  if(OrdersTotal()<4)
     {

      if(Bid<MA)
        {;
         OrderSend(Symbol(),OP_SELL,Lots,Bid,10,0,0);
         CurrentOrder++;
           } else if(Ask>MA){
         OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0);
         //CurrentOrder++;
        }

 

avatar
125
zirkoner 2016.02.12 12:26 #
 
KeepMarcos:

Heey. This forum is GREAT!!!! Tanks Brothers!
I'm new to MQL, and I'm a big doubt.
the code below inserts a market order if the sale price and the purchase is above or below the average.
I would like to know how to make a candle is above or below average send the order. 

 Sorry if there are gross errors of English!

 

 


MA=iMA(NULL,0,MA,0,MODE_EMA,PRICE_CLOSE,0);

if(OrdersTotal()<4)
  {
   if(High[0]<MA)
     {
      OrderSend(Symbol(),OP_SELL,Lots,Bid,10,0,0);
      CurrentOrder++;
     }
   else if(Low[0]>MA)
     {
      OrderSend(Symbol(),OP_BUY,Lots,Ask,10,0,0);
      //CurrentOrder++;
     }
  }
avatar
41
KeepMarcos 2016.02.14 05:07 #
 
zirkoner:

Thanks Sr!!!!
Back to topics list  

To add comments, please log in or register