weda--83win5lose-4h-GBP-JPY-based on MACD 300 pip per month-with 300 pip-S-L

Profit factor:
6.49

Here's a breakdown of what the MetaTrader script does, explained in plain language for someone who isn't a programmer:

This script is an automated trading program (sometimes called an "Expert Advisor" or EA) for the MetaTrader platform. It's designed to automatically open and close trades based on the readings from a specific technical indicator called the MACD (Moving Average Convergence Divergence). The goal of the script is to automatically execute buy orders according to a particular strategy that it is coded to implement.

Here's how it works step-by-step:

  1. Initial Setup & Checks:

    • The script starts by defining a key setting: "Lots." This represents the size of the trades it will make (e.g., 0.3 standard lots).
    • Before doing anything else, it checks if the trading chart has enough data (at least 100 bars/periods). If not, it stops because it needs sufficient historical data to work correctly.
    • It retrieves the current and previous two values of the MACD indicator. It gets these values using specific settings (periods 6, 18, 1) and applies them to the closing price.
  2. Trading Logic (Buy Orders Only):

    • The script checks if there are currently any open orders in the market. If there aren't any open orders, it proceeds.
    • It then checks if the account has enough free margin (available money) to place a trade of the specified "Lots" size. If not, it stops because it can't afford to trade.
    • The core logic is in the BUY order placement: The script checks specific conditions based on the MACD values from the current period, the previous period, and the period before that.
    • Specifically, it checks if the two previous MACD values are between 0 and 0.06. It also checks if the second most recent MACD value is greater than the most recent previous MACD value which in turn is less than the current MACD value.
    • If all these MACD conditions are met, the script places a BUY order.
    • If the order is successfully placed, it prints a message. If there's an error placing the order, it prints an error message.
    • The Buy order is placed at the current Ask price (the price you'd pay to buy). The script also sets a Take Profit level (at Ask + 40 * Point, which depends on the specific instrument). The Stop Loss is set to 0.

In essence, this script monitors the MACD indicator and, when it sees a specific pattern in the indicator's recent values, it automatically places a buy order, provided certain account conditions are met.

Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
Indicators Used
MACD Histogram
5 Views
0 Downloads
0 Favorites
weda--83win5lose-4h-GBP-JPY-based on MACD 300 pip per month-with 300 pip-S-L
//+------------------------------------------------------------------------+
//|                                  MACD edited with new magic period.mq4 |
//|  periode yg dimodifikasi didapat dengan kecerdasan buatan tingkat dasar|
//| period number is taken from book of soros, global crisis of capitalizm |
//| any better performance please contact with pm                          |
//+------------------------------------------------------------------------+



extern double Lots = 0.3;


//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   double MacdCurrent, MacdPrevious, MacdPrevious2, SignalCurrent;
   double SignalPrevious, MaCurrent, MaPrevious;
   int cnt, ticket, total, a, s, d, f;
// initial data checks
// cek data
// it is important to make sure that the expert works with a normal
// memastikan EA bekerja dengan normal
// chart and the user did not make any mistakes setting external 
// tidak ada kesalahan user ataupun chart
// variables (Lots, StopLoss, TakeProfit, 
// TrailingStop) in our case, we check TakeProfit
// on a chart of less than 100 bars
// memastikan grafik lebih dari 100 bar

   if(Bars<100)
     {
      Print("bars less than 100");
      return(0);  
     }
  
// sederhanakan kode untuk percepat running-to simplify the coding and speed up access
// data dipindahkan ke internal variabel-data are put into internal variables

   MacdCurrent=iMACD(NULL,0,6,18,1,PRICE_CLOSE,MODE_MAIN,0);
   MacdPrevious=iMACD(NULL,0,6,18,1,PRICE_CLOSE,MODE_MAIN,1);
   MacdPrevious2=iMACD(NULL,0,6,18,1,PRICE_CLOSE,MODE_MAIN,2);
   
   
 //-------------------------------------------------------------------------------

// if we use artificial neural network
// the best combination of period for each technical indicator
// will created instantly without significant consecutive loss
// i am still work on it
// always hope some one to help our team in jakarta...... :-)
// anything better the period that we have now are welcome

//-------------------------------------------------------------------------------






// periode didapat dari kutipan soros pada bukunya
// global crisis of capitalizm
// time periode are got from soros's book

   total=OrdersTotal();
   if(total<1) 
     {
      // no opened orders identified
      if(AccountFreeMargin()<(1000*Lots))
        {
         Print("We have no money. Free Margin = ", AccountFreeMargin());
         return(0);  
        }
      




  


      
      
      
      
      
      
      //-----------------------------------------------------------------penting
      
      
      // check for long position (BUY) possibility
      
      
      //-----------------------------------------------------------------penting
      
      
      
      //if(MacdCurrent>0 && MacdCurrent<0.2&& MacdPrevious>0&& MacdPrevious<0.2&& MacdPrevious2>MacdPrevious<MacdCurrent)
     
     if(MacdPrevious2>0 && MacdPrevious2<0.06 && MacdPrevious2>MacdPrevious<MacdCurrent)

      //OP_BUY,Lots,Ask,3,Ask - 200*Point,Ask + 200*Point,"macd sample",16384,0,Green);
      
        {
         ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+40*Point,"macd sample",16384,0,Green);
         if(ticket>0)
           {
            if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
           }
         else Print("Error opening BUY order : ",GetLastError()); 
         return(0); 
        }
      
      
      
       //-----------------------------------------------------------------penting
      


}}// the end-tamat

Profitability Reports

NZD/USD Jan 2025 - Jul 2025
152.00
Total Trades 77
Won Trades 76
Lost trades 1
Win Rate 98.70 %
Expected payoff 11.77
Gross Profit 912.00
Gross Loss -6.00
Total Net Profit 906.00
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
16.25
Total Trades 172
Won Trades 171
Lost trades 1
Win Rate 99.42 %
Expected payoff 11.20
Gross Profit 2052.00
Gross Loss -126.30
Total Net Profit 1925.70
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
7.09
Total Trades 99
Won Trades 98
Lost trades 1
Win Rate 98.99 %
Expected payoff 6.93
Gross Profit 798.73
Gross Loss -112.71
Total Net Profit 686.02
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
6.06
Total Trades 148
Won Trades 147
Lost trades 1
Win Rate 99.32 %
Expected payoff 7.14
Gross Profit 1264.63
Gross Loss -208.62
Total Net Profit 1056.01
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
3.05
Total Trades 61
Won Trades 60
Lost trades 1
Win Rate 98.36 %
Expected payoff 5.40
Gross Profit 490.26
Gross Loss -160.95
Total Net Profit 329.31
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
1.89
Total Trades 62
Won Trades 61
Lost trades 1
Win Rate 98.39 %
Expected payoff 4.04
Gross Profit 531.63
Gross Loss -280.95
Total Net Profit 250.68
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
1.74
Total Trades 22
Won Trades 21
Lost trades 1
Win Rate 95.45 %
Expected payoff 4.85
Gross Profit 252.00
Gross Loss -145.20
Total Net Profit 106.80
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
1.50
Total Trades 59
Won Trades 58
Lost trades 1
Win Rate 98.31 %
Expected payoff 2.85
Gross Profit 502.78
Gross Loss -334.38
Total Net Profit 168.40
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
1.48
Total Trades 48
Won Trades 47
Lost trades 1
Win Rate 97.92 %
Expected payoff 2.76
Gross Profit 409.07
Gross Loss -276.60
Total Net Profit 132.47
-100%
-50%
0%
50%
100%
GBP/AUD Jan 2025 - Jul 2025
0.80
Total Trades 160
Won Trades 159
Lost trades 1
Win Rate 99.38 %
Expected payoff -1.97
Gross Profit 1270.99
Gross Loss -1586.50
Total Net Profit -315.51
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.61
Total Trades 39
Won Trades 38
Lost trades 1
Win Rate 97.44 %
Expected payoff -9.36
Gross Profit 566.72
Gross Loss -931.84
Total Net Profit -365.12
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.59
Total Trades 38
Won Trades 37
Lost trades 1
Win Rate 97.37 %
Expected payoff -9.95
Gross Profit 551.13
Gross Loss -929.19
Total Net Profit -378.06
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.41
Total Trades 16
Won Trades 15
Lost trades 1
Win Rate 93.75 %
Expected payoff -11.61
Gross Profit 130.10
Gross Loss -315.84
Total Net Profit -185.74
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.19
Total Trades 12
Won Trades 11
Lost trades 1
Win Rate 91.67 %
Expected payoff -47.62
Gross Profit 132.00
Gross Loss -703.50
Total Net Profit -571.50
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
0.17
Total Trades 54
Won Trades 53
Lost trades 1
Win Rate 98.15 %
Expected payoff -40.23
Gross Profit 437.97
Gross Loss -2610.64
Total Net Profit -2172.67
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
0.17
Total Trades 61
Won Trades 60
Lost trades 1
Win Rate 98.36 %
Expected payoff -35.64
Gross Profit 457.75
Gross Loss -2631.95
Total Net Profit -2174.20
-100%
-50%
0%
50%
100%
GBP/CAD Oct 2024 - Jan 2025
0.15
Total Trades 13
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -46.18
Gross Profit 104.07
Gross Loss -704.43
Total Net Profit -600.36
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.15
Total Trades 10
Won Trades 9
Lost trades 1
Win Rate 90.00 %
Expected payoff -59.73
Gross Profit 108.00
Gross Loss -705.30
Total Net Profit -597.30
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.10
Total Trades 14
Won Trades 13
Lost trades 1
Win Rate 92.86 %
Expected payoff -64.39
Gross Profit 102.95
Gross Loss -1004.47
Total Net Profit -901.52
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.07
Total Trades 5
Won Trades 4
Lost trades 1
Win Rate 80.00 %
Expected payoff -133.02
Gross Profit 48.00
Gross Loss -713.10
Total Net Profit -665.10
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.07
Total Trades 5
Won Trades 4
Lost trades 1
Win Rate 80.00 %
Expected payoff -132.42
Gross Profit 48.00
Gross Loss -710.10
Total Net Profit -662.10
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
0.05
Total Trades 21
Won Trades 20
Lost trades 1
Win Rate 95.24 %
Expected payoff -216.05
Gross Profit 262.58
Gross Loss -4799.68
Total Net Profit -4537.10
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.04
Total Trades 6
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -253.75
Gross Profit 60.00
Gross Loss -1582.50
Total Net Profit -1522.50
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.03
Total Trades 5
Won Trades 4
Lost trades 1
Win Rate 80.00 %
Expected payoff -192.34
Gross Profit 31.26
Gross Loss -992.95
Total Net Profit -961.69
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.02
Total Trades 4
Won Trades 3
Lost trades 1
Win Rate 75.00 %
Expected payoff -514.27
Gross Profit 36.00
Gross Loss -2093.10
Total Net Profit -2057.10
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.00
Total Trades 1
Won Trades 0
Lost trades 1
Win Rate 0.00 %
Expected payoff -1514.40
Gross Profit 0.00
Gross Loss -1514.40
Total Net Profit -1514.40
-100%
-50%
0%
50%
100%
AUD/USD Jan 2025 - Jul 2025
0.00
Total Trades 31
Won Trades 30
Lost trades 1
Win Rate 96.77 %
Expected payoff -5514.71
Gross Profit 360.00
Gross Loss -171315.90
Total Net Profit -170955.90
-100%
-50%
0%
50%
100%
EUR/USD Jan 2025 - Jul 2025
0.00
Total Trades 54
Won Trades 53
Lost trades 1
Win Rate 98.15 %
Expected payoff -5292.38
Gross Profit 636.00
Gross Loss -286424.40
Total Net Profit -285788.40
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.00
Total Trades 23
Won Trades 23
Lost trades 0
Win Rate 100.00 %
Expected payoff 12.00
Gross Profit 276.00
Gross Loss 0.00
Total Net Profit 276.00
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 10
Won Trades 9
Lost trades 1
Win Rate 90.00 %
Expected payoff -31634.85
Gross Profit 108.00
Gross Loss -316456.50
Total Net Profit -316348.50
-100%
-50%
0%
50%
100%

Comments