OPEN-SOURCE SCRIPT

(JS) Triple Stochastic

So I ended up adding a ton of stuff to my prior Double Stochastic script which you can see here.

The concept of the Double was to smooth out the existing Stochastic by applying a Stochastic to the existing Stochastic (hence the Double). My concept for the Triple Stochastic is much different. It combines a regular stochastic, stochastic RSI, and the double stochastic to get a smoothed output based on all 3.

Also - since I love being able to see a Squeeze (see my Squeeze Pro indicators - Squeeze Pro 2 & Squeeze Pro Overlays) I added the Squeeze to the Stochastic (the dots). If you're unfamiliar with how a Squeeze works, or what it is, check out my links for explanation. A quick explanation however is that the Squeeze is an indicator that was invented by John Carter that detects price compression before a big move out of a range. This is done by using Bollinger Bands and Keltner Channels, the BB shrink inside the KC. The color of the dots represent the depth of the BB in the KC, white (or black) being the lightest squeeze, red being the standard squeeze, and yellow being the strongest squeeze. Now on to the indicator:

The first thing you'll notice is the options available for the type of Stochastic you'd like to use:
Standard: This is a regular Stochastic
Stochastic RSI: This is the standard Stochastic RSI
Double: This is the Stochastic on top of a Stochastic from the prior version
Triple: This is simply an average of all 3 of the above combined together

(Top indicator shows the Triple Stochastic)

The options "K", "D", and "Smooth" are the settings from a regular Stochastic used to set up the type of Stochastic you choose to use.

Now let's say you're not sure how one type performs compared to another, or you like the quickest momentum change but also like to see the smoothest trend, or you want to use the same types of Stochastic and watch for them to cross like moving averages - for these reasons I added the ability to add a second Stochastic for comparison.

(2nd indicator shows a fast and slow Triple Stochastic together)

Quite obviously, the "K 2", "D 2", and "Smooth 2" are what is used in order to set the parameters for the second Stochastic.

Now another thing I added was the option to replace the regular Stochastic and instead look at the distance between the K and D. By turning off "Use K% and D%" you get to see this in action. To put it simply, a cross above zero would indicate a positive Stochastic crossover, and a cross below zero would represent the opposite. There's also an option titled "SMA Length using Difference" which, to smooth this out a bit, allows you to apply a moving average to the distance. By setting it at 1 you'd see the actual distance between K and D.

(3rd indicator shows the K and D distance used as a plot)

Another thing I wanted to do was add a different type of background that wasn't based on the indicator itself. I decided to use ADX & DMI which is a great way to determine the trend. When you select "ADX/DMI BG" the BG colors will change from being based on the indicator to being based on ADX and DMI.

(The 3rd indicator also shows the ADX/DMI BG being used).

And now finally the last feature I decided to add takes us back to the Squeeze. Essentially it is just the Stochastic shown through the lens of Squeeze momentum, as I ended up plugging the Stochastic output into the Squeeze momentum formula to create an oscillator. By selecting "Use Oscillator" you will see this in action as well.

(Bottom indicator shows the oscillator addition)
ADXDirectional Movement Index (DMI)DMIdmistochasticsqueezeStochastic OscillatorStochastic RSI (STOCH RSI)

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad