Profit factor:
0.92
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
Indicators Used
Relative strength indexBill Williams Awesome oscillatorMACD HistogramMoving Average of OscillatorStochastic oscillator
10 Views
0 Downloads
0 Favorites
gbpusd_m1
//+-------------------------------------------------------------------------+
//|                                                                 SSB.mq4 |
//|                Copyright © 2009, Yury V. Reshetov  http://ssb.bigfx.ru/ |
//|                                                    http://ssb.bigfx.ru/ |
//+-------------------------------------------------------------------------+
#property copyright "Copyright © 2009, Yury V. Reshetov http://ssb.bigfx.ru"
#property link      "http://ssb.bigfx.ru"

/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
*/

extern double lots = 1;
extern int prsi = 86;
extern int fastmacd = 11;
extern int slowmacd = 53;
extern int signalmacd = 26;
extern int stochD = 23;
extern int stochK = 40;
extern int stochS = 82;
extern int magic = 888;
extern int slippage = 0;
static int prevtime = 0;

int init() {
   prevtime = Time[0];
   return(0);
}

int start() {

   if (! IsTradeAllowed()) {
      return(0);
   }

   if (Time[0] == prevtime) {
      return(0);
   }
   prevtime = Time[0];

   int ticket = -1;
   int total = OrdersTotal();
   for (int i = total - 1; i >= 0; i--) {
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      if ((OrderSymbol() == Symbol()) && (OrderMagicNumber() == magic)) {
         int prevticket = OrderTicket();
         if (OrderType() == OP_BUY) {
            if (shortsignal()) {
               ticket = OrderSend(Symbol(), OP_SELL, 2.0 * lots, Bid, slippage, 0, 0, WindowExpertName(), magic, 0, Red);
               Sleep(30000);
               if (ticket < 0) {
                  prevtime = Time[1];
                  return(0);
               } else {
                  OrderCloseBy(ticket, prevticket, Red);
               }
            }
          } else {
            if (longsignal()) {
               ticket = OrderSend(Symbol(), OP_BUY, 2.0 * lots, Ask, slippage, 0, 0, WindowExpertName(), magic, 0, Blue);
               Sleep(30000);
               if (ticket < 0) {
                  prevtime = Time[1];
                  return(0);
               } else {
                  OrderCloseBy(ticket, prevticket, Blue);
               }
            }
          }
          return(0);
      }
   }

   if (longsignal()) {
      ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, slippage, 0, 0, WindowExpertName(), magic, 0, Blue);
      Sleep(30000);
      if (ticket < 0) {
         prevtime = Time[1];
      }
      return(0);
   }
   if (shortsignal()) {
      ticket = OrderSend(Symbol(), OP_SELL, lots, Bid, slippage, 0, 0, WindowExpertName(), magic, 0, Red);
      Sleep(30000);
      if (ticket < 0) {
         prevtime = Time[1];
      }
      return(0);
   }
   return(0);
}

bool longsignal() {
   if (fcandle() < 0) {
      return(false);
   }
   if (frsi() < 0) {
      return(false);
   }
   if (fao() < 0) {
      return(false);
   }
   if (fmacd1() < 0) {
      return(false);
   }
   if (fosma() < 0) {
      return(false);
   }
   if (fosma1() < 0) {
      return(false);
   }
   if (fstoch2() < 0) {
      return(false);
   }
   return(true);
}

bool shortsignal() {
   if (fcandle() > 0) {
      return(false);
   }
   if (frsi() > 0) {
      return(false);
   }
   if (fao() > 0) {
      return(false);
   }
   if (fmacd1() > 0) {
      return(false);
   }
   if (fosma() > 0) {
      return(false);
   }
   if (fosma1() > 0) {
      return(false);
   }
   if (fstoch2() > 0) {
      return(false);
   }
   return(true);
}
int fcandle() {
   int result = 0;
   if (Open[0] > Open[1]) {
      result = 1;
   }
   if (Open[0] < Open[1]) {
      result = -1;
   }
   return(result);
}
int frsi() {
   int result = 0;
   double ind = iRSI(Symbol(), 0, prsi, PRICE_OPEN, 0) - 50.0;
   if (ind < 0) {
      result = 1;
   }
   if (ind > 0) {
      result = -1;
   }
   return(result);
}



int fao() {
   int result = 0;
   double ind = iAO(Symbol(), 0, 0);
   if (ind < 0) {
      result = 1;
   }
   if (ind > 0) {
      result = -1;
   }
   return(result);
}


int fmacd1() {
   int result = 0;
   double ind = iMACD(Symbol(), 0, fastmacd, slowmacd, signalmacd, PRICE_OPEN, MODE_MAIN, 0);
   double ind1 = iMACD(Symbol(), 0, fastmacd, slowmacd, signalmacd, PRICE_OPEN, MODE_MAIN, 1);
   if ((ind - ind1) < 0) {
      result = 1;
   }
   if ((ind - ind1) > 0) {
      result = -1;
   }
   return(result);
}
int fosma() {
   int result = 0;
   double ind = iOsMA(Symbol(), 0, fastmacd, slowmacd, signalmacd, PRICE_OPEN, 0);
   if (ind < 0) {
      result = 1;
   }
   if (ind > 0) {
      result = -1;
   }
   return(result);
}

int fosma1() {
   int result = 0;
   double ind = iOsMA(Symbol(), 0, fastmacd, slowmacd, signalmacd, PRICE_OPEN, 0);
   double ind1 = iOsMA(Symbol(), 0, fastmacd, slowmacd, signalmacd, PRICE_OPEN, 1);
   if ((ind - ind1) > 0) {
      result = 1;
   }
   if ((ind - ind1) < 0) {
      result = -1;
   }
   return(result);
}











int fstoch2() {
   int result = 0;
   double ind = iStochastic(Symbol(), 0, stochK, stochD, stochS, MODE_SMMA, 0,MODE_SIGNAL, 0) - 50.0;
   if (ind < 0) {
      result = 1;
   }
   if (ind > 0) {
      result = -1;
   }
   return(result);
}

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
1.64
Total Trades 14
Won Trades 9
Lost trades 5
Win Rate 64.29 %
Expected payoff 245.95
Gross Profit 8857.77
Gross Loss -5414.51
Total Net Profit 3443.26
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
1.25
Total Trades 12
Won Trades 6
Lost trades 6
Win Rate 50.00 %
Expected payoff 144.17
Gross Profit 8594.00
Gross Loss -6864.00
Total Net Profit 1730.00
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
1.01
Total Trades 16
Won Trades 10
Lost trades 6
Win Rate 62.50 %
Expected payoff 6.75
Gross Profit 12584.00
Gross Loss -12476.00
Total Net Profit 108.00
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
1.00
Total Trades 6
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff 4.83
Gross Profit 14562.00
Gross Loss -14533.00
Total Net Profit 29.00
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
1.00
Total Trades 16
Won Trades 7
Lost trades 9
Win Rate 43.75 %
Expected payoff 2.26
Gross Profit 15517.19
Gross Loss -15481.05
Total Net Profit 36.14
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.96
Total Trades 12
Won Trades 7
Lost trades 5
Win Rate 58.33 %
Expected payoff -35.34
Gross Profit 10516.77
Gross Loss -10940.88
Total Net Profit -424.11
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.91
Total Trades 10
Won Trades 4
Lost trades 6
Win Rate 40.00 %
Expected payoff -76.00
Gross Profit 7582.00
Gross Loss -8342.00
Total Net Profit -760.00
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.83
Total Trades 11
Won Trades 6
Lost trades 5
Win Rate 54.55 %
Expected payoff -100.89
Gross Profit 5289.88
Gross Loss -6399.68
Total Net Profit -1109.80
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.72
Total Trades 5
Won Trades 2
Lost trades 3
Win Rate 40.00 %
Expected payoff -1137.20
Gross Profit 14480.00
Gross Loss -20166.00
Total Net Profit -5686.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.70
Total Trades 3
Won Trades 1
Lost trades 2
Win Rate 33.33 %
Expected payoff -1062.33
Gross Profit 7292.00
Gross Loss -10479.00
Total Net Profit -3187.00
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.67
Total Trades 3
Won Trades 1
Lost trades 2
Win Rate 33.33 %
Expected payoff -351751.66
Gross Profit 2113326.00
Gross Loss -3168581.00
Total Net Profit -1055255.00
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.66
Total Trades 9
Won Trades 4
Lost trades 5
Win Rate 44.44 %
Expected payoff -505.78
Gross Profit 8761.50
Gross Loss -13313.56
Total Net Profit -4552.06
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.64
Total Trades 4
Won Trades 2
Lost trades 2
Win Rate 50.00 %
Expected payoff -1051.46
Gross Profit 7470.42
Gross Loss -11676.28
Total Net Profit -4205.86
-100%
-50%
0%
50%
100%

Comments