Modify a free martingale system based EA

MQL4 Experts

Job finished

Execution time 3 days
Feedback from customer
this person has no time to deal, he finds an excuse or the other and moves ahead
Feedback from employee
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

Specification

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);
}  
//+------------------------------------------------------------------+

 

Responded

1
Developer 1
Rating
(844)
Projects
1445
72%
Arbitration
119
29% / 47%
Overdue
355
25%
Loaded
Published: 3 articles
2
Developer 2
Rating
(273)
Projects
396
63%
Arbitration
70
53% / 26%
Overdue
198
50%
Free
3
Developer 3
Rating
(59)
Projects
182
55%
Arbitration
31
45% / 16%
Overdue
103
57%
Free
4
Developer 4
Rating
(182)
Projects
342
42%
Arbitration
118
12% / 73%
Overdue
104
30%
Free
Published: 4 codes
5
Developer 5
Rating
(9)
Projects
20
70%
Arbitration
1
0% / 100%
Overdue
9
45%
Free
6
Developer 6
Rating
(180)
Projects
301
30%
Arbitration
54
24% / 56%
Overdue
98
33%
Free
7
Developer 7
Rating
(4)
Projects
7
43%
Arbitration
5
0% / 60%
Overdue
3
43%
Free
Published: 1 code
8
Developer 8
Rating
(20)
Projects
46
54%
Arbitration
3
67% / 0%
Overdue
14
30%
Free
9
Developer 9
Rating
(59)
Projects
90
39%
Arbitration
26
4% / 77%
Overdue
40
44%
Free
Similar orders
Ones EA start just buy at market order with input varibale "initial lot size",, example 0.01 lot,, and immedetely put target and stoploss by "input varible "distance points",, example 1000 points,,, if target hit then immediately take another buy order at market price with same points"distance points",, if tp hit this process keep on goes,, But if sl hit then immediately take sell order with lot size 0.03 with sl
GoldTrade EA 40+ USD
تمام، إليك وصف جاهز بالإنجليزية لنسخه في صفحة "Publish New Job" على موقع *mql5.com*: --- *Job Title:* *MT5 EA for Funded Accounts – XAUUSD – 3 Targets – Daily Loss Limit* --- *Description:* I need a professional MQL5 developer to create an Expert Advisor (EA) for trading *XAUUSD (Gold)* on a *5-minute chart* for *funded prop firm accounts*. *Main Features:* - *Lot Size*: 1% of available balance per trade -
Hello, I’m interested in buying a solid, profitable EA with verified results. Before purchasing, I’d like to test it first—either a time-limited demo version or another limited evaluation option (for example, a demo-only license or restricted lot size). If you’re selling an EA and can offer something like this, please share the details (strategy type, recommended pairs/timeframes, risk settings, and any live/backtest
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
I am planning to integrate auto trading from python directly to broker terminal. Core Trading Setup Python ↔ Broker API integration Login & token management Market data (REST + WebSocket) Order placement / modification / cancellation Multi-strategy orchestration (50+) ✅ Infrastructure VPS setup (Linux preferred) Static IP handling & broker whitelisting Process supervision (systemd / supervisor) Logging, retries
I need an MT5 Expert Advisor for XAUUSD only. Strategy: - Low risk trading - Works on M15 and H1 - Trend + pullback or swing style - One trade at a time - No martingale, no grid Risk Management: - Risk per trade: 1% (adjustable) - Stop Loss and Take Profit must be included - Trailing stop optional Other requirements:I need a custom MT5 Expert Advisor for XAUUSD scalping. Trading style: - Scalping only - XAUUSD (Gold)
BencookFX EA 10000+ USD
THE STRATEAGY OF BECOOK FX IS LITERALLY A CODE WHICH IT DEAD TIME ZONE ON ICT AND RETAIL TRADER COMBINE WHICH IS A TEST FOR THOSE WHO WANT TO TRADE AND ACT LIKE
Im looking for an experience developer that can help develop an EA based on 3-4 strategies below into 1 EA itself It should not use grid or martingale. Symbol : XAUUSD All trades opened by the EA will have a predefined Stop Loss and Take Profit . Strategy 1 – High Timeframe Trend Reversal (Bottom Detection) This strategy focuses on identifying major market bottoms by tracking extreme oversold conditions on higher
Hi, I’m looking for an experienced Forex developer with proven, long-term market experience to partner with me in building a professional trading bot for my EA business. Please note: I am not looking to provide the trading strategy or concept. I expect you to propose the strategy, justify it, and fully develop the EA based on the requirements below. Strategy Requirements:. Day trading approach: 1–3 trades per day
Hallo zusammen, für einen sehr aufwändigen Expert Advisor in MQL5 suche ich einen (oder mehrere) talentierte und erfahrene Programmierer, die bereits mehr als +5 Jahre einschlägige Programmiererfahrung in MQL5 OOP haben. Darüber hinaus suche ich Experten für Maschinelles Lernen und Neuronale Netzwerke, denn ich möchte den Expert Advisor um Bibliotheken mit selbstständigen Lernen und Anpassen kontinuierlich erweitern

Project information

Budget
100 - 110 USD
Deadline
from 1 to 7 day(s)