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
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
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)