Strategy tester (with/without) visual mode get different precise result (Build 2504)

To add comments, please log in or register
SungSungE
385
SungSungE  

Case A : My EA with setting A- using without visual mode  get result net profit -108.26

Case B:  My EA with setting A- using with visual mode  get result net profit  132.49

MT5 (2012/6/1~2012/8/1 Modeling Open prices only)  Build 2504 ,26 Jun 2020

 I only change  visual mode then get different result. It's not far from it, but this really confuse me. 


I guess visual one more near fact ? Maybe without visual mode reduce more detail for computer. 

But visual mode take lots time more than non visual mode, for two month data is 1 mins to 8 mins, for 4 years data ,maybe need 5 hour to check one setting.. O-my God ><

I have tried to setting Modeling as Every tick / 1 OHLC the result still relative to visual/non visual mode  Every-tick( +131.50/-141.44)  OHLC (132.49/-108.26),


ANY other setting can more precise and don't add too much computing time.

The Fundamentals of Testing in MetaTrader 5
The Fundamentals of Testing in MetaTrader 5
  • www.mql5.com
The idea of ​​automated trading is appealing by the fact that the trading robot can work non-stop for 24 hours a day, seven days a week. The robot does not get tired, doubtful or scared, it's is totally free from any psychological problems. It is sufficient enough to clearly formalize the trading rules and implement them in the algorithms, and...
William Roeder
22447
William Roeder  
  1. Does your code, or called indicators, create objects? Don't exist in non-visual mode.
  2. (MT4) Did you specify the spread or use some random current value?
SungSungE
385
SungSungE  
William Roeder:
  1. Does your code, or called indicators, create objects? Don't exist in non-visual mode.
  2. (MT4) Did you specify the spread or use some random current value?

create objects? I think Yes 

 Don't exist in non-visual mode. (How to check this?)

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
When a graphical object is created using the ObjectCreate() function, it's necessary to specify the type of object being created, which can be one of the values of the ENUM_OBJECT enumeration. Further specifications of object properties are possible using functions for working with graphical objects.
SungSungE
385
SungSungE  

O My God ~Another PC use Build 2507 ,26 Jun 2020 

Try the same time interval ,  same source code with rebuild it get different result!!!!


... I think before clean this problem. I need stop all new feature and optimization.

I use my derive Expert.mqh , ExpertSignal.mqh ExpertTrailing.mqh, Trade.mqh from MQL original one.  << those base on 3 month ago code base .. maybe got some problem with current one QQ ?

If possible fix in one version MQL not update anymore. This situation so confuse me  where is issues cause it.

SungSungE
385
SungSungE  

I try to test in PC A, B, C ( win 10,win 10 ,win 7)  different hardware. 

Same version MQL , and change setting with/without display. 

My conclusion is the result is relative to CPU performance !! Because different CPU power get different delay time will result in different result set. 

WTF ...

 


Then because this reason, the original result get from cloud maybe not stable optimization result, because different CPU power get different delay time ,different result... 

Lorentzos Roussos
22861
Lorentzos Roussos  

Hello Sung .

What settings do you have on the strategy tester screen(s)?

Also this : https://www.mql5.com/en/forum/171127 [variable spread is used]

Alain Verleyen
40789
Alain Verleyen  

The problem is not in the CPU or in MT5. The problem is in the code, in 99.9% of the case. Actually I am not even sure I have ever seen a case to justify the lacking 0.1%.

Discussing without seeing the code is just a waste of time.

SungSungE
385
SungSungE  

Code use same binary file with same setting file. 

I have tried several possible case to check image some rule. 


Those two result is similar.  And People can check detail deal timing is similar but different. So the price is different. Deal time maybe 5secs or 5 mins later.(I have been limit spread in source code. 2 month ago maybe 30 not sure ><)

The price from the broker IC Market demo server. For reduce derive, change back to normal Trade.mqh.


Sorry ,Alain Verleyen Not always provide source code for each question. This project got 15 files. Right now, I don't think provide source code will help to clear this issue. 

If I still want make sure something will use gold sample code generate from MQL to check. I will provide those as test sample. 


PC A: Intel G3930 8GB(Win10): setting without diplay

PC B: Intel i5-4460 4GB(Win7):  setting with display


PC B result 


PC A result



SungSungE
385
SungSungE  

MY PC B setting page like this :

 delay : zero latency  ,ideal

 mode : each tick

 visual : display


Lorentzos Roussos not sure your up right block setting?

SungSungE
385
SungSungE  

The PC B display is similar to PC A with display PC C display

The PC B without display is  similar to PC A ? ? not done yet

 
The PC B test result 

   up without display

  down with display 



PC A test result (with graphics card)

   up without display

  down with display 

   

PC C test result 

  up without display

  down with display 

                                            



Before those test ,open price and 1OHLC test not capture.

Lorentzos Roussos
22861
Lorentzos Roussos  

Try running this on the same platform , i though spread was variable but it seems stable to me .Check yours.

//+------------------------------------------------------------------+
//|                                                TesterSpreads.mq5 |
//|                                  Copyright 2020, Republic Of Mars|
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
input int barstotest=30;//Bars to test :
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
datetime barstamp=0;
int barz=0;
int OnInit()
  {
//---
  barstamp=0;
  barz=0;
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
  datetime now=iTime(Symbol(),PERIOD_CURRENT,0);
  if(now!=barstamp)
    {
    double spread=(double)((SymbolInfoDouble(Symbol(),SYMBOL_ASK)-SymbolInfoDouble(Symbol(),SYMBOL_BID))/SymbolInfoDouble(Symbol(),SYMBOL_POINT));
    Alert("BAR ["+IntegerToString(barz)+"] Spread = "+DoubleToString(spread,0));
    barz++;
    barstamp=now;
    } 
    if(barz==(barstotest+1)) ExpertRemove();
  }
//+------------------------------------------------------------------+
Im running the Metaquotes MT5 and with open prices the spread is not varying across tests . Let me know 
Files:
12
To add comments, please log in or register