ちょのんインジケータのPineソースコード
以下のコードをPineエディタに張り付けてご使用ください。
パラメータや表示名は適宜変更してください。
//@version=4
study("Chonon Indicator", shorttitle="Chonon Indicator", overlay=true)
// 設定: 移動平均線
length1 = 5
length2 = 20
length3 = 60
sma1 = sma(close, length1)
sma2 = sma(close, length2)
sma3 = sma(close, length3)
// 条件1: 5日移動平均線 > 20日移動平均線
condition1 = sma1 > sma2
// 条件2: 20日移動平均線 > 60日移動平均線
condition2 = sma2 > sma3
// 条件3: 過去6か月のパフォーマンスがマイナス
sixMonthsAgoPrice = security(syminfo.tickerid, "D", close[126])
performance = (close - sixMonthsAgoPrice) / sixMonthsAgoPrice
condition3 = performance < 0
// 設定: 相対ボリューム
lengthVolume = 60
relativeVolume = volume / sma(volume, lengthVolume)
// 条件4: 相対ボリューム > 1
condition4 = relativeVolume > 1
// 条件5: 前日の出来高 < 当日の出来高
condition5 = volume[1] < volume
// 矢印を表示
signal = condition1 and condition2 and condition3 and condition4 and condition5
plotshape(signal, style=shape.labeldown, location=location.abovebar, color=color.navy, size=size.normal)