Could the expert point out what causes the extra unintended order-modify?

 

The error:

Please see position 11 above. After opening the position, it is correctly followed by a modify that adds a tp, then it wrongly adds another modify that changes tp value, gives sl a value that equals tp. The second modified was not intended at all.

What in the code below causes the error? Thank you so much for your advice.

forexjim

 

Please use this to post code . . . it makes it easier to read.


What are the values for point, TrailingStop and TakeProf ? point*Point is not the most readable of code . . .

 
RaptorUK:

Please use this to post code . . . it makes it easier to read.


What are the values for point, TrailingStop and TakeProf ? point*Point is not the most readable of code . . .


Thanks. RaptorUK.

The error:

Please see position 11 above. After opening the position, it is correctly followed by a modify that adds a tp, then it wrongly adds another modify that changes tp value, gives sl a value that equals tp. The second modified was not intended at all.

What in the code in the next post causes the error? Thank you so much for your advice.

forexjim

 
   for(cnt=OrdersTotal();cnt>=0;cnt--)
   {
     OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
          if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) 
          {     
                  if (OrderType()==OP_SELL) 
                  {                     
                          if (TrailingStop>0) 
                          {
                                  if (OrderOpenPrice()-Ask>=(TrailingStop*Point*point+Pips*Point*point)) 
                                  {                                             
                                         if (OrderStopLoss()>(Ask+Point*point*TrailingStop))
                                         {                      
                                            OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*point*TrailingStop,OrderClosePrice()-TakeProfit*Point*point-TrailingStop*Point*point,800,Purple);
                                                 return(0);                                             
                                         }
                                  }
                          }
                  }
   
                  if (OrderType()==OP_BUY)
                  {
                         if (TrailingStop>0) 
                         {
                           if (Bid-OrderOpenPrice()>=(TrailingStop*Point*point+Pips*Point*point)) 
                                {
                                        if (OrderStopLoss()<(Bid-Point*point*TrailingStop)) 
                                        {                                          
                                           OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*point*TrailingStop,OrderClosePrice()+TakeProfit*Point*point+TrailingStop*Point*point,800,Yellow);
                  return(0);
                                        }
                                }
                         }
                  }
        }
   }
 
RaptorUK:

Please use this to post code . . . it makes it easier to read.

What are the values for point, TrailingStop and TakeProf ? point*Point is not the most readable of code . . .


Hi, RaptorUK,

How do I use SRC to post the whole code? It always says "text is too big".

Below is the whole code in non SRC.

Thanks.

EAgreat

==================================

//+------------------------------------------------------------------+
//| 10points 3.mq4 |
//| Copyright © 2005, Alejandro Galindo |
//| http://elcactus.com/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Alejandro Galindo"
#property link "http://elcactus.com/"

//
//
//
//
//

extern int Magic = 41955;
extern bool EcnBroker = true;
extern double TakeProfit = 50;
extern double Lots = 0.01;
extern double InitialStop = 0;
extern double TrailingStop = 20;
extern int MaxTrades = 10;
extern int Pips = 20;
extern int slippage = 5;
extern int SecureProfit = 5;
extern int AccountProtection = 1;
extern int OrderstoProtect = 3;
extern int ReverseCondition = 0;
extern int bar = 1;

extern bool mm = true; // if True the lots size will increase based on account size (I don't recomend use MM with a martingale EA)
extern double risk = 0.1; // risk to calculate the lots size (only if mm is enabled)
extern double lotincrease = 1.63;
extern bool SpreadProtection = true; // If the spread is widen than normal (News time) we will not open positions or continue positions until it normalize
extern int PipTolerance = 5; // value in pips over normal spread to activate the SpreadProtection.


extern string OsMA_is = "OsMa Settings";
extern int FastEMA = 12;
extern int SlowEMA = 26;
extern int SignalSMA = 9;
extern double OsMatf = 30; //osma timeframe

extern string CenterofGravity_isv = "Center of Gravity Settings";
extern int Per = 10;
extern int Price = PRICE_MEDIAN;
extern double Cogtf1 = 240; //cog2 timeperiod
extern double Cogtf2 = 30; //cog2 2nd timeperiod

extern string T3VhfPeriods_is = "VHF Settings";
extern int Length1 = 14;
extern int T3Period1 = 5;
extern double T3Hot1 = 0.7;
extern bool T3Original1 = true;
extern int Length2 = 7;
extern int T3Period2 = 5;
extern double T3Hot2 = 0.7;
extern bool T3Original2 = true;
extern double vhflevel = 0;

extern string _smi = "Smi Settings";
extern int Length = 13;
extern int Smooth1 = 25;
extern int Smooth2 = 2;
extern int Signal = 5;
extern int SmiPrice = PRICE_CLOSE;

//
//
//
//
//

int dg;
int OpenOrders=0, cnt=0;
int mode=0;
int lotsize;
int PreviousOpenOrders=0;
int LastTicket=0, LastType=0;
int myOrderType=0,DontContinue;

bool ContinueOpening = True, AccountisNormal;

double Profit=0;
double PipValue=0;
double sl=0, tp=0;
double BuyPrice=0, SellPrice=0;
double LastPrice=0;
double lotsi=0, mylotsi=0;
double LotStep;
double MinLots=0,MaxLots=0;
double LastClosePrice=0, LastLots=0;
double Spread,WorstSpread,NormalSpread;
double point = 0;
double pipMultiplier = 1;

string text="", text2="", AccountText="";

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//

int init()
{

dg=Digits;
if(dg==3 || dg==5){point=Point*10;pipMultiplier=10;}else{point=Point;pipMultiplier=1;}


NormalSpread=MarketInfo(Symbol(),MODE_SPREAD)/MathPow(10,dg%2);

return(0);
}

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//

int deinit()
{
//----

//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{

PipValue = MarketInfo(Symbol(),16);
if (PipValue==0) { PipValue=5; }

//
//
//
//
//


MinLots=NormalizeDouble(MarketInfo(Symbol(),23),2);
LotStep=NormalizeDouble(MarketInfo(Symbol(),24),2);
MaxLots=NormalizeDouble(MarketInfo(Symbol(),25),2);
lotsize=MarketInfo( Symbol(), MODE_LOTSIZE );

if (lotsize==100000){AccountisNormal=True;} else {AccountisNormal=False;}
if (lotsize==10000){AccountisNormal=False;}

if (AccountisNormal==True) {AccountText="Standard";} else {AccountText="Mini";}

//
//
//
//
//

Spread=MarketInfo(Symbol(),MODE_SPREAD)/MathPow(10,dg%2);

if (Spread>WorstSpread) WorstSpread=Spread;
if (SpreadProtection && Spread>NormalSpread+PipTolerance) DontContinue=1; else DontContinue=0;

//
//
//
//
//

if (AccountisNormal)
{
if (mm)
{
if (MinLots==1) { lotsi=MathFloor(AccountBalance()*risk/100000); }
if (MinLots==0.1) { lotsi=MathFloor(AccountBalance()*risk/10000)/10; }
if (MinLots==0.01) { lotsi=MathFloor(AccountBalance()*risk/1000)/100; }
}
else
{
lotsi=Lots;
}
}
else
{ // then is mini
if (mm)
{
if (MinLots==1) { lotsi=MathFloor(AccountBalance()*risk/10000); }
if (MinLots==0.1) { lotsi=MathFloor(AccountBalance()*risk/1000)/10; }
if (MinLots==0.01) { lotsi=MathFloor(AccountBalance()*risk/100)/100; }
}
else
{
lotsi=Lots;
}
}
if (lotsi>MaxLots){ lotsi=MaxLots; }
if (lotsi<MinLots){ lotsi=MinLots; }

//
//
//
//
//

OpenOrders=0;
for(cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==Symbol() && OrderMagicNumber() == Magic)
{
OpenOrders++;
}
}
if (OpenOrders<1)
{
}

if (PreviousOpenOrders>OpenOrders)
{
for(cnt=OrdersTotal();cnt>=0;cnt--)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
mode = OrderType();
if (OrderSymbol()==Symbol() && OrderMagicNumber() == Magic)
{
if (mode==OP_BUY) { OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage*point,Blue); }
if (mode==OP_SELL) { OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage*point, Red); }
return(0);
}
}
}

PreviousOpenOrders=OpenOrders;
if (OpenOrders>=MaxTrades)
{
ContinueOpening=False;
} else {
ContinueOpening=True;
}
if (LastPrice==0)
{
for(cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
mode = OrderType();
if (OrderSymbol()==Symbol() && OrderMagicNumber() == Magic)
{
LastPrice=OrderOpenPrice();
if (mode==OP_BUY) { myOrderType=2; }
if (mode==OP_SELL) { myOrderType=1; }
}
}
}

//
//
//
//
//

if (OpenOrders < 1)
{
myOrderType=3;
//BUY
//
//
//
//

if (iCustom(NULL,OsMatf,"OsMA-1",FastEMA,SlowEMA,SignalSMA,0,bar) > iCustom(NULL,OsMatf,"OsMA-1",FastEMA,SlowEMA,SignalSMA,0,bar+1)
&& iCustom(NULL,Cogtf1,"Ehlers Center of Gravity",Per,Price,true,0,bar) > iCustom(NULL,Cogtf1,"Ehlers Center of Gravity",Per,Price,true,1,bar)
&& iCustom(NULL,Cogtf2,"Ehlers Center of Gravity",Per,Price,true,0,bar) > iCustom(NULL,Cogtf2,"Ehlers Center of Gravity",Per,Price,true,1,bar)
&& iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar) > iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar+1)
&& iCustom(NULL,0,"T3_VHF",Length2,T3Period2,T3Hot2,T3Original2,0,bar) > iCustom(NULL,0,"T3_VHF",Length2,T3Period2,T3Hot2,T3Original2,0,bar+1)
&& iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar) < vhflevel
&& iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) >= -50 && iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) < 0
&& iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) > iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar+1)) { myOrderType = 2; }

//SELL
//
//
//
//

if (iCustom(NULL,OsMatf,"OsMA-1",FastEMA,SlowEMA,SignalSMA,0,bar) < iCustom(NULL,OsMatf,"OsMA-1",FastEMA,SlowEMA,SignalSMA,0,bar+1)
&& iCustom(NULL,Cogtf1,"Ehlers Center of Gravity",Per,Price,true,0,bar) < iCustom(NULL,Cogtf1,"Ehlers Center of Gravity",Per,Price,true,1,bar)
&& iCustom(NULL,Cogtf2,"Ehlers Center of Gravity",Per,Price,true,0,bar) < iCustom(NULL,Cogtf2,"Ehlers Center of Gravity",Per,Price,true,1,bar)
&& iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar) > iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar+1)
&& iCustom(NULL,0,"T3_VHF",Length2,T3Period2,T3Hot2,T3Original2,0,bar) > iCustom(NULL,0,"T3_VHF",Length2,T3Period2,T3Hot2,T3Original2,0,bar+1)
&& iCustom(NULL,0,"T3_VHF",Length1,T3Period1,T3Hot1,T3Original1,0,bar) < vhflevel
&& iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) <= 50 && iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) > 0
&& iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar) < iCustom(NULL,0,"SMI",Length,Smooth1,Smooth2,Signal,SmiPrice,0,bar+1)) { myOrderType = 1; }

//
//
//
//
//

if (ReverseCondition==1)
{
if (myOrderType==1) { myOrderType=2; }
else { if (myOrderType==2) { myOrderType=1; } }
}
}


for(cnt=OrdersTotal();cnt>=0;cnt--)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
{
if (OrderType()==OP_SELL)
{
if (TrailingStop>0)
{
if (OrderOpenPrice()-Ask>=(TrailingStop*Point*point+Pips*Point*point))
{
if (OrderStopLoss()>(Ask+Point*point*TrailingStop))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*point*TrailingStop,OrderClosePrice()-TakeProfit*Point*point-TrailingStop*Point*point,800,Purple);
return(0);
}
}
}
}

if (OrderType()==OP_BUY)
{
if (TrailingStop>0)
{
if (Bid-OrderOpenPrice()>=(TrailingStop*Point*point+Pips*Point*point))
{
if (OrderStopLoss()<(Bid-Point*point*TrailingStop))
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*point*TrailingStop,OrderClosePrice()+TakeProfit*Point*point+TrailingStop*Point*point,800,Yellow);
return(0);
}
}
}
}
}
}

Profit=0;
LastTicket=0;
LastType=0;
LastClosePrice=0;
LastLots=0;

for(cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==Symbol() && OrderMagicNumber() == Magic)
{
LastTicket=OrderTicket();
if (OrderType()==OP_BUY) { LastType=OP_BUY; }
if (OrderType()==OP_SELL) { LastType=OP_SELL; }
LastClosePrice=OrderClosePrice();
LastLots=OrderLots();
if (LastType==OP_BUY)
{
if (OrderClosePrice()<OrderOpenPrice())
{ Profit=Profit-(OrderOpenPrice()-OrderClosePrice())*OrderLots()/point*Point; }
if (OrderClosePrice()>OrderOpenPrice())
{ Profit=Profit+(OrderClosePrice()-OrderOpenPrice())*OrderLots()/point*Point; }
}
if (LastType==OP_SELL)
{
if (OrderClosePrice()>OrderOpenPrice())
{ Profit=Profit-(OrderClosePrice()-OrderOpenPrice())*OrderLots()/point*Point; }
if (OrderClosePrice()<OrderOpenPrice())
{ Profit=Profit+(OrderOpenPrice()-OrderClosePrice())*OrderLots()/point*Point; }
}
}
}

Profit=Profit*PipValue;
text2="Profit: $"+DoubleToStr(Profit,2)+" +/-";
if (OpenOrders>=(MaxTrades-OrderstoProtect) && AccountProtection==1)
{
if (Profit>=SecureProfit)
{
OrderClose(LastTicket,LastLots,LastClosePrice,slippage*point,Yellow);
ContinueOpening=False;
return(0);
}
}

if (!IsTesting())
{

if (myOrderType==3) { text = "No conditions to open trades"; }

else { text=" "; }

Comment(" Account Type: ",AccountText,"\nLastPrice=",LastPrice," Previous open orders=",PreviousOpenOrders,"\nContinue opening=",ContinueOpening," OrderType=",myOrderType,"\nLots=",lotsi,"\n",text,"\nNormal Spread=",NormalSpread,"\nActual Spread=",Spread,"\nWorst Spread=",WorstSpread);
}

if (myOrderType==1 && ContinueOpening && DontContinue==0)
{
if ((Bid-LastPrice)>=Pips*point || OpenOrders<1)
{
SellPrice=Bid;
LastPrice=0;
if (TakeProfit==0) { tp=0; }
else { tp=SellPrice-TakeProfit*point; }
if (InitialStop==0) { sl=0; }
else { sl=NormalizeDouble(SellPrice+InitialStop*point + (MaxTrades-OpenOrders)*Pips*point,dg); }
if (OpenOrders!=0)
{
mylotsi=lotsi;
for(cnt=1;cnt<=OpenOrders;cnt++)
{
if (MaxTrades>12) { mylotsi=NormalizeDouble(mylotsi*1.5,2); }
else { mylotsi=NormalizeDouble(mylotsi*lotincrease,2); }
}
} else { mylotsi=lotsi; }
if (mylotsi>100) { mylotsi=100; }

//
//
//
//
//

if (!EcnBroker)
OrderSend(Symbol(),OP_SELL,mylotsi,SellPrice,slippage*point,sl,tp,"vq sell",Magic,0,Red);
else
{
int sellTicket = OrderSend(Symbol(),OP_SELL,mylotsi,SellPrice,slippage*point,0,0,"vq sell",Magic,0,Red);
if (sellTicket >= 0)
OrderModify(sellTicket,OrderOpenPrice(),sl,tp,0,CLR_NONE);
}
return(0);
}
}
if (myOrderType==2 && ContinueOpening && DontContinue==0)
{
if ((LastPrice-Ask)>=Pips*point || OpenOrders<1)
{
BuyPrice=Ask;
LastPrice=0;
if (TakeProfit==0) { tp=0; }
else { tp=BuyPrice+TakeProfit*point; }
if (InitialStop==0) { sl=0; }
else { sl=NormalizeDouble(BuyPrice-InitialStop*point - (MaxTrades-OpenOrders)*Pips*point,dg); }
if (OpenOrders!=0) {
mylotsi=lotsi;
for(cnt=1;cnt<=OpenOrders;cnt++)
{
if (MaxTrades>12) { mylotsi=NormalizeDouble(mylotsi*1.5,2); }
else { mylotsi=NormalizeDouble(mylotsi*lotincrease,2); }
}
} else { mylotsi=lotsi; }
if (mylotsi>100) { mylotsi=100; }

//
//
//
//
//

if (!EcnBroker)
OrderSend(Symbol(),OP_BUY,mylotsi,BuyPrice,slippage*point,sl,tp,"vq buy",Magic,0,Blue);
else
{
int buyTicket = OrderSend(Symbol(),OP_BUY,mylotsi,BuyPrice,slippage*point,0,0,"vq buy",Magic,0,Blue);
if (buyTicket >= 0)
OrderModify(buyTicket,OrderOpenPrice(),sl,tp,0,CLR_NONE);
}
return(0);
}
}

return(0);
}

 

EAgreat:


Hi, RaptorUK,

How do I use SRC to post the whole code? It always says "text is too big".

If it's too big for the SRC box add it as a file attachment.

Look through your code . . don't make assumptions, and tell me what point * Point equals ?

 
int sellTicket = OrderSend(Symbol(),OP_SELL,mylotsi,SellPrice,slippage*point,0,0,"vq sell",Magic,0,Red);
if (sellTicket >= 0)
OrderModify(sellTicket,OrderOpenPrice(),sl,tp,0,CLR_NONE);
}
return(0);
What is OrderOpenPrice() here? Nothing because you never selected an order. This modify fails and you never checked the return code and found out.
    int ticket = OrderSend(...)
    if (ticket < 0)
       Alert("OrderSend failed: ", GetLastError());
    else if (!OrderSelect(ticket, SELECT_BY_POS))
       Alert("OrderSelect failed: ", GetLastError());
    else if (!OrderModify(OrderTicket()...)
       Alert("OrderModify failed: ", GetLastError());
Always check return codes including orderSelect
    for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
        OrderSelect(pos, SELECT_BY_POS)                 // Only my orders w/
    &&  OrderMagicNumber()  == magic.number             // my magic number
    &&  OrderSymbol()       == Symbol()                 // and my pair.
    ){
Your point*Point I think is unreadable and not self documenting, I suggest
//++++ These are adjusted for 5 digit brokers.
int     pips2points;    // slippage  3 pips    3=points    30=points
double  pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
int     init(){
     if (Digits % 2 == 1){      // DE30=1/JPY=3/EURUSD=5 forum.mql4.com/43064#515262
                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
    // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
//---- These are adjusted for 5 digit brokers.
 
EAgreat:

The error:

Please see position 11 above. After opening the position, it is correctly followed by a modify that adds a tp, then it wrongly adds another modify that changes tp value, gives sl a value that equals tp. The second modified was not intended at all.

What in the code below causes the error? Thank you so much for your advice.

forexjim

Hi EAgreat,

RaptorUK and WHRoeder have given you some good technical suggestions to look at for your code...


I have a question however about how the problem is being described.

You said:

"Please see position 11 above. After opening the position, it is correctly followed by a modify that adds a tp, then it wrongly adds another modify that changes tp value, gives sl a value that equals tp. The second modified was not intended at all. What in the code below causes the error? Thank you so much for your advice."

Position #11 is the 11th trade. The number 10 and number 9 that follows it are actually earlier trades #10 and #9 that are just closing. They are not modify's of position #11.

It looks like a grid EA...or an EA that opens multiple orders...and some trades are closed after other new trades are opened.

So I don't actually see the SL/TP problem that's being described.

I'm still learning to code myself, so I will be interested to see if I am reading the report correctly.

Hope this help,

Robert

 
There are 4 entries marked #11, the Buy, Modify, Modify then the Stop . . . I think the issue is why the two Modifies rather than one . . . I'm 99% certain I know the answer. I gave a big hint above, I could just say but IMO if the OP follows up on what I suggested he will learn more than me just saying . . . I post here to help people learn. :-)
 

Hi, RaptorUK, WHRoeder, cosmicbeing,

Many thanks for your advice and comments.

I am embarrassed to say I don't know how to program, but I spend a lot of time backtesting and demo testing in the hope of understanding and finding a few good EAs to put in my live accounts.

The EA in question comes from https://www.forex-tsd.com/martingale-average-cost-hedging/3473-10points-3-mq4-424.html which I have been testing happily until I was completely confused by the following:

1. I backtested the EA on three computers with exact EA, indicators, timeframe, presets, etc., yet two had profitable results and one had exactly the opposite. See below:

2. Looking closely, the profitable computers always close a series of positions with a profit, while the losing computer always closes with a loss:

3. Looking even more closely, I notice the losing computer always adds a order-modify to the last position of the series such that the tp was altered and sl was changed to equal tp:

4. Finally, looking microscopically, I find that though not often this strange extra-order-modify-tp=sl bug also happens in tests done on the profitable computers:

5. I have no option but to seek you experts' opinion: What in the code that is causing this and how to correct it?

Many thanks.

EAgreat

 
EAgreat:

Hi, RaptorUK, WHRoeder, cosmicbeing,

Many thanks for your advice and comments.

I am embarrassed to say I don't know how to program, but I spend a lot of time backtesting and demo testing in the hope of understanding and finding a few good EAs to put in my live accounts.

I guess you hope to make money from an EA one day ? well to make money you have to work or invest your own cash . . . that is how it works, so I see 3 options for you:

  1. Learn to code
  2. Go here: https://www.mql5.com/en/job and pay someone to modify someone else's EA
  3. Hope that someone takes pity on you and has the free time to fix every broken EA you bring here

This isn't meant to be harsh, I have some free time to try an help people here learn, if I can, there are others here who know more than I do that do the same . . .

From the results you have shown I wouldn't be surprised if you have data quality issues, what was the modelling quality for those runs ?

Reason: