Alexav_speedup_m1_v1

Author: Alex Saveliev
Profit factor:
0.17
Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each bar
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
3 Views
0 Downloads
0 Favorites
Alexav_speedup_m1_v1
//+------------------------------------------------------------------+
//|                                            Alexav_SpeedUp_M1.mq4 |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Alex Saveliev"
#property link      "asavelievca@yahoo.com"
//----
extern double Lots=1;
extern double TakeProfit=26;
extern double InitialStop=23;
extern double trailingStop=23;
extern double OpenCloseDiff=0.001;
extern double slippage    =5;
extern int magicEA        =119;
//----
int k=0,MMin=70;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
   int totalOrders=OrdersTotal();
//----
   Comment("Lots = ",Lots);
   for(int cnt=0; cnt<totalOrders; cnt++) // scan all orders and positions...
     {
      OrderSelect(cnt, SELECT_BY_POS);         // the next line will check for ONLY market trades, not entry orders
      if(OrderSymbol()==Symbol() && OrderType()<=OP_SELL && OrderMagicNumber()==magicEA)
        {   // only look for this symbol,OP_BUY or OP_SELL and only orders from this EA      
         if(trailingStop > 0) // Check trailing stop
           {
            if(Bid-OrderOpenPrice() > trailingStop*Point)
              {
               if(OrderStopLoss() < Bid - trailingStop*Point)
                 {
                  OrderModify(OrderTicket(),OrderOpenPrice(),Bid-trailingStop*Point,OrderTakeProfit(),0);
                 }
              }
            if(OrderOpenPrice() - Ask > trailingStop*Point)
              {
               if(OrderStopLoss() > Ask + trailingStop*Point)
                 {
                  OrderModify(OrderTicket(),OrderOpenPrice(),Ask+trailingStop*Point,OrderTakeProfit(),0);
                 }
              }
           }
        }
     }
   if (Minute()==MMin+1) k=0;
   if (k<1)
     {
      if (iClose(Symbol(),0,1)-iOpen(Symbol(),0,1)>OpenCloseDiff)
        {
         OrderSend(Symbol(),OP_BUY,Lots,Ask,slippage,Ask-InitialStop*Point,Ask+TakeProfit*Point,NULL,magicEA,0);
         MMin=Minute();
         k=k+1;
        }
      if (iOpen(Symbol(),0,1)-iClose(Symbol(),0,1)>OpenCloseDiff)
        {
         OrderSend(Symbol(),OP_SELL,Lots,Bid,slippage,Bid+InitialStop*Point,Bid-TakeProfit*Point,NULL,magicEA,0);
         MMin=Minute();
         k=k+1;
        }
     }
  }
//+------------------------------------------------------------------+

Profitability Reports

USD/CHF Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.02
Total Trades 60
Won Trades 1
Lost trades 59
Win Rate 1.67 %
Expected payoff -16.41
Gross Profit 19.24
Gross Loss -1003.82
Total Net Profit -984.58
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.65
Total Trades 60
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -5.02
Gross Profit 550.00
Gross Loss -851.00
Total Net Profit -301.00
-100%
-50%
0%
50%
100%

Comments