trading.kay27

Kay_High_Low

Previous High low plotting.
COPIED from Chris Moody's script and adjusted it for my needs.

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

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

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
//Created by ChrisMoody 7-21-2014
//Daily, Weekly, Monthly, Quarterly, Yearly Projected Highs and Lows 
//Obtained formula from Larry Williams, original formula from Owen Taylor
//Modified by trading.kay for lower time frames
study(title="Kay_High_Low", shorttitle="Kay_H_L", overlay=true) 

s5m = input(false, title="5Min HL?")
s15m = input(true, title="15Min HL?")
sh = input(true, title="Hourly HL?")
s4h = input(false, title="4H HL?")
sd = input(false, title="Daily HL?")
sw = input(false, title="Weekly HL?")
sm = input(false, title="Monthly HL?")

//getData(res) =>
//	pf = (hlc3) * 2
//	pl = pf - high
//	ph = pf - low
//	f = security(tickerid, res, pf[1])
//	h = security(tickerid, res, ph[1])
//	l = security(tickerid, res, pl[1])
//	[f, h, l]

getData(res) =>
    h = security(tickerid, res, high[1])
	l = security(tickerid, res, low[1])
	[h,l]

//-------------------5 Min
[h5, l5] = getData("5")
cl5 = close > l5 or close < h5 ? blue : red

plot(s5m ? l5 : na, title="5M Proj Low",style=circles, color=cl5 ,linewidth=3) 
plot(s5m ? h5 : na, title="5M Proj High",style=circles, color=cl5 ,linewidth=3) 

//-------------------15 mins
[h15, l15] = getData("15")
cl15 = close > l15 or close < h15 ? orange : red

plot(s15m ? l15 : na, title="15M Proj Low",style=circles, color=cl15 ,linewidth=2, transp=0) 
plot(s15m ? h15 : na, title="15M Proj High",style=circles, color=cl15 ,linewidth=2, transp=0) 

//-------------------Hourly
[hh, lh] = getData("60")
clh = close > lh or close < hh ? blue : red

plot(sh ? lh : na, title="H Proj Low",style=circles, color=clh ,linewidth=2, transp=0) 
plot(sh ? hh : na, title="H Proj High",style=circles, color=clh ,linewidth=2, transp=0) 

//--------------------4Hr
[h4h, l4h] = getData("240")
cl4h = close > l4h or close < h4h ? green : red

plot(s4h ? l4h : na, title="4H Proj Low",style=circles, color=cl4h ,linewidth=1) 
plot(s4h ? h4h : na, title="4H Proj High",style=circles, color=cl4h ,linewidth=1) 

//--------------------Daily
[hd, ld] = getData("D")
cld = close > ld or close < hd ? blue : red

plot(sd ? ld : na, title="D Proj Low",style=circles, color=cld ,linewidth=3) 
plot(sd ? hd : na, title="D Proj High",style=circles, color=cld ,linewidth=3)