MA.S.R_Trading

Author: FORTRADER.RU
Profit factor:
4561.09
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
8 Views
1 Downloads
0 Favorites
MA.S.R_Trading
//+------------------------------------------------------------------+
//|                                               MA.S.R_Trading.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;


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,10,1)];
      m++;  
      }
      
      if(ma1>ma2 && ma2<ma3)
      {
      minimum[l]=Low[iLowest(NULL,0,MODE_LOW,10,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/CAD Jul 2025 - Sep 2025
0.08
Total Trades 133
Won Trades 3
Lost trades 130
Win Rate 2.26 %
Expected payoff -3.54
Gross Profit 39.20
Gross Loss -510.21
Total Net Profit -471.01
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
1.01
Total Trades 47
Won Trades 5
Lost trades 42
Win Rate 10.64 %
Expected payoff 0.05
Gross Profit 315.10
Gross Loss -312.60
Total Net Profit 2.50
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.15
Total Trades 254
Won Trades 3
Lost trades 251
Win Rate 1.18 %
Expected payoff -3.44
Gross Profit 157.99
Gross Loss -1030.53
Total Net Profit -872.54
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
77498.83
Total Trades 426
Won Trades 367
Lost trades 59
Win Rate 86.15 %
Expected payoff 89086.12
Gross Profit 37951177.00
Gross Loss -489.70
Total Net Profit 37950687.30
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.30
Total Trades 112
Won Trades 8
Lost trades 104
Win Rate 7.14 %
Expected payoff -2.82
Gross Profit 135.00
Gross Loss -450.70
Total Net Profit -315.70
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
3.68
Total Trades 137
Won Trades 4
Lost trades 133
Win Rate 2.92 %
Expected payoff 9.02
Gross Profit 1696.71
Gross Loss -461.46
Total Net Profit 1235.25
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
2.11
Total Trades 101
Won Trades 3
Lost trades 98
Win Rate 2.97 %
Expected payoff 4.67
Gross Profit 895.20
Gross Loss -423.73
Total Net Profit 471.47
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.09
Total Trades 421
Won Trades 6
Lost trades 415
Win Rate 1.43 %
Expected payoff -2.69
Gross Profit 115.70
Gross Loss -1248.00
Total Net Profit -1132.30
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.26
Total Trades 466
Won Trades 21
Lost trades 445
Win Rate 4.51 %
Expected payoff -6.07
Gross Profit 986.30
Gross Loss -3814.10
Total Net Profit -2827.80
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
0.12
Total Trades 287
Won Trades 7
Lost trades 280
Win Rate 2.44 %
Expected payoff -8.24
Gross Profit 318.89
Gross Loss -2683.27
Total Net Profit -2364.38
-100%
-50%
0%
50%
100%

Comments