Profit factor:
0.92
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
4 Views
0 Downloads
0 Favorites
misterfx
#define MagicNumber 712008

extern int TakeProfit = 50;
extern int StopLoss = 50;
extern double Lots = 0.1;
extern int slippage = 3;
extern int TrailingStop = 30;
extern int TimeToTrade = 1;

double point = 0;
int day = -1;

int init()
{
   point = Point*MathPow(10,Digits%2);
   return(0);
}

void start()
{
   if( OrdersTotal() <= 0)
   {
      if (Hour() == TimeToTrade && Minute() == 0 && day != DayOfYear())
      {
         day = DayOfYear();
         OrderSend(Symbol(),OP_BUY,Lots,Ask,slippage,Ask-StopLoss*point,Ask+TakeProfit*point,"misterfx",MagicNumber,0,Lime);
         OrderSend(Symbol(),OP_SELL,Lots,Bid,slippage,Bid+StopLoss*point,Bid-TakeProfit*point,"misterfx",MagicNumber,0,Red);
      }
   } else {
      ManageTrades();
   }
   return(0);
}

void ManageTrades()
{
   for (int i = 0; i<OrdersTotal(); i++)
   {
      if (OrderSelect(i, SELECT_BY_POS,MODE_TRADES) == true)
      {
         if (OrderSymbol() == Symbol() && OrderMagicNumber() == MagicNumber)
         {
            if (OrderType() == OP_BUY)
            {
               if (Bid-OrderOpenPrice() > TrailingStop * point)
               {
                  if (OrderStopLoss() < Bid-TrailingStop * point || OrderStopLoss() == 0)
                  {
                     ModifyStopLoss(Bid-TrailingStop * point);
                  }
               }
            }
            if (OrderType() == OP_SELL)
            {
               if (OrderOpenPrice()-Ask > TrailingStop * point)
               {
                  if (OrderStopLoss() < Ask+TrailingStop * point || OrderStopLoss() == 0)
                  {
                     ModifyStopLoss(Ask+TrailingStop * point);
                  }
               }
            }
         }
      }
   }
   return(0);
}

void ModifyStopLoss(double newStopLoss)
{
   OrderModify(OrderTicket(), OrderOpenPrice(), newStopLoss, OrderTakeProfit(), 0, CLR_NONE); 
   return(0);
}

Profitability Reports

GBP/USD Jul 2025 - Sep 2025
1.12
Total Trades 72
Won Trades 43
Lost trades 29
Win Rate 59.72 %
Expected payoff 2.48
Gross Profit 1628.60
Gross Loss -1450.00
Total Net Profit 178.60
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.88
Total Trades 94
Won Trades 49
Lost trades 45
Win Rate 52.13 %
Expected payoff -2.06
Gross Profit 1434.11
Gross Loss -1627.34
Total Net Profit -193.23
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.83
Total Trades 100
Won Trades 54
Lost trades 46
Win Rate 54.00 %
Expected payoff -2.57
Gross Profit 1256.82
Gross Loss -1513.67
Total Net Profit -256.85
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
1.05
Total Trades 76
Won Trades 43
Lost trades 33
Win Rate 56.58 %
Expected payoff 1.01
Gross Profit 1727.00
Gross Loss -1650.00
Total Net Profit 77.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.97
Total Trades 42
Won Trades 23
Lost trades 19
Win Rate 54.76 %
Expected payoff -0.61
Gross Profit 916.40
Gross Loss -942.20
Total Net Profit -25.80
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
1.04
Total Trades 254
Won Trades 143
Lost trades 111
Win Rate 56.30 %
Expected payoff 0.54
Gross Profit 3880.93
Gross Loss -3742.82
Total Net Profit 138.11
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
0.98
Total Trades 136
Won Trades 77
Lost trades 59
Win Rate 56.62 %
Expected payoff -0.60
Gross Profit 3363.50
Gross Loss -3445.44
Total Net Profit -81.94
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
0.97
Total Trades 172
Won Trades 96
Lost trades 76
Win Rate 55.81 %
Expected payoff -0.43
Gross Profit 2613.60
Gross Loss -2688.08
Total Net Profit -74.48
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.72
Total Trades 112
Won Trades 55
Lost trades 57
Win Rate 49.11 %
Expected payoff -7.17
Gross Profit 2040.90
Gross Loss -2844.50
Total Net Profit -803.60
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.74
Total Trades 194
Won Trades 93
Lost trades 101
Win Rate 47.94 %
Expected payoff -6.59
Gross Profit 3732.80
Gross Loss -5010.60
Total Net Profit -1277.80
-100%
-50%
0%
50%
100%

Comments