trading.kay27

Kay_High_Low

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

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
//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)