Download MetaTrader 5

Indicators: ZeroLag MACD

To add comments, please log in or register
Automated-Trading
Admin
106195
Automated-Trading  

ZeroLag MACD:

The MACD oscillator with zero lag. This oscillator is MQL5 version of ZeroLag MACD indicator, published in Russian section of MQL4 CodeBase.

This indicator provides a signal few bars earlier, compared with standard MACD and its divirgence is much more clear.

ZeroLag MACD 

Author: Andrey Voytenko

Robbix
3
Robbix  

You can create a multicolor version?

Thanks!

ChuckM
77
ChuckM  
Automated-Trading:

ZeroLag MACD:

Author: Andrey Voytenko

I've been using your indicator for a few weeks now and I like it so much I would like to include it as confirmation in my EA.

However in the EA, the ExponentialMAOnBuffer() functions always fails, because begin is always zero:

   ExponentialMAOnBuffer(rates_total,prev_calculated,0,FastEMA,FastEMABuffer,val);

If you step the code through debug, you will see what I mean.

Why would this work in the indicator and not in an EA? 

Is there a fix for this?

TIA...ChuckM

ChuckM
77
ChuckM  
ChuckM:

I've been using your indicator for a few weeks now and I like it so much I would like to include it as confirmation in my EA.

However in the EA, the ExponentialMAOnBuffer() functions always fails, because begin is always zero:

If you step the code through debug, you will see what I mean.

Why would this work in the indicator and not in an EA? 

Is there a fix for this?

TIA...ChuckM

Just to close the loop on this...if porting code from an indicator to an EA, the dynamic arrays need to be resized (ArrayResize())...in the indicator, this is done automatically.  Thanks for Rosh for showing me this...ChuckM
Andrey Voytenko
24335
Andrey Voytenko  
The previous version  ZeroLag_MACD  contained a bug, please download the latest version 3.0
Mehrdad Shiri
4626
Mehrdad Shiri  
avoitenko:
thank you for sharing .
Sergey Golubev
Moderator
98377
Sergey Golubev
Moderator
98377
Sergey Golubev
Moderator
98377
Sergey Golubev  
Sergey Golubev
Moderator
98377
Sergey Golubev
Moderator
98377
12
To add comments, please log in or register