pipCharlie

[RS] MTF Murrey's Math Lines Channel

Took the orginal Murrey's Math Lines Channel and added Multi Timeframe functionality.
Question though, how do I get 4H available in the drop down list when setting the desired timeframe ?
Thanks
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?
study(title="[RS-MTF] Murrey's Math Lines Channel Colors", shorttitle="[RS] MTF MMLC", overlay=true)
//Defaults to Current Chart Time Frame --- But Can Be Changed to Higher Or Lower Time Frames
useCurrentRes = input(true, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=resolution, defval="D")
res = useCurrentRes ? period : resCustom

//SET COLORS
color08 = #008000 
color18 = #3CB371
color28 = #32CD32
color38 = #ADFF2F
color48 = gray
color58 = #CD5C5C
color68 = #FA8072
color78 = #FFA07A
color88 = #FF0000

length00 = input(100)
fmultiplier = input(defval=0.125, type=float)

//MIDLINE CALCULATION
hhi = highest(high, length00)
llo = lowest(low, length00)
fraction = (hhi - llo) * fmultiplier
midline = llo + fraction * 4

//MTF MIDLINE CALCULATION
MTF_HHI = security(tickerid, res, hhi)
MTF_LLO = security(tickerid, res, llo)
MTF_FRACTION = security(tickerid, res, fraction)
MTF_MIDLINE = security(tickerid, res, midline)

//PLOT MMLC
plot(MTF_MIDLINE, color=color48, linewidth=2)
plot(MTF_MIDLINE + MTF_FRACTION * 1, color=color38)
plot(MTF_MIDLINE + MTF_FRACTION * 2, color=color28)
p00 = plot(MTF_MIDLINE + MTF_FRACTION * 3, color=color18, linewidth=1)
p01 = plot(MTF_MIDLINE + MTF_FRACTION * 4, color=color08, linewidth=1)
plot(MTF_MIDLINE - MTF_FRACTION * 1 , color=color58)
plot(MTF_MIDLINE - MTF_FRACTION * 2, color=color68)
p02 = plot(MTF_MIDLINE - MTF_FRACTION * 3, color=color78, linewidth=1)
p03 = plot(MTF_MIDLINE - MTF_FRACTION * 4, color=color88, linewidth=1)
fill(p00, p01, color=lime, transp=85)
fill(p02, p03, color=orange, transp=85)