Visual difference between the terminal and the tester

 

Hello

Do you have any idea why a code does not give the same result on the trading terminal and the strategy tester?


Here are the screenshots

Tester

Terminal 



Thank you
 
William210:

Hello

Do you have any idea why a code does not give the same result on the trading terminal and the strategy tester?


Here are the screenshots

Tester

Terminal 



Thank you
Seems the same but shifted. Use "Chart shift" feature.
 
Hi again I’m sorry, the screenshots are not well centered The problem is not the signal. It is consistent on both charts What is wrong are the fillings that are not good at all in the tester
 
William210 #:
Hi again I’m sorry, the screenshots are not well centered The problem is not the signal. It is consistent on both charts What is wrong are the fillings that are not good at all in the tester

Ok I missed that.

An other time please post clear screenshots and explain what you are doing exactly. That's the drawing of an indicator ?

 

Here is an image where the two are in sync and finally even the signal is not good. The filling either

And I don’t know which direction to dig for an answer

Why such a difference between the terminal and the tester?

No code error, not even a warning

Any idea of a way to investigate?

Thank you

 
William210 #:

Here is an image where the two are in sync and finally even the signal is not good. The filling either

And I don’t know which direction to dig for an answer

Why such a difference between the terminal and the tester?

No code error, not even a warning

Any idea of a way to investigate?

Thank you

Well there is obviously a bug in your code which triggers only with the tester.

Post your code if you need help.

 
Hello
I think I have a clue for my difference between the terminal and the tester

I tried to fill my 2 zones with only one buffer


#property indicator_label2  "Rsi En zone"
#property indicator_type2   DRAW_FILLING
#property indicator_color2  clrGreen, clrRed


// Entre ces 2 buffers 
SetIndexBuffer( indexBuffer2, g_BufferRsiFill, INDICATOR_DATA); 
SetIndexBuffer( indexBuffer3, g_BufferFill, INDICATOR_DATA); 

ArrayInitialize( g_BufferRsiFill, 0);
ArrayInitialize( g_BufferFill, 0);

These 2 buffers are filled either with the extremes, or with "0" so that the colored zones are detached


and as I see on the chart, the value goes from 0 (the bottom of the chart) to the first value that is not 0 but something else and even filling with something other than 0 doesn't work, it gets confused on the tester display.


I will redo the code, with two filling buffers ....

It's a bit annoying this difference that will cost a lot in resources

 

Hello How are you?

So I come back to this difference between terminal and tester

So it’s not my code, but the problem is the same

Here is the download link https://www.mql5.com/fr/code/16507

There is a difference in display between the two As for mine

See the picture

At the top the tester with the lines that start from the value 0

at the bottom the terminal without parasite line

tester terminal

In the code here is the part that in my opinion makes this difference

You have to look at fill1 and fill2, these are the values that draw the polygon to color and by default it is Zero


         fill1[i] = unio[i];
         if (unio[i] > LevelUp) {
           fill2[i] = LevelUp;
         }
         else if (unio[i] < LevelDown) {
           fill2[i] = LevelDown;
         }
         else {
           fill1[i] = 0;
           fill2[i] = 0;
         }

And this line that we see, is in fact the start of the polygon (0 and 0) that the tester shows and not the terminal

I have some solutions, but I would like your opinion

Thank you

UniOscillator
UniOscillator
  • www.mql5.com
The oscillator based on RSI with adjustable period and color scheme.
 

What are the settings used to reproduce that with the Tester ?

I can't reproduce it.

 

Hello

So I tried on the EURUSD in H1 like you, and I have the defect on the tester

In H1 Param and tester


H1 Param

H1 Tester

In D1 Param and tester

Param D1

Tester D1


If you can’t reproduce, it’s not a code problem then, but a platform or broker problem?

I’m with metatrader 5 build 3802

Thank you

 
William210 #:

Hello

So I tried on the EURUSD in H1 like you, and I have the defect on the tester

In H1 Param and tester



In D1 Param and tester



If you can’t reproduce, it’s not a code problem then, but a platform or broker problem?

I’m with metatrader 5 build 3802

Thank you

Please don't cut the time scale in your screenshot.

No I can't reproduce it, tried on 3802 and 3815.


Which broker server are you using ?

Reason: