MA.S.R_Trading_02

Author: FORTRADER.RU
Profit factor:
3011.46
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
14 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.75
Total Trades 128
Won Trades 7
Lost trades 121
Win Rate 5.47 %
Expected payoff -0.85
Gross Profit 325.66
Gross Loss -433.84
Total Net Profit -108.18
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.22
Total Trades 639
Won Trades 12
Lost trades 627
Win Rate 1.88 %
Expected payoff -2.42
Gross Profit 440.58
Gross Loss -1988.12
Total Net Profit -1547.54
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.14
Total Trades 455
Won Trades 10
Lost trades 445
Win Rate 2.20 %
Expected payoff -1.83
Gross Profit 134.57
Gross Loss -966.49
Total Net Profit -831.92
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.32
Total Trades 389
Won Trades 15
Lost trades 374
Win Rate 3.86 %
Expected payoff -1.47
Gross Profit 267.30
Gross Loss -840.70
Total Net Profit -573.40
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
4.69
Total Trades 6
Won Trades 1
Lost trades 5
Win Rate 16.67 %
Expected payoff 25.57
Gross Profit 195.00
Gross Loss -41.60
Total Net Profit 153.40
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 10
Won Trades 0
Lost trades 10
Win Rate 0.00 %
Expected payoff -10.21
Gross Profit 0.00
Gross Loss -102.08
Total Net Profit -102.08
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.57
Total Trades 287
Won Trades 12
Lost trades 275
Win Rate 4.18 %
Expected payoff -1.74
Gross Profit 676.66
Gross Loss -1177.09
Total Net Profit -500.43
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
22649.40
Total Trades 393
Won Trades 165
Lost trades 228
Win Rate 41.98 %
Expected payoff 40507.78
Gross Profit 15920262.00
Gross Loss -702.90
Total Net Profit 15919559.10
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.18
Total Trades 651
Won Trades 14
Lost trades 637
Win Rate 2.15 %
Expected payoff -1.62
Gross Profit 235.50
Gross Loss -1290.40
Total Net Profit -1054.90
-100%
-50%
0%
50%
100%
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%

Comments