e-F5Diapazon





//+------------------------------------------------------------------+
//|                                Expert for Fractals5+Diapazon.mq4 |
//+------------------------------------------------------------------+
#property copyright "© Maloma"

extern double Lots      = 0.1;
extern int    SL        = 15;
extern int    TP        = 30;
extern double SARPeriod = 0.01;
       
       double SigUP=0, SigDN=0;
       double ParStat=0;
       int    CBars=0;
       int    magic=579345;
       double SAR;

void GetFractalSignal()
{
  
 if(High[3]>High[4] && High[3]>High[5] && High[3]>High[2] && High[3]>High[1])
  {SigUP=1;}
 else
  {SigUP=0;}
 
 if(Low[3]<Low[4] && Low[3]<Low[5] && Low[3]<Low[2] && Low[3]<Low[1])
  {SigDN=1;}
 else
  {SigDN=0;}
 
 return(0);
}

void Check4Close()
{
 int j=OrdersTotal();
 for (int i=j;i>=0;i--)
  {
   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
   if (Symbol()==OrderSymbol() && magic==OrderMagicNumber())
    if (OrderType()==OP_BUY && SigUP==1)
     OrderClose(OrderTicket(),OrderLots(),Bid,3,CLR_NONE);
    if (OrderType()==OP_SELL && SigDN==1)
     OrderClose(OrderTicket(),OrderLots(),Ask,3,CLR_NONE);
  }
 return(0);
}

void start()


{
// if (Period()!=15) {Comment("Ðàáîòàåì òîëüêî íà Ì15");return(1);}
 if (Bars==CBars) {return(2);}
 SAR=iSAR(Symbol(),0,SARPeriod,0.2,1);
 GetFractalSignal();
 Check4Close();
 if (SigUP==1 && SAR<Open[0]) OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-SL*Point,Ask+TP*Point,"e-F5S",magic,0,Green);
 if (SigDN==1 && SAR>Open[0]) OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+SL*Point,Bid-TP*Point,"e-F5S",magic,0,Red);
 CBars=Bars;
 return(0);
}



Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains open prices of each bar


Indicator Curves created:


Indicators Used:

Parabolic Stop and Reverse system


Custom Indicators Used:

Order Management characteristics:
Checks for the total of open orders

It Closes Orders by itself
It automatically opens orders when conditions are reached

Other Features:

BackTest : EURUSD on H1

From 2009-08-01 to 2009-10-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2009-12-01 to 2010-01-17 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-04-01 to 2010-04-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-05-01 to 2010-05-31 Profit Factor:0.00 Total Net Profit:0.00

BackTest : EURUSD on H1

From 2010-06-01 to 2010-06-30 Profit Factor:0.00 Total Net Profit:0.00

BackTest : GBPUSD on H1

From 2010-01-01 to 2010-02-27 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDCAD on H1

From 2009-12-01 to 2010-01-01 Profit Factor:0.00 Total Net Profit:0.00

BackTest : USDJPY on H1

From 2009-11-01 to 2009-11-30 Profit Factor:0.00 Total Net Profit:0.00

Request Backtest for e-F5Diapazon


From : (yyyy/mm/dd) To: (yyyy/mm/dd)

Pair: Period: