Spezifikation
I am seeking assistance with an MT5 indicator that I am currently using. The indicator is a multi-timeframe (MTF) zigzag with Fibonacci levels. When I load the indicator multiple times on the same chart—using both current and different higher timeframes (HTF)—the trendlines and Fibonacci levels do not always display as expected.
To test the indicator, I have a set file configured with settings for four instances of the indicator, each with a different colour scheme (I will share the set file for your convenience). When I load the set file on the H4 timeframe, I expect to see four distinct sets of Fibonacci levels and trendlines. Similarly, on the D1 timeframe, I expect three sets, as the lower timeframe is overshadowed by the higher one. On the W1 timeframe, there should be two sets, and on the MN1 timeframe, only one set should be visible.
In certain cases, where the zigzag points are closely located, the indicator works as intended. However, this is not consistent. I have added some debug code to troubleshoot the issue. From what I can observe, the indicator recalculates multiple times. Although it seems to calculate correctly at first, subsequent recalculations cause the zigzag pivots to reset to zero. The indicator appears to be performing unnecessary calculations for zigzag points that are irrelevant, which could potentially be excluded. The focus should only be on enough calculations to draw the Fibonacci levels and trendlines for the four timeframes.
Its important to test it on multiple currency pairs as on some duse to zig zag point it might work and then on others not. I need it to work on all pair at all times. This is a requirement.
Here’s how the indicator should ideally function:
- H4 timeframe: Four sets of Fibonacci levels and trendlines (In the sample clearly just two)
- D1 timeframe: Three sets of Fibonacci levels and trendlines
- W1 timeframe: Two sets of Fibonacci levels and trendlines
- MN1 timeframe: One set of Fibonacci levels and trendlines
I believe all objects have unique IDs, but it would be helpful if you could verify that the uniqueness is maintained throughout the code. The indicator currently contains approximately 2,200 lines of code. I do not want to lose any of the existing inputs, features, or outputs, as it works for me in its current state—particularly the zigzag functionality, which is exactly as I had requested. However, I would appreciate your help in resolving the aforementioned issues.
I wish for it to work flaulessly please