Chart Live

Code Indikator EA



Parabolic SAR


double SAR1=iSAR(NULL,0,Step,Maximum,i+1);
double SAR2=iSAR(NULL,0,Step,Maximum,i);
 
// Open buy
 if((iSAR(NULL, 0,Step,Maximum, 0)<iClose(NULL,0,0))&&(iSAR(NULL, 0,Step,Maximum, 1)>iClose(NULL,0,1))&&(TradeTimeOk==1)&&(halt1!=1)){
 int openbuy=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"PSAR trader buy order",MagicNumber1,0,Blue);
 if(CloseOnOpposite==true)closesell=1;
 }


// Open sell
 if((iSAR(NULL, 0,Step,Maximum, 0)>iClose(NULL,0,0))&&(iSAR(NULL, 0,Step,Maximum, 1)<iClose(NULL,0,1))&&(TradeTimeOk==1)&&(halt2!=1)){
 int opensell=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,"PSAR trader sell order",MagicNumber2,0,Green);
 if(CloseOnOpposite==true)closebuy=1;
 }


Simple Moving Averge
   OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES);
   if(OrdersHistoryTotal()==0)                                                                 {
   if(OrdersTotal()<MaxOrders)                                                                 {
   if(iMA(NULL,0,1,0,MODE_SMMA,PRICE_CLOSE,2)<(iMA(NULL,0,200,0,MODE_SMMA,PRICE_CLOSE,2)))     { 
   if(iMA(NULL,0,1,0,MODE_SMMA,PRICE_CLOSE,1)>(iMA(NULL,0,200,0,MODE_SMMA,PRICE_CLOSE,1)))     {
   if(Bars>BarsCount) 

RSI
 double RSInow=iRSI(NULL,0,RSIperiod,AppliedPrice,0);
 double RSIlast=iRSI(NULL,0,RSIperiod,AppliedPrice,1);
 double RSIprev=iRSI(NULL,0,RSIperiod,AppliedPrice,2);

Envelopes
myOrderType=3;
 
if ((iEnvelopes(NULL, NULL,15,MODE_SMA,0,PRICE_CLOSE,DeviasiEnvelope,MODE_LOWER,0) > Open[0]) && (iEnvelopes(NULL, NULL,15,MODE_SMA,0,PRICE_CLOSE,DeviasiEnvelope,MODE_LOWER,0) < Bid)) { myOrderType=2; }
      if ((iEnvelopes(NULL, NULL,15,MODE_SMA,0,PRICE_CLOSE,DeviasiEnvelope,MODE_UPPER,0) < Open[0]) && (iEnvelopes(NULL, NULL,15,MODE_SMA,0,PRICE_CLOSE,DeviasiEnvelope,MODE_UPPER,0) > Bid)) { myOrderType=1; }
      

MACD
if (iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0)>iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) { myOrderType=2; }
      //if (iMACD(14,26,9,MODE_MAIN,0)<0 and iMACD(14,26,9,MODE_MAIN,0)<iMACD(14,26,9,MODE_MAIN,1)) then OrderType=1;
If iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0)<iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) { myOrderType=1; }
   }

Candle
if(iOpen(NULL,0,1)<iClose(NULL,0,1)) int BarOneUp=1;
 if(iOpen(NULL,0,1)>iClose(NULL,0,1)) int BarOneDown=1;
 
 if(iHigh(NULL,0,2)<iClose(NULL,0,2)) int BarTwoUp=1;
 if(iHigh(NULL,0,2)>iClose(NULL,0,2)) int BarTwoDown=1;
 
 if(iOpen(NULL,0,3)<iClose(NULL,0,3)) int BarThreeUp=1;
 if(iOpen(NULL,0,3)>iClose(NULL,0,3)) int BarThreeDown=1;
 
 if(iClose(NULL,0,4)<iClose(NULL,0,4)) int BarFourUp=1;
 if(iClose(NULL,0,4)>iClose(NULL,0,4)) int BarFourDown=1;

MFI
if(iMFI(NULL,0,14,0)<iMFI(NULL,0,14,20)

Desain Ea http://www.forexeadvisor.com
 

Ame Suzako

No comments:

Post a Comment