Author: Copyright � 2010,������ �.
Profit factor:
0.00
Price Data Components
Series array that contains the lowest prices of each barSeries array that contains the highest prices of each barSeries array that contains open prices of each bar
Orders Execution
It Closes Orders by itself Checks for the total of open ordersIt automatically opens orders when conditions are reached
0 Views
0 Downloads
0 Favorites
FiboAziat
//+------------------------------------------------------------------+
//|                       Ñîâåòíèê  FiboAziat.mq4                    |
//|                      Copyright © 2010,Ñåðãåé Ì.                  |
//|                      http://www.MOHCTP36@yandex.ru               |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010,Ñåðãåé Ì."
#property link      "http://www.MOHCTP36@yandex.ru"

extern int Bars1;
extern int Bars2;
extern double Lot = 0.1;   //--ëîò--//
extern double p=1;         //--óðîâåíü ôèáî îò àçèè ïîêóïêà--//
extern double p1=1;        //--óðîâåíü ôèáî îò àçèè ïðîäàæà--//
extern int v;


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {

   double l=iLow(NULL,0,1);
   double l1=iLow(NULL,0,2);
   double l2=iLow(NULL,0,3);
   double h=iHigh(NULL,0,1);
   double h1=iHigh(NULL,0,2);
   double h2=iHigh(NULL,0,3);
   double o=iOpen(NULL,0,0);
 
   OrderSelect(SELECT_BY_POS,MODE_TRADES); 
   if (Hour()>=21)  OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);
 
   if (Hour()==8)  v=0;
   if (Hour()==9)  v=1;
   if (Hour()==10)  v=2;
   if (Hour()==11)  v=3;
   if (Hour()==12)  v=4;
   if (Hour()==13)  v=5; 
   if (Hour()==14)  v=6;
   if (Hour()==15)  v=7;
   if (Hour()==16)  v=8;
   if (Hour()==17)  v=9;
   if (Hour()==18)  v=10;
   if (Hour()==19)  v=11;
   if (Hour()==20)  v=12;
   if (Hour()==21)  v=13;
    
   
   double max=High[iHighest(NULL,60,MODE_HIGH,8,v)];    
   double min=Low[iLowest(NULL,60,MODE_LOW,8,v)];
  
   
                             //-----íà ïðîäàæó-------//
  
   OrderSelect(SELECT_BY_POS,MODE_TRADES);
   double TpS=min-(max-min)*p;
   if ((Hour()>=9&&Hour()<21)&&(o<min&&o>TpS&&l>TpS&&l1>TpS&&l2>TpS)&&OrdersTotal()<1)
  {
   if (Bars1!=Bars)
  {      
   OrderSend(Symbol(),OP_SELL,Lot,Bid,5,max,TpS,"max",11111,0,Aqua);
    
   Bars1=Bars;
  }}
                     //-----------óñëîâèå íà ïîêóïêó---------//
  
   OrderSelect(SELECT_BY_POS,MODE_TRADES); 
   double TpB=max+(max-min)*p1;
   if ((Hour()>=9&&Hour()<21)&&(o>max&&o<TpB&&h<TpB&&h1<TpB&&h2<TpB)&&(OrdersTotal()<1))
  {
   if (Bars2!=Bars)
  { 
   OrderSend(Symbol(),OP_BUY,Lot,Ask,5,min,TpB,"îðäåð ¹",11111,0,Aqua);
    
   Bars2=Bars;
  }}

  
   return(0);
  }
//+------------------------------------------------------------------+

Comments