MA.S.R_Trading_02

Author: FORTRADER.RU
Profit factor:
3213.59
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 strategy
Indicators Used
Moving average indicator
11 Views
0 Downloads
0 Favorites
MA.S.R_Trading_02
//+------------------------------------------------------------------+
//|                                            MA.S.R_Trading_02.mq4 |
//|                                                     FORTRADER.RU |
//|                                          http://www.fortrader.ru |
//+------------------------------------------------------------------+
#property copyright "FORTRADER.RU"
#property link      "http://www.fortrader.ru"

double maximum[100000];
double minimum[100000];
int l,m,flopen,b,s,total,cnt,flopens;
extern int perma=5;
extern int maxi_per=5;
extern int mini_per=5;


int start()
  {
    total=OrdersTotal();
       b=0;s=0;
      for(cnt=0;cnt<total;cnt++)
         {
           OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
            if(OrderType()==OP_BUY)
            { b=1;}
          if(OrderType()==OP_SELL)
            { s=1;}
          }  
  /*--------------------------------------------------*/        
          
  
      double ma1=iMA(NULL,0,perma,0,MODE_SMA,PRICE_CLOSE,1);
      double ma2=iMA(NULL,0,perma,0,MODE_SMA,PRICE_CLOSE,2);
      double ma3=iMA(NULL,0,perma,0,MODE_SMA,PRICE_CLOSE,3);
      
      if(ma1<ma2 && ma2>ma3)
      {
      maximum[m]=High[iHighest(NULL,0,MODE_HIGH,maxi_per,1)];
      m++;  
      }
      
      if(ma1>ma2 && ma2<ma3)
      {
      minimum[l]=Low[iLowest(NULL,0,MODE_LOW,mini_per,1)];
      l++;  
      }
      
      if(ma1<ma2 && ma2>ma3 && s==0)
      {
      OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"",Green);
      }
      
       if(ma1>ma2 && ma2<ma3 && b==0)
      {
      OrderSend(Symbol(),OP_BUY,0.1,Bid,3,0,0,"",Red);
      }

      
         for(int cnt=0;cnt<OrdersTotal();cnt++)
        {
          OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
           if(OrderType()==OP_SELL)
           {
              if(maximum[m-1]>Close[1])
              {
              OrderModify(OrderTicket(),OrderOpenPrice(),maximum[m-1],0,0,Yellow);
              }
              else{m--;}
           }
              
           if(OrderType()==OP_BUY)
           {
              if(minimum[l-1]<Close[1])
              {
              OrderModify(OrderTicket(),OrderOpenPrice(),minimum[l-1],0,0,Yellow);
              }else{l--;} 
            }     
       }
        
   return(0);
}

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
0.66
Total Trades 105
Won Trades 5
Lost trades 100
Win Rate 4.76 %
Expected payoff -1.41
Gross Profit 293.05
Gross Loss -441.36
Total Net Profit -148.31
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.47
Total Trades 133
Won Trades 7
Lost trades 126
Win Rate 5.26 %
Expected payoff -2.48
Gross Profit 291.26
Gross Loss -620.93
Total Net Profit -329.67
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.13
Total Trades 199
Won Trades 4
Lost trades 195
Win Rate 2.01 %
Expected payoff -2.41
Gross Profit 72.36
Gross Loss -551.51
Total Net Profit -479.15
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.71
Total Trades 121
Won Trades 14
Lost trades 107
Win Rate 11.57 %
Expected payoff -0.89
Gross Profit 267.40
Gross Loss -375.30
Total Net Profit -107.90
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.88
Total Trades 93
Won Trades 5
Lost trades 88
Win Rate 5.38 %
Expected payoff -0.49
Gross Profit 338.20
Gross Loss -383.80
Total Net Profit -45.60
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.20
Total Trades 236
Won Trades 5
Lost trades 231
Win Rate 2.12 %
Expected payoff -3.47
Gross Profit 201.57
Gross Loss -1020.16
Total Net Profit -818.59
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.12
Total Trades 544
Won Trades 13
Lost trades 531
Win Rate 2.39 %
Expected payoff -9.57
Gross Profit 678.08
Gross Loss -5881.48
Total Net Profit -5203.40
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
70671.78
Total Trades 444
Won Trades 310
Lost trades 134
Win Rate 69.82 %
Expected payoff 71466.62
Gross Profit 31731628.50
Gross Loss -449.00
Total Net Profit 31731179.50
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.26
Total Trades 454
Won Trades 16
Lost trades 438
Win Rate 3.52 %
Expected payoff -1.66
Gross Profit 264.20
Gross Loss -1018.10
Total Net Profit -753.90
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
3.09
Total Trades 88
Won Trades 3
Lost trades 85
Win Rate 3.41 %
Expected payoff 7.49
Gross Profit 975.11
Gross Loss -316.05
Total Net Profit 659.06
-100%
-50%
0%
50%
100%

Comments