[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 ?
Remove from Favorite Scripts Add to Favorite Scripts
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

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)

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

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(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)
Интересный индикатор
What's the thing changing the bar color here?
@pipCharlie thank you for making ability to change resolution of murrey math! This is great. I wish the original oscillator had the ability to change the resolution. So that I could have the columns with a resolution different from the chart I am looking at.
FYI change the line 4 to string instead of resolution, then any user will be able to input any logical time frame. all numbers work as is and all larger periods are abbreviated (ie, 60, 240, D, W, 3M, etc)
+1 Reply
pipCharlie ShirokiHeishi
Thanks for the input ShirokiHeishi
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing House Rules Moderators Website & Broker Solutions Widgets Charting Solutions Get Help Feature Request Blog & News FAQ Wiki Twitter
Profile Profile Settings Account and Billing Get Help Ideas Published Followers Following Private Messages Chat Sign Out