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.

Skrip dilindungi
Skrip ini diterbitkan secara sumber tertutup dan anda boleh menggunakannya dengan bebas. Anda boleh menyukainya untuk menggunakannya pada carta. Anda tidak dapat melihat atau mengubah kod sumbernya.
Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?