Daydream01_v1

Profit factor:
237.31
Orders Execution
It automatically opens orders when conditions are reachedChecks for the total of open ordersIt Closes Orders by itself
5 Views
0 Downloads
0 Favorites
Daydream01_v1
//+------------------------------------------------------------------+
//|                                              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/CAD Jul 2025 - Sep 2025
0.44
Total Trades 365
Won Trades 120
Lost trades 245
Win Rate 32.88 %
Expected payoff -12.81
Gross Profit 3657.40
Gross Loss -8333.95
Total Net Profit -4676.55
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.31
Total Trades 367
Won Trades 111
Lost trades 256
Win Rate 30.25 %
Expected payoff -19.29
Gross Profit 3193.00
Gross Loss -10272.00
Total Net Profit -7079.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.90
Gross Loss -13679.21
Total Net Profit -9625.31
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
2370.21
Total Trades 389
Won Trades 179
Lost trades 210
Win Rate 46.02 %
Expected payoff 84030.83
Gross Profit 32701789.00
Gross Loss -13797.00
Total Net Profit 32687992.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.48
Total Trades 371
Won Trades 175
Lost trades 196
Win Rate 47.17 %
Expected payoff -11.10
Gross Profit 3819.00
Gross Loss -7938.00
Total Net Profit -4119.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 -34.92
Gross Profit 2596.56
Gross Loss -9545.20
Total Net Profit -6948.64
-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%
GBP/USD Oct 2024 - Jan 2025
0.67
Total Trades 188
Won Trades 93
Lost trades 95
Win Rate 49.47 %
Expected payoff -17.84
Gross Profit 6884.00
Gross Loss -10237.00
Total Net Profit -3353.00
-100%
-50%
0%
50%
100%

Comments