cBoer

TF Entry and Exit (Murrey Based)

TF Entry and Exit (Murrey Based) with Alerts
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 đồ?
// Created & Developed by Ucsgears, based on Murrey Math Line Principle - Modified by CCB 20.03.2015
// Version 2 - March, 12 - 2015

study(title="Murrey Based Trifecta Entry and Exit", shorttitle="TRIFECTA_E_X", overlay=true, precision = 2)

// Inputs
length = input(100, minval = 10, title = "Look back Length")
mult = input(0.125, title = "Mutiplier; Only Supports 0.125 = 1/8")
bc = input(false, title = "Show 'Murrey' Bar Colors")


// Donchanin Channel
hi = highest(high, length)
lo = lowest(low, length)
range = hi - lo
multiplier = (range) * mult
midline = lo + multiplier * 4

oscillator = (close - midline)/(range/2)

a = oscillator > 0 and oscillator < mult*2
b = oscillator > 0 and oscillator < mult*4
c = oscillator > 0 and oscillator < mult*6
d = oscillator > 0 and oscillator < mult*8

z = oscillator < 0 and oscillator > -mult*2
y = oscillator < 0 and oscillator > -mult*4
x = oscillator < 0 and oscillator > -mult*6
w = oscillator < 0 and oscillator > -mult*8

colordef = a ? #ADFF2F : b ? #32CD32 : c ? #3CB371 : d ? #008000 : z ? #CD5C5C : y ? #FA8072 : x ? #FFA07A : w ? #FF0000 : blue

barChangedBear = ((oscillator[1] > 0 and oscillator[1] < mult*8) and (oscillator < 0 and oscillator > -mult*8)) ? true : false
barChangedBull = ((oscillator[1] < 0 and oscillator[1] > -mult*8) and (oscillator > 0 and oscillator < mult*8)) ? true : false

plotshape(barChangedBear ? oscillator : na, title="Turned Bear", style=shape.circle, color=red, location=location.abovebar)
plotshape(barChangedBull ? oscillator : na, title="Turned Bull", style=shape.circle, color=lime, location=location.belowbar)

// Bar Color Oversold and Overbought
barcolor(bc ? colordef : na)