Strategy Tester results

 

Hello everyone,

Today I started using the strategy tester on my EA program. The results must be wrong, or at least totally misleading.

Files:
 
Yes.
 
Marco vd Heijden:
Yes.

Hello again,

Could you please and explain why results can be so wrong. I noticed on some tests that I got GetLastError() message #138

 
GrumpyDuckMan:

Hello again,

Could you please and explain why results can be so wrong. I noticed on some tests that I got GetLastError() message #138

Period 1 Hour (H1) 2018.04.13 00:00 - 2018.04.13 23:00 (2018.04.13 - 2018.04.14) 

one day isn't enough to make yourself a idea. 

 
Icham Aidibe:

one day isn't enough to make yourself a idea. 

Sorry I meant to say GetLastError()


2018.05.06 16:12:08.239 2018.05.03 23:59:42  Forum_Test AUDUSD,H1: OrderSend error 148


Woops, I just realised my OrderClose() is wrong. So it might be waiting for my TP to get triggered.

 

I started work on  OrderModify(), I haven't got very far with it. I am just playing around with it atm.

  {
   double bid,ask,TS,TP;
     {
//    Modify short     
      Trade=OrderSelect(OpenPosition,SELECT_BY_TICKET);
      bid=Bid+OrderOpenPrice(); //
      TS=TrailingStop*Point;    //
      TP=bid-TS;
//--- 
//    Modify long
      Trade=OrderSelect(ClosePosition,SELECT_BY_TICKET);           
      ask=Ask-OrderOpenPrice(); //
      TS=TrailingStop*Point;    //
      TP=ask+TS;
     }
   return(errorlevel);
  }
 
 bid=Bid+OrderOpenPrice(); //
Price plus price is meaningless. If you bought at $10 and now price is at $15, what is the  meaning of $25?
Reason: