Profit factor:
0.69
Orders Execution
Checks for the total of open ordersIt can change open orders parameters, due to possible stepping strategyIt automatically opens orders when conditions are reached
Indicators Used
Moving average indicator
1 Views
0 Downloads
0 Favorites
HL_MA_v04
//+------------------------------------------------------------------+ 
//|                                                     High&Low.mq4 | 
//|                                  Copyright © 2007, Shadow Trader | 
//|                                   e-mail: ShadowTrader@fxmail.ru | 
//+------------------------------------------------------------------+ 
// Ýêñïåðò ïðåäíàçíà÷åí äëÿ ðàáîòû íà äíåâêàõ.
// Ïàðàìåòðû óñòàíîâëåíû äëÿ ïàðû EURUSD
extern int ma_period = 20;
extern double SL_percent_of_channel = 2.1;
double lots   = 0.1;
double sl;
double tp;


int init ()
{ 
   return(0);
} 

int deinit()
{
   return(0);
}

int day=1;

int start()
{
   if (AccountFreeMargin() < 120)
      return (0);

   double mah = iMA(Symbol(), 0, ma_period, 0, MODE_LWMA, PRICE_HIGH, 1);
   double mal = iMA(Symbol(), 0, ma_period, 0, MODE_LWMA, PRICE_LOW,  1);
      
   if (OrdersTotal() > 0)
   {
      if (Volume[0]>day)
         return (0);
      else
      {
         for (int i = 0; i < OrdersTotal(); i++)
         {
            if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == TRUE)
            {
               if (OrderType() == OP_BUY)
               {
                  if (OrderStopLoss() < mal)
                      OrderModify(OrderTicket(), Ask, mal, OrderTakeProfit(), 0, Gold);
               }

               if (OrderType() == OP_SELL)
               {
                  if (OrderStopLoss() > mah)
                      OrderModify(OrderTicket(), Bid, mah, OrderTakeProfit(), 0, Green);
               }
            }
         }
         return (0);
      }
   }

   // Ïîêóïêà
   if ( Close[1] > mah && Low [0] > mah )
   {
      sl = Ask-SL_percent_of_channel*(mah-mal);
      tp = Ask + (mah - mal);
      OrderSend(Symbol(), OP_BUY, lots, Ask, 3, sl, tp, "", 0, 0, Blue);
   }

   // Ïðîäàæà
   if ( Close[1] < mal && High[0] < mal )
   {
      sl = Bid+SL_percent_of_channel*(mah-mal);
      tp = Bid - (mah - mal);
      OrderSend(Symbol(), OP_SELL, lots, Bid, 3, sl, tp, "", 0, 0, Red);
   }

   return(0);
}

Profitability Reports

USD/CAD Oct 2024 - Jan 2025
0.75
Total Trades 378
Won Trades 202
Lost trades 176
Win Rate 53.44 %
Expected payoff -1.59
Gross Profit 1775.86
Gross Loss -2375.83
Total Net Profit -599.97
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.62
Total Trades 346
Won Trades 168
Lost trades 178
Win Rate 48.55 %
Expected payoff -2.84
Gross Profit 1634.40
Gross Loss -2618.30
Total Net Profit -983.90
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.67
Total Trades 387
Won Trades 198
Lost trades 189
Win Rate 51.16 %
Expected payoff -4.09
Gross Profit 3205.80
Gross Loss -4789.30
Total Net Profit -1583.50
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
0.72
Total Trades 345
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -2.20
Gross Profit 1929.40
Gross Loss -2689.60
Total Net Profit -760.20
-100%
-50%
0%
50%
100%

Comments