McGinley Dynamic Indicator

Here is the formula, supposedly (from Investopedia):

upload_2021-4-17_19-22-55.png


It works ok for smallish price variations, but let's say the price suddenly goes down - a lot - maybe 75%, and stays there. Then the 4th power of Close/MDi-1 becomes tiny, the new MD becomes a fairly big negative, and repeated several times for the next few data points, the whole thing falls apart into NaNs.

If anyone is familiar with this indicator, how is this handled?
 
Last edited:
For now I made it reset itself to Close when it goes <=0. But in googling around, I haven't seen anyone mention this problem. Weird.
 
Back
Top