OPEN-SOURCE SCRIPT

Fischy Bands (multiple periods)

Just a quick way to have multiple periods. Coded at (14,50,100,200,400,600,800). Feel free to tweak it. Default is all on, obviously not as usable! Try just using 14, and 50.

This was generated with javascript for easy templating.

Source:

```

const periods = [14, 50, 100, 200, 400, 600, 800];

const generate = (period) => {
const template = `
[b${period}, b${period}Upper, b${period}Lower] = bandFor(${period})

plot(b${period}, color=colorFor(${period}, b${period}), linewidth=${periods.indexOf(period)+1}, title="BB ${period} Basis", transp=show${period}TransparencyLine)
pb${period}Upper = plot(b${period}Upper, color=colorFor(${period}, b${period}), linewidth=${periods.indexOf(period)+1}, title="BB ${period} Upper", transp=show${period}TransparencyLine)
pb${period}Lower = plot(b${period}Lower, color=colorFor(${period}, b${period}), linewidth=${periods.indexOf(period)+1}, title="BB ${period} Lower", transp=show${period}TransparencyLine)
fill(pb${period}Upper, pb${period}Lower, color=colorFor(${period}, b${period}), transp=show${period}TransparencyFill)`
console.log(template);
}

console.log(`//version=4
study(shorttitle="Fischy BB", title="Fischy Bands", overlay=true)

stdm = input(1.25, title="stdev")
bandFor(length) =>
src = hlc3
mult = stdm
basis = sma(src, length)
dev = mult * stdev(src, length)
upper = basis + dev
lower = basis - dev
[basis, upper, lower]`);

periods.forEach(e => console.log(`show${e} = input(title="Show ${e}?", type=input.bool, defval=true)`));
periods.forEach(e => console.log(`show${e}TransparencyLine = show${e} ? 20 : 100`));
periods.forEach(e => console.log(`show${e}TransparencyFill = show${e} ? 80 : 100`));



console.log('\n');
console.log(`colorFor(period, series) =>
c = period == 14 ? color.white :
period == 50 ? color.aqua :
period == 100 ? color.orange :
period == 200 ? color.purple :
period == 400 ? color.lime :
period == 600 ? color.yellow :
period == 800 ? color.orange :
color.black
c
`);


periods.forEach(e => generate(e))

```
Moving AveragesmultipleperiodsTrend AnalysisVolatility

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?

Declinazione di responsabilità