Modify a free martingale system based EA

MQL4 Эксперты

Работа завершена

Время выполнения 3 дня
Отзыв от заказчика
this person has no time to deal, he finds an excuse or the other and moves ahead
Отзыв от исполнителя
Be careful - this customer try to get You to do extra work for free, threatening not to complete already performed job. Use arbitration without hesitation

Техническое задание

hi

 

I like this below given free EA, it is martingale based EA, the EA from below code places a 0.01 lots order, and if the order is in loss, then it will put second order with 0.02 lots to even out the loosing order, and it keeps on making multiple orders of 0.03 , 0.04 etc lots to even out the loosing trades, i like this. But, the problem is that i do not want the EA to place the second order of 0.02 lots, instead the EA should place 2 orders at 15 seconds interval of 0.01 lots each, and for 0.03 lot, it should put 3 orders of 0.01 lots each at 15 seconds interval and so on.... i think you can use for loop for it... or whatever suitable

 Please note it that i want the results of the below EA and the modified EA to be SAME, by same i don't mean exactly same, but the result should be almost 95% same.... 

Also, i would like to tell you that i have already tried to put the mult = 1, by doing so, the EA does not make a single order by 0.02 lots, it does as i wanted, it does 0.01 lots 2 orders, but the problem here is that the second order is generated about 1 hour late as it waits for the occurrence of the stochastic to put the next order to even out the loosing order... and this makes the EA go in loss

 so as i said above, i just want the EA to put 2 orders of 0.01 instead of 0.02... and 3 orders of 0.01 instead of 0.03 and so on...

or however it is possible.... use your logic....

 all i need is the same performance but not the order of 0.02 or 0.03, all orders should be of constant lot 0.01 only and result should be same, the orders should be with 15 seconds gap

 the reason for the 15 second gap and constant lot size.... all i can tell is that i want this EA to be placed on a system as an account manager and the company has the rule of 15 second gap and constant lot size, so that is the reason i want this EA to be modified

 

thanks ..below is the code to be modified

 

//+------------------------------------------------------------------+
//|                                                          aaa.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
extern double step=25;
extern int StepMode=0;
// Åñëè StepMode = 0, òî øàã ìåæäó îðäåðàìè ôèêñèðîâàííûé è ðàâåí step
// Åñëè StepMode = 1, òî øàã ïîñòåïåííî óâåëè÷èâàåòñÿ
extern double proffactor=10;
extern double mult=1.5;
extern double lotsbuy=0.01;
extern double lotssell=0.01;  
extern double per_K=200;
extern double per_D=20;
extern double slow=20;
extern double zoneBUY=50;
extern double zoneSELL=50;
extern double Magicbuy=555;
extern double Magicsell=556;
double openpricebuy,openpricesell,lotsbuy2,lotssell2,lastlotbuy,lastlotsell,tpb,tps,cnt,smbuy,smsell,lotstep,
ticketbuy,ticketsell,maxLot,free,balance,lotsell,lotbuy,dig,sig_buy,sig_sell,ask,bid;                           
                                int OrdersTotalMagicbuy(int Magicbuy)
 {
   int j=0;
   int r;
   for (r=0;r<OrdersTotal();r++)
   {
     if(OrderSelect(r,SELECT_BY_POS,MODE_TRADES))
     {
        if (OrderMagicNumber()==Magicbuy) j++;
     }
   }   
 return(j); 
 }

                                int OrdersTotalMagicsell(int Magicsell)
{
   int d=0;
   int n;
   for (n=0;n<OrdersTotal();n++)
   {
     if(OrderSelect(n,SELECT_BY_POS,MODE_TRADES))
     {
        if (OrderMagicNumber()==Magicsell) d++;
     }
   }    
 return(d);
  }     
                                      int orderclosebuy(int ticketbuy)
     {
string symbol = Symbol();
int cnt;
    for(cnt = OrdersTotal(); cnt >= 0; cnt--)
       {
       OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);       
       if(OrderSymbol() == symbol && OrderMagicNumber()==Magicbuy) 
         {
         ticketbuy=OrderTicket();OrderSelect(ticketbuy, SELECT_BY_TICKET, MODE_TRADES);lotsbuy2=OrderLots() ;                         
         double bid = MarketInfo(symbol,MODE_BID); 
         RefreshRates();
         OrderClose(ticketbuy,lotsbuy2,bid,3,Magenta); 
         }
       }
       lotsbuy2=lotsbuy;return(0);
     } 
                                      int orderclosesell(int ticketsell)
     {
string symbol = Symbol();
int cnt;   
    for(cnt = OrdersTotal(); cnt >= 0; cnt--)
       {
       OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);       
       if(OrderSymbol() == symbol && OrderMagicNumber()==Magicsell) 
         {
         ticketsell=OrderTicket();OrderSelect(ticketsell, SELECT_BY_TICKET, MODE_TRADES);lotssell2=OrderLots() ;                         
         double ask = MarketInfo(symbol,MODE_ASK); 
         RefreshRates();
         OrderClose(ticketsell,lotssell2,ask,3, Lime); 
         }
       }
       lotssell2=lotssell;return(0); 
     }
                                                 int start()
  {
//----
  double profitbuy=0;double profitsell=0;
  string symbol = OrderSymbol();
  double spread = MarketInfo(symbol,MODE_SPREAD);
  double minLot = MarketInfo(symbol,MODE_MINLOT);
  if (minLot==0.01){dig=2;maxLot=MarketInfo(symbol,MODE_MAXLOT);}
  if (minLot==0.1){dig=1;maxLot=((AccountBalance()/2)/1000);}
  if(OrdersTotalMagicbuy(Magicbuy)>0)
  {
  double smbuy;
  for (cnt=0;cnt<OrdersTotal();cnt++)
    {
    OrderSelect(cnt,SELECT_BY_POS, MODE_TRADES);
    if (OrderSymbol() == Symbol() && OrderMagicNumber () == Magicbuy) 
      {
      ticketbuy = OrderTicket();OrderSelect(ticketbuy,SELECT_BY_TICKET, MODE_TRADES);
      smbuy = smbuy+OrderLots();openpricebuy = OrderOpenPrice();lastlotbuy = OrderLots();
      }
    }
    {   
    if (smbuy+(NormalizeDouble((lastlotbuy*mult),dig))<maxLot)
      {     
      if(StepMode==0)
        {
        if(Ask<=openpricebuy-step*Point)
          {
          lotsbuy2=lastlotbuy*mult;
          RefreshRates();ticketbuy=OrderSend(Symbol(),OP_BUY,NormalizeDouble(lotsbuy2,dig),Ask,3,0,0,"MartingailExpert",Magicbuy,0,Blue);
          }
        }
      if(StepMode==1)
        {
        if(Ask<=openpricebuy-(step+OrdersTotalMagicbuy(Magicbuy)+OrdersTotalMagicbuy(Magicbuy)-2)*Point)
          {
          lotsbuy2=lastlotbuy*mult;
          RefreshRates();ticketbuy=OrderSend(Symbol(),OP_BUY,NormalizeDouble(lotsbuy2,dig),Ask,3,0,0,"MartingailExpert",Magicbuy,0,Blue);
          } 
        }
      }
    }
  }
  if(OrdersTotalMagicsell(Magicsell)>0)
  {
  double smsell;
  for (cnt=0;cnt<OrdersTotal();cnt++)
    {
    OrderSelect(cnt,SELECT_BY_POS, MODE_TRADES);
    if (OrderSymbol() == Symbol() && OrderMagicNumber () == Magicsell)
      {
      ticketsell = OrderTicket();OrderSelect(ticketsell,SELECT_BY_TICKET, MODE_TRADES);
      smsell = smsell + OrderLots();openpricesell = OrderOpenPrice();lastlotsell = OrderLots();
      }     
    }
    {
    if (smsell+(NormalizeDouble((lastlotsell*mult),dig))<maxLot)
      {
      if(StepMode==0)
        {
        if(Bid>=openpricesell+step*Point)
          {
          lotssell2=lastlotsell*mult;
          RefreshRates();ticketsell=OrderSend(Symbol(),OP_SELL,NormalizeDouble(lotssell2,dig),Bid,3,0,0,"MartingailExpert",Magicsell,0,Red);
          }
        }
      if(StepMode==1)
        {
        if(Bid>=openpricesell+(step+OrdersTotalMagicsell(Magicsell)+OrdersTotalMagicsell(Magicsell)-2)*Point)
          {
          lotssell2=lastlotsell*mult;
          RefreshRates();ticketsell=OrderSend(Symbol(),OP_SELL,NormalizeDouble(lotssell2,dig),Bid,3,0,0,"MartingailExpert",Magicsell,0,Red);
          }
        }
      }
    }  
  }
  if(OrdersTotalMagicbuy(Magicbuy)<1)
  { 
  if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,0,1)>iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,1)
  && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,1)>zoneBUY)ticketbuy = OrderSend(Symbol(),OP_BUY,lotsbuy,Ask,3,0,0,"MartingailExpert",Magicbuy,0,Blue);
  }
  if(OrdersTotalMagicsell(Magicsell)<1)
  {
  if(iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,0,1)<iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,1)
  && iStochastic(NULL,0,per_K,per_D,slow,MODE_LWMA,1,1,1)<zoneSELL)ticketsell = OrderSend(Symbol(),OP_SELL,lotssell,Bid,3,0,0,"MartingailExpert",Magicsell,0,Red);
  }
  for (cnt=0;cnt<OrdersTotal();cnt++)
  {
  OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
  if (OrderSymbol()==Symbol() && OrderMagicNumber () == Magicbuy)
    {
    ticketbuy = OrderTicket();OrderSelect(ticketbuy,SELECT_BY_TICKET, MODE_TRADES);profitbuy = profitbuy+OrderProfit() ;
    openpricebuy = OrderOpenPrice();
    }
  }  
  tpb = (OrdersTotalMagicbuy(Magicbuy)*proffactor*Point)+openpricebuy;
  double bid = MarketInfo(Symbol(),MODE_BID);
  if (profitbuy>0)
  {
  if (Bid>=tpb) orderclosebuy(ticketbuy);
  }
  for (cnt=0;cnt<OrdersTotal();cnt++)
  {   
  OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
  if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magicsell)
    {
    ticketsell = OrderTicket();OrderSelect(ticketsell,SELECT_BY_TICKET, MODE_TRADES);profitsell = profitsell+OrderProfit();
    openpricesell = OrderOpenPrice(); 
    }
  }
  tps = openpricesell-(OrdersTotalMagicsell(Magicsell)*proffactor*Point);
  double ask = MarketInfo(Symbol(),MODE_ASK);    
  if (profitsell>0)
  {
  if (Ask<=tps)orderclosesell(ticketsell);    
  }
  free = AccountFreeMargin();balance = AccountBalance();    
  for (cnt=0;cnt< OrdersTotal();cnt++)
  {   
  OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
  if (OrderSymbol()==Symbol() && OrderMagicNumber () == Magicbuy)  ticketbuy = OrderTicket();
  if (OrderSymbol()==Symbol() && OrderMagicNumber () == Magicsell) ticketsell = OrderTicket();
  }
  if (OrdersTotalMagicbuy(Magicbuy)==0)
  {
  profitbuy=0;ticketbuy=0;tpb=0;
  }
  if (OrdersTotalMagicsell(Magicsell)==0)
  {
  profitsell=0;ticketsell=0;tps=0;
  }
  Comment("FreeMargin = ",NormalizeDouble(free,0),"  Balance = ",NormalizeDouble(balance,0),"  maxLot = ",NormalizeDouble(maxLot,dig),"\n",
  "Totalbuy = ",OrdersTotalMagicbuy(Magicbuy),"  Lot = ",smbuy,"  Totalsell = ",OrdersTotalMagicsell(Magicsell),"  Lot = ",smsell,"\n",
  "---------------------------------------------------------------","\n","Profitbuy = ",profitbuy,"\n",
  "Profitsell = ",profitsell);
//----
   for(int ii=0; ii<2; ii+=2)
     {
      ObjectDelete("rect"+ii);
      ObjectCreate("rect"+ii,OBJ_HLINE, 0, 0,tps);
      ObjectSet("rect"+ii, OBJPROP_COLOR, Red);
      ObjectSet("rect"+ii, OBJPROP_WIDTH, 1);
      ObjectSet("rect"+ii, OBJPROP_RAY, False);
      }    
   for(int rr=0; rr<2; rr+=2)
      {
      ObjectDelete("rect1"+rr);
      ObjectCreate("rect1"+rr,OBJ_HLINE, 0, 0,tpb);      
      ObjectSet("rect1"+rr, OBJPROP_COLOR, Blue);
      ObjectSet("rect1"+rr, OBJPROP_WIDTH, 1);
      ObjectSet("rect1"+rr, OBJPROP_RAY, False);     
     }
   return(0);
}  
//+------------------------------------------------------------------+

 

Откликнулись

1
Разработчик 1
Оценка
(844)
Проекты
1445
72%
Арбитраж
119
29% / 47%
Просрочено
355
25%
Работает
Опубликовал: 3 статьи
2
Разработчик 2
Оценка
(273)
Проекты
396
63%
Арбитраж
70
53% / 26%
Просрочено
198
50%
Свободен
3
Разработчик 3
Оценка
(59)
Проекты
182
55%
Арбитраж
31
45% / 16%
Просрочено
103
57%
Свободен
4
Разработчик 4
Оценка
(182)
Проекты
342
42%
Арбитраж
118
12% / 73%
Просрочено
104
30%
Свободен
Опубликовал: 4 примера
5
Разработчик 5
Оценка
(9)
Проекты
20
70%
Арбитраж
1
0% / 100%
Просрочено
9
45%
Свободен
6
Разработчик 6
Оценка
(180)
Проекты
301
30%
Арбитраж
54
24% / 56%
Просрочено
98
33%
Свободен
7
Разработчик 7
Оценка
(4)
Проекты
7
43%
Арбитраж
5
0% / 60%
Просрочено
3
43%
Свободен
Опубликовал: 1 пример
8
Разработчик 8
Оценка
(20)
Проекты
46
54%
Арбитраж
3
67% / 0%
Просрочено
14
30%
Свободен
9
Разработчик 9
Оценка
(59)
Проекты
90
39%
Арбитраж
26
4% / 77%
Просрочено
40
44%
Свободен
Похожие заказы
Scalping ea mt5 30 - 50 USD
PHẦN 1: TIẾNG ANH (For MQL5 Freelance) Title: I need a Pro Dev for Scalping EA: I provide STRICT Money Management, YOU provide the Strategy Description: I have a strict Capital & Risk Management Framework. The Entry Strategy is UP TO YOU (Must be "King Scalping" / Multi-Timeframe style). 1. STRATEGY (YOUR JOB) * Requirement: You decide the entry logic. It must be a High Probability and High Volume scalping strategy
I’m looking to purchase an MT5 Expert Advisor that focuses on swing trades with large-move targets (e.g., 100+ pips profit per trade ). Requirements ✅ Must work on MetaTrader 5 (MT5) ✅ Can trade any Forex pair (multi-symbol), GOLD preference ✅ Designed for swing trading style (medium-term — not scalping) ✅ Targets 100+ pips per trade / large market moves ✅ Built-in risk management (stop loss, take profit, breakeven
Evil trader 30+ USD
Trading bot using resistance for is strategy with no taking to much of risk on the lots size making it the best trading tp for me to use and also no when to trade and when not to
I have an expert advisor (MQL5) that works professionally on all timeframes. This is a test on a 5-minute timeframe, from $10,000 to $614,195.70, from the beginning of 2025 to the beginning of 2026 on the Dow Jones
1441 30+ USD
444fwefwefw jlklklklklklklklklkeaNRFNEWM EWQJEWQIOREJEWQKLFDNMKLFD.MDW/LFDK.MEWFDLK;EMFWEKLMFWELKFREWNMFNDM,VSDV/S.DAFLMWEO;RWEJRPWOEJWE09PUJR9O EJ WKEWMK F FMKDSMKF SDEWJWJ [Q\ /QLDKNQNDQPIUHQD.Q,DMASDOAIFDA,M DFA AAS,KFDJNLOFD NOIFDJNFDAS NKNLOASJOFIKJD ASOIJFISFNKSNF SFSNOIWWQJ-0I[PKEM DAI-0IK-0DQMDQ NDACAI-0 I- EKQ;LDN0912KDMMOIKM Cdjoiasd f09wilf d qkdfokawsd-09fdkdadsomfasdlkkf-0 q[pkkd-0]q2kda\fld
Signal Logic - Swing points detected correctly (Fractals or N-bar) - BOS triggers only on bar close beyond swing level (+ optional min break distance) - FVG zones detected correctly (3-candle gap) and stored with clear boundaries - FVG invalidation works as configured (full fill / partial fill / timeout) Entry & Execution - Entry only after BOS (if enabled) and on return to active FVG zone - Bar-close confirmation
Hi, I’m searching for a developer who already has a high‑performance Gold EA that can beat the results shown in my screenshot. If you have such an EA, please reply with: - A brief description of how it works (grid, scalping, SMC, etc.) - Backtest results and the set files you used - Whether you’re willing to make minor tweaks so I can use it as my own If the performance looks good, we can discuss adjustments and next
Requirements Specification for the development of the Expert Advisor, in the latest version of MetaTrader 5 including the source code. 1. The idea of the trading system is as follows: market entries are performed when a new renko box is created in the current trend direction using an indicator from Trading view. Indicator Name: Renko Candles Overlay Published By: LonesomeTheBlue Code Available In: Pine Script which
Hello I would like to modify the exit method of the trade for current expert advisor which include martingale trading. basically adjusting the position size and closing the trade. additional details will be provided in the next step
I have 3 pine script of trading view and want to convert it into mql5 code. basically it has 2 script and in that one script I use 2 different ways. so here is 3 stratagy that can work in one code mql5 and I can use in mt5

Информация о проекте

Бюджет
100 - 110 USD
Сроки выполнения
от 1 до 7 дн.