Author: FORTRADER.RU
Profit factor:
0.87
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reachedIt can change open orders parameters, due to possible stepping strategyIt Closes Orders by itself
Indicators Used
MACD HistogramMoving average indicatorMovement directional index
8 Views
0 Downloads
0 Favorites
HarVesteR
#property copyright "FORTRADER.RU"
#property link      "http://FORTRADER.RU"

/*

Ïîäðîáíîå îïèñàíèå ïàðàìåòðîâ ñîâåòíèêà äîñòóïíî â íîìåðå æóðíàëà îò 26 Ìàÿ 2008, 
ïðåäëîæåíèÿ è îòçûâû ìû áóäåì ðàäû âèäåòü â íàøåé ýëåêòðîïî÷òå: letters@fortrader.ru
http://www.fortrader.ru/arhiv.php

A detailed description of the parameters adviser available issue of the journal dated May 26 2008, 
suggestions and feedback we will be glad to see in our e-mail: letters@fortrader.ru
http://www.fortrader.ru/arhiv.php

*/




extern string x="Íàñòðîéêè MACD:";
extern int FastEMA = 12;
extern int SlowEMA = 24;
 int SignalEMA = 9;
extern int predel = 6;
extern string x1="Íàñòðîéêè MA:";
extern int SMA1 = 50;
extern int SMA2 = 100;
extern int otstup = 10; 
extern string x2="Çíà÷åíèå áàðîâ äëÿ ðàñ÷åòà Ñòîï-Ëîññ :";
extern int stoplossbars = 6;
extern string x3="Êîýôôèöèåíò äëÿ ðàñ÷åòà ïðîôèò óðîâíÿ è çàêðûòèÿ ïîëîâèíû ïîçèöèé:";
extern int pprofitum = 2;
extern string x4="ôèëüòð ïî ADX:";
extern int enable = 0;
extern int periodADX = 14;

extern double Lots=1;

datetime Bar;int buy,sell,i,a,b;double stoploss,setup2,adx,okbuy,oksell;

int start()
  {

     buy=0;sell=0;
     for(  i=0;i<OrdersTotal();i++)
         {
           OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
           if(OrderType()==OP_BUY){buy=1;}
           if(OrderType()==OP_SELL){sell=1;}
         }   
   
   //çàãðóæàåì èíäèêàòîðû
   double macd =iMACD(NULL,0,FastEMA,SlowEMA,SignalEMA,PRICE_CLOSE,MODE_MAIN,1);
   double sma1 =iMA(NULL,0,SMA1,0,MODE_SMA,PRICE_CLOSE,1);
   double sma2 =iMA(NULL,0,SMA2,0,MODE_SMA,PRICE_CLOSE,1);
   
   if(Close[1]<sma2){okbuy=1;}
    if(Close[1]>sma2){oksell=1;}
    
   if(enable==1)
   {
   adx=iADX(NULL,0,14,PRICE_CLOSE,MODE_MAIN,0);
   }else{adx=60;}
   
   

  
  if(Close[1]+otstup*Point>sma1 && Close[1]+otstup*Point>sma2 && macd>0 && buy==0)
  {
  
      buy=0;
      for( i=predel;i>0;i--)
      {
      macd=iMACD(NULL,0,FastEMA,SlowEMA,SignalEMA,PRICE_CLOSE,MODE_MAIN,i);
      if(macd<0){buy=2;}
      }
   
      if(buy==2 && adx>50 && okbuy==1)
      {okbuy=0;
          double stoploss=Low[iLowest(NULL,0,MODE_LOW,stoplossbars,1)];
          OrderSend(Symbol(),OP_BUY,Lots,Ask,3,stoploss,0,0,16385,0,Green);
          a=0;
       }
   }
   
   if(Close[1]-otstup*Point<sma1 && Close[1]-otstup*Point<sma2 && macd<0 && sell==0)
  {
  
      sell=0;
      for( i=predel;i>0;i--)
      {
      macd=iMACD(NULL,0,FastEMA,SlowEMA,SignalEMA,PRICE_CLOSE,MODE_MAIN,i);
      if(macd>0){sell=2;}
      }
   
      if(sell==2 && adx>50 && oksell==1)
      {oksell=0;
        
           stoploss=High[iHighest(NULL,0,MODE_HIGH,stoplossbars,1)];
          OrderSend(Symbol(),OP_SELL,Lots,Bid,3,stoploss,0,0,16385,0,White);
          b=0;
       }
   }
   
   
   if(buy==2 || buy==1)
   {
    for( i=0;i<OrdersTotal();i++)
         {
           OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
          
           
           if(OrderType()==OP_BUY )
           {  
           double setup2=OrderOpenPrice()+((OrderOpenPrice()-OrderStopLoss())*pprofitum);

            if(Close[1]>setup2 && a==0)
            {
             OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,White);
              OrderClose(OrderTicket(),OrderLots()/2,Bid,3,Violet); 
             
              a=1;
            }
            
            if(a==1 && sma1> Close[1]-otstup*Point)
            {
            OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); 
            }
            
           
           }
      }  
        
  }    
  
           if(sell==2 || sell==1)
   {
    for( i=0;i<OrdersTotal();i++)
         {
           OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
           
           
           if(OrderType()==OP_SELL )
           {  
            setup2=OrderOpenPrice()-((OrderStopLoss()-OrderOpenPrice())*pprofitum);

            if(Close[1]<setup2 && b==0)
            {
             OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,White);
              OrderClose(OrderTicket(),OrderLots()/2,Ask,3,Violet); 
              b=1;
            }
            
            if(b==1 && Close[1]-otstup*Point> sma1)
            {
            OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); 
            
            }
            
           
           }
      } 
      }
  
    
   
   
   

   return(0);
  }

Profitability Reports

NZD/USD Jul 2025 - Sep 2025
1.55
Total Trades 43
Won Trades 27
Lost trades 16
Win Rate 62.79 %
Expected payoff 46.16
Gross Profit 5616.00
Gross Loss -3631.00
Total Net Profit 1985.00
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
1.36
Total Trades 34
Won Trades 17
Lost trades 17
Win Rate 50.00 %
Expected payoff 65.69
Gross Profit 8502.50
Gross Loss -6269.00
Total Net Profit 2233.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.41
Total Trades 44
Won Trades 13
Lost trades 31
Win Rate 29.55 %
Expected payoff -126.18
Gross Profit 3869.08
Gross Loss -9421.09
Total Net Profit -5552.01
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.88
Total Trades 50
Won Trades 20
Lost trades 30
Win Rate 40.00 %
Expected payoff -19.01
Gross Profit 6966.13
Gross Loss -7916.86
Total Net Profit -950.73
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
1.59
Total Trades 46
Won Trades 29
Lost trades 17
Win Rate 63.04 %
Expected payoff 66.72
Gross Profit 8241.00
Gross Loss -5172.00
Total Net Profit 3069.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.81
Total Trades 260
Won Trades 27
Lost trades 233
Win Rate 10.38 %
Expected payoff -4.80
Gross Profit 5488.50
Gross Loss -6737.50
Total Net Profit -1249.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.69
Total Trades 41
Won Trades 20
Lost trades 21
Win Rate 48.78 %
Expected payoff -50.13
Gross Profit 4500.50
Gross Loss -6556.00
Total Net Profit -2055.50
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.55
Total Trades 26
Won Trades 7
Lost trades 19
Win Rate 26.92 %
Expected payoff -158.48
Gross Profit 5060.50
Gross Loss -9181.00
Total Net Profit -4120.50
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.68
Total Trades 32
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -70.39
Gross Profit 4684.50
Gross Loss -6937.00
Total Net Profit -2252.50
-100%
-50%
0%
50%
100%

Comments