ZigZag issues on MT5

 

Hi,

Whilst considering a shift from MT4 to MT5, there have been a few issues with the standard MT5 ZigZag code. The images below show a ZZ set at 12,5,3. Notice how the white ZZ highs and lows in no way match the underlying price bars. When the chart is refreshed, they reset OK. By refreshed, I mean changing from and back to the original timeframe.

There is no code to show. It's the standard MT5 ZigZag. Any thoughts on why this behavior might be happening?

Thanks.

Before refresh...

After refresh...


another example (no other indicators)


 
Geester:

Hi,

Whilst considering a shift from MT4 to MT5, there have been a few issues with the standard MT5 ZigZag code. The images below show a ZZ set at 12,5,3. Notice how the white ZZ highs and lows in no way match the underlying price bars. When the chart is refreshed, they reset OK. By refreshed, I mean changing from and back to the original timeframe.

There is no code to show. It's the standard MT5 ZigZag. Any thoughts on why this behavior might be happening?

Thanks.

Before refresh...

After refresh...


another example (no other indicators)



I guess it might be the data loading issue in MetaTrader 5.

In MetaTrader 5, it takes quite sometime to load data below H1 timeframe. (They did it for good but this is the side effect on what was supposed to be good)  

During the data loading time, if any indicator is attached, then they just calculate the indicator using whatever data is available at the time of indicator attachment.

However, the data used to calculate indicator could be old data because the data loading is still in progress and not completed.

Now, I just live with them like this.


======================================================================================

The work around might be.

1. Wait some time or

2. Change timeframe back and forth few more times until the latest data is loaded in the chart (I used this trick on MetaTrader 4 sometimes too).

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
Documentation on MQL5: Language Basics / Functions / Event Handling Functions
  • www.mql5.com
The MQL5 language provides processing of some predefined events. Functions for handling these events must be defined in a MQL5 program; function name, return type, composition of parameters (if there are any) and their types must strictly conform to the description of the event handler function. The event handler of the client terminal...
 
Young Ho Seo:


I guess it might be the data loading issue in MetaTrader 5.

In MetaTrader 5, it takes quite sometime to load data below H1 timeframe. (They did it for good but this is the side effect on what was supposed to be good)  

During the data loading time, if any indicator is attached, then they just calculate the indicator using whatever data is available at the time of indicator attachment.

However, the data used to calculate indicator could be old data because the data loading is still in progress and not completed.

Now, I just live with them like this.


======================================================================================

The work around might be.

1. Wait some time or

2. Change timeframe back and forth few more times until the latest data is loaded in the chart (I used this trick on MetaTrader 4 sometimes too).


Hello and thank you very much for sharing your thoughts and experience(s) of this kind of problem with me. What you have said does ring true with the issue. Do you have any further information about "the data loading issue in MetaTrader 5". From what you have said, there is a data loading issue but I had not come across this before and it sounds like this is a known problem? Cheers! 

Reason: