Buongiorno,
è possibile convertire questo codice (Synthetic Vix Stochastic) per prorealtime?
Questa è la versione di Larry Williams sugli stocastici, basata sulla sua idea di vix sintetico. Grazie alla rivista Active trader, il suo articolo sull’idea ci mostra come questo strumento può essere usato come strumento di cronometraggio per il suo volpe sintetico. L’idea che riferisce è che il mercato diventa ipervenduto al culmine della volatilità e lo stocastico può evidenziare i periodi in cui il panico potrebbe essere finito. Ciò è dimostrato dalle letture sopra 80 e sotto 20. Egli afferma che il suo indicatore è meno affidabile in cima al mercato piuttosto che in fondo, e l’evidenza suggerisce proprio questo. Le letture stocastiche in questo indicatore sono state adattate per apparire e “sentire” come letture tradizionali. Le sue impostazioni suggerite sono quelle predefinite, ma ho incluso una riga più tradizionale nel codice che legge il WVF in alto e in basso nel calcolo invece del solo WVF, basta decommentare le righe appropriate e vedere di persona.
https://www.tradingview.com/script/GfLctIRH-Synthetic-Vix-Stochastic/
//@version=2
//Author: ShirokiHeishi
//Idea by Larry Williams, on his Synthetic vix formula based on the article in
//ACTIVE TRADER www.activetradermag.com • December 2007 • pgs 24-32
//in his article he suggests that readings above 80 and below 20 are potential bottoming and topping zone.
study(title="Stochastic", shorttitle="WVF_Stoch")
//inputs
//Larry recommended 22 periods for the lookback
//Larry recommended 14 periods for the stochastic
pd = input(22, title="WVF lookback period")
length = input(14, minval=1)
smoothK = input(1, minval=1)
smoothD = input(3, minval=1)
OB = input(80, title="Topping Zone")
OS = input(20, title="Bottoming Zone")
//definitions
//this inverts the output for a more tradional look to the Stochastics
wvf = ((highest(close, pd)-low)/(highest(close, pd)))* -1
vfh = highest(wvf,pd)
vfl = lowest(wvf,pd)
//Larry's original formula as recorded in the article
//WVF = (highest (close,22)- low)/(highest(close,22))*100
//uncomment for a more traditional reading similar to standard stochastics
// k = sma(stoch(wvf, vfh, vfl, length), smoothK)
k = sma(stoch(wvf, wvf, wvf, length),smoothK)
d = sma(k, smoothD)
// outputs
plot(k, color=white, transp=0, linewidth=2)
plot(d, color=maroon, transp=0, linewidth=2)
h0 = hline(OB, linestyle=dotted, color=maroon, title="Potential Topping Zone")
h1 = hline(OS, linestyle=dotted, color=teal, title="Potential Bottoming Zone")