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

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項