luyikaibr

Custom MyMA Contrarian Indicator

This indicator was inspired on the Sofien Kaabar's Moving Average Contrarian Indicator - MACI. It is actually a (K,1,1) stochastic indicator built on top of the distance from the price to, what a I call, a Base Moving Average.

What I have found insteresting is that, instead of only paying attention to 0% and 100% moments, I put two K stochastic lines together and observe their relative behavior. My intention, as much as Mr Kaabar's, is to detect mean-reversion moments. I am particularly interested in detecting trends ending and, while I am not able to make the Hurst exponent useful for that purpose, I have found very insightful situations with this Contrarian Indicator.

The Base Moving Average can be chosen between EMA and MyMA. MyMA is a Moving Average that tries to mimic Bo William's MIMA. Due to the close resemblance between MyMA and MIMA, I do not feel comfortable to open this script source code.

Base Moving Average default length is set to 305, and the two stochastic K lines default lengths are 17 and 72. These default lengths come from one of the Fibonacci Phi^3/2 sub series (17, 72, 305), but they can be changed to any values, particularly to the traditionally used 20, 50 and 200. Up to my knowledge, Fibonacci Phi^3 and Phi^3/2 sub series lengths were first proposed by Bo Williams.

This indicator has shown to be particularly useful when used together with the PVPC indicator at moments when the price is above 3 green lines. On these situations we must choose between keeping in the trend or inverting our position due to a potential mean-reversion. The PVPC indicator can be found on my published scripts list under the name CMyMA + Fibo.

I have noticed that when the price is above 3 PV (green) lines, but the smallest K line is below the largest K line, then the up trend does not persist. I have not used with it to check for down trends but the smallest K line above the largest K line should suggest the start of a, possibly small, upward movement.

As Kaabar suggests, when both K lines are at 100%, the price will eventualy start to fall. On the other hand, when both are at 0% it will start to rise. Things get interesting when they separate from each other, as described right abaove.

This script has also a smothing option that I have not found very useful but could work as stochastic D line.

受保护脚本
该脚本是闭源发布的,您可以自由使用它。您可以收藏它以在图表上使用。您无法查看或修改其源代码。
免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?