Miracles with the tester.

 

Dear developers, I have an indicator which gives a signal for entry and a signal for exit.
I start a trading robot with this indicator. Three runs of the tester give me three different results.
I am working with the tester since version 3. As if all the nuances were taken into account: the indicator does not overdraw, the signal is not read on the 0th bar.

I do the tests at the opening prices and double-check in every tick mode. What information do you need to understand why the test results seem to switch at the same indicator and EA settings?

 

As much detail as possible and preferably to servicedesk.

  1. A couple of reports on the results.
  2. Log files.
  3. Server.
  4. What agents are used
  5. Expert Advisor with the indicator (source code is preferable)
  6. .
  7. The settings in the strategy tester.
 
1CMaster:

Dear developers, I have an indicator that gives a signal to enter and a signal to exit.
I run a trading robot with this indicator. Three runs of the tester - three different results.
I have been working with the tester for a long time, since version 3. I sort of considered all the nuances: the indicator does not overdraw and I read the signal not on the 0th bar.

What information do you need to understand, why the test results seem to switch at the same indicator and EA settings?

MT4 MT5?
 
1CMaster:

Dear developers, I have an indicator that gives a signal to enter and a signal to exit.
I run a trading robot with this indicator. Three runs of the tester - three different results.
I have been working with the tester for a long time, since version 3. I sort of considered all the nuances: the indicator does not overdraw and I read the signal not on the 0th bar.

I do tests at open prices and recheck them in every tick mode. What information do you need, to understand why test results switch at the same indicator and EA settings?

Sometimes such miracles happen if some variable (in particular the array) turns out to be uninitialised. // By mistake.

In such cases, in the variable there is a random rubbish, and as a result - like-wonders-in-a-tester :)

Check it, maybe a bump in code. I have (whew, whew) tester doesn't make a miracle lately.

 
alexvd:

As much detail as possible and preferably to servicedesk.

  1. A couple of reports on the results.
  2. Log files.
  3. Server.
  4. What agents are used
  5. Expert Advisor with the indicator (source code is preferable)
  6. .
  7. The settings in the strategy tester.

Dear Developers.

I am sending you all the source code.

A brief instruction:

Open EURUSD H1, put SS (signal system) and FB (fibo bars) indicators on it. They will show two signals - circle - sell signal. All parameters are rigidly prescribed, nothing needs to be set up.

2. Start tester for the period 01.01.2012 - 25.02.2012 EURUSD H1. On a Sell signal, the tester should sell, and close the deal on a close signal.

3 When several Tester runs, it shows different results (+96.80; -156.20; -416.20; -335.20). Correct is -335.20 - and then visually coincide signals tester with signals indicator SS.

The indicator is specially written to check the correctness of the tester. Re-checked it several times by shifting the signals.

What is going on is not clear. I hope you can clarify the situation. I can't run optimisation due to different results.

IMPORTANT: I am running the portable version of Metatrader (/portable) on a server with Windows Server 2008 R2 SP1, 2*Xeon 5640 (12 cores, 24 threads).

Files:
MQL5.zip  248 kb
 
Where is this service-desk - shall I send a request there ?
 
1CMaster:
Where is this service-desk - shall I send a request there ?
in your profile, profile on the top right.
 
1CMaster:

Specificity of MT5: If the indicator buffer is not zeroed on purpose, when working through iCustom(), the terminal may return any rubbish from the stack as a buffer value.

Hence, there appear incomprehensible signals.

Усреднение ценовых рядов без дополнительных буферов для промежуточных расчетов
Усреднение ценовых рядов без дополнительных буферов для промежуточных расчетов
  • 2010.10.25
  • Nikolay Kositsin
  • www.mql5.com
Статья о традиционных и не совсем традиционных алгоритмах усреднения, упакованных в максимально простые и достаточно однотипные классы. Они задумывались для универсального использования в практических разработках индикаторов. Надеюсь, что предложенные классы в определенных ситуациях могут оказаться достаточно актуальной альтернативой громоздким, в некотором смысле, вызовам пользовательских и технических индикаторов.
 
MoneyJinn:

Specificity of MT5: If the indicator buffer is not zeroed deliberately, when working through iCustom(), the terminal may return any rubbish from the stack as a buffer value.

Hence, there appear incomprehensible signals.

Do you have a link to the correct use of iCustom() considering these nuances? I'm tired to check it and search what's the matter.
 
1CMaster:
Is there a link to the correct use of iCustom() considering these nuances ??? Because I'm tired of checking it and searching for what's wrong.

What does iCustom() have to do with it? The indicator to be connected must initialise the buffer (e.g. with zeros if it's an oscillator) before use.

I hinted to you rather precisely yesterday about the origin of your spit.

MetaDriver:

Sometimes such miracles happen if some variable (an array in particular) turns out to be uninitialized. // By oversight.

// Or do you sacredly believe that it's the tester's fault, then why only you?
 
https://www.mql5.com/ru/docs/array/arrayinitialize

ArrayInitialize

Initializes a numeric array with the specified value.

void  ArrayInitialize(
   double  array[],     // инициализируемый массив
   double  value        // значение, которое будет установлено
   );

Parameters

array[]

[out] The numeric array to initialize.

value

[in] New value to be set to all elements of the array.

Документация по MQL5: Операции с массивами / ArrayInitialize
Документация по MQL5: Операции с массивами / ArrayInitialize
  • www.mql5.com
Операции с массивами / ArrayInitialize - Документация по MQL5
Reason: