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

 
RaptorUK:

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 ?


Hi, RaptorUK,

You are absolutely right:

1. I try to learn to code but some things are beyond my current understanding.

2. That is why I invest money buying commercial EAs, sadly hypes are much more than real gold.

3. Indeed there are problem solvers on the internet.

4. Based on same demo testing results, this issue may not be related to data quality.

Many thanks.

EAgreat

 

To illustrate a point (no pun intended) . . . look at the following taken from the code you posted . .

double point = 0;

dg=Digits;
if(dg==3 || dg==5)
   {
   point=Point*10;      // take GBPUSD as an example, on a 5 digit broker Point will be 0.00001 , so point is 0.0001
   pipMultiplier=10;  
   }
else
   {
   point=Point;        // take GBPUSD as an example, on a 4 digit broker Point will be 0.0001 , point is 0.0001
   pipMultiplier=1;
   }

if (OrderOpenPrice()-Ask>=(TrailingStop*Point*point+Pips*Point*point))   // what is Point * point ?  best case is 0.0001 * 0.0001 = 0.00000001
   { 
   if (OrderStopLoss()>(Ask+Point*point*TrailingStop))
      { 
      OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*point*TrailingStop,OrderClosePrice()-TakeProfit*Point*point-TrailingStop*Point*point,800,Purple); // Point * point used here too
                                                                                                    //  Ask + almost zero = Ask , OrderClosePrice() for a Sell = Ask, Ask + almost zero = Ask
      return(0); 
      }
   }
 
RaptorUK:

To illustrate a point (no pun intended) . . . look at the following taken from the code you posted . .


Hi, RaptorUK,

Many thanks for your advice.

Indeed the Point * point was something that was changed by the expert that seems to eliminiate the bug so far.

Merci beaucoup!

EAgreat