Profit factor:
200.87
Orders Execution
It automatically opens orders when conditions are reachedChecks for the total of open ordersIt Closes Orders by itself
3 Views
0 Downloads
0 Favorites
Daydream01
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                              Daydream by Cothool |
//|                                          Recommended: USD/JPY 1H |
//+------------------------------------------------------------------+
#define MAGIC_NUM  48213657
//+------------------------------------------------------------------+
extern double Lots       = 1;
extern int ChannelPeriod = 25;
extern int Slippage      = 3;
extern int TakeProfit    = 15;
//+------------------------------------------------------------------+
double LastOrderTime = 0;
double CurrentDirection = 0;
double CurrentTakeProfitPrice = 0;
//+------------------------------------------------------------------+
void OpenLong()
{
   if (Time[0] == LastOrderTime)
      return;
   if (CurrentDirection != 0)
      return;

   OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, 0, 0,
             "Daydream", MAGIC_NUM, 0, Blue);
   LastOrderTime = Time[0];
   CurrentDirection = 1;
}
//+------------------------------------------------------------------+
void OpenShort()
{
   if (Time[0] == LastOrderTime)
      return;
   if (CurrentDirection != 0)
      return;

   OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, 0, 0,
             "Daydream", MAGIC_NUM, 0, Red);
   LastOrderTime = Time[0];
   CurrentDirection = -1;
}
//+------------------------------------------------------------------+
void CloseLong()
{
   int i;

   if (Time[0] == LastOrderTime)
      return;
   if (CurrentDirection != 1)
      return;

   for (i = 0; i < OrdersTotal(); i++)
   {
      if (OrderSelect(i, SELECT_BY_POS) && OrderSymbol() == Symbol() &&
          OrderMagicNumber() == MAGIC_NUM && OrderType() == OP_BUY)
      {
         OrderClose(OrderTicket(), OrderLots(), Bid, 3, White);
         LastOrderTime = Time[0];
         CurrentDirection = 0;
      }
   }
}
//+------------------------------------------------------------------+
void CloseShort()
{
   int i;

   if (Time[0] == LastOrderTime)
      return;
   if (CurrentDirection != -1)
      return;

   for (i = 0; i < OrdersTotal(); i++)
   {
      if (OrderSelect(i, SELECT_BY_POS) && OrderSymbol() == Symbol() &&
          OrderMagicNumber() == MAGIC_NUM && OrderType() == OP_SELL)
      {
         OrderClose(OrderTicket(), OrderLots(), Ask, 3, White);
         LastOrderTime = Time[0];
         CurrentDirection = 0;
      }
   }
}
//+------------------------------------------------------------------+
void start()
{
   double HighestValue;
   double LowestValue;

   HighestValue = High[Highest(NULL, 0, MODE_HIGH, ChannelPeriod, 1)];
   LowestValue = Low[Lowest(NULL, 0, MODE_LOW, ChannelPeriod, 1)];

   // BUY
   if (Close[0] < LowestValue)
   {
      CloseShort();
      OpenLong();
      CurrentTakeProfitPrice = Bid + TakeProfit * Point;
   }

   // SELL
   if (Close[0] > HighestValue)
   {
      CloseLong();
      OpenShort();
      CurrentTakeProfitPrice = Ask - TakeProfit * Point;
   }

   // Trailing Profit Taking for Long Position
   if (CurrentDirection == 1)
   {
      if (CurrentTakeProfitPrice > Bid + TakeProfit * Point)
         CurrentTakeProfitPrice = Bid + TakeProfit * Point;
      if (Bid >= CurrentTakeProfitPrice)
         CloseLong();
   }

   // Trailing Profit Taking for Short Position
   if (CurrentDirection == -1)
   {
      if (CurrentTakeProfitPrice < Ask - TakeProfit * Point)
         CurrentTakeProfitPrice = Ask - TakeProfit * Point;
      if (Ask <= CurrentTakeProfitPrice)
         CloseShort();
   }
}
//+------------------------------------------------------------------+

Profitability Reports

USD/CHF Jul 2025 - Sep 2025
0.28
Total Trades 318
Won Trades 97
Lost trades 221
Win Rate 30.50 %
Expected payoff -29.88
Gross Profit 3717.50
Gross Loss -13218.15
Total Net Profit -9500.65
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.42
Total Trades 365
Won Trades 116
Lost trades 249
Win Rate 31.78 %
Expected payoff -13.54
Gross Profit 3573.78
Gross Loss -8514.88
Total Net Profit -4941.10
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.35
Total Trades 367
Won Trades 119
Lost trades 248
Win Rate 32.43 %
Expected payoff -17.29
Gross Profit 3419.00
Gross Loss -9764.00
Total Net Profit -6345.00
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.28
Total Trades 274
Won Trades 80
Lost trades 194
Win Rate 29.20 %
Expected payoff -35.13
Gross Profit 3740.00
Gross Loss -13366.00
Total Net Profit -9626.00
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.02
Total Trades 89
Won Trades 6
Lost trades 83
Win Rate 6.74 %
Expected payoff -103.38
Gross Profit 178.56
Gross Loss -9379.05
Total Net Profit -9200.49
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.30
Total Trades 321
Won Trades 97
Lost trades 224
Win Rate 30.22 %
Expected payoff -29.99
Gross Profit 4053.93
Gross Loss -13679.34
Total Net Profit -9625.41
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
2406.86
Total Trades 389
Won Trades 181
Lost trades 208
Win Rate 46.53 %
Expected payoff 84031.83
Gross Profit 32701968.00
Gross Loss -13587.00
Total Net Profit 32688381.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.42
Total Trades 371
Won Trades 162
Lost trades 209
Win Rate 43.67 %
Expected payoff -13.10
Gross Profit 3489.00
Gross Loss -8350.00
Total Net Profit -4861.00
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.27
Total Trades 199
Won Trades 52
Lost trades 147
Win Rate 26.13 %
Expected payoff -35.63
Gross Profit 2559.59
Gross Loss -9650.35
Total Net Profit -7090.76
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.17
Total Trades 208
Won Trades 50
Lost trades 158
Win Rate 24.04 %
Expected payoff -42.14
Gross Profit 1829.00
Gross Loss -10594.00
Total Net Profit -8765.00
-100%
-50%
0%
50%
100%

Comments