EZ Trend creates a signal when the current open price is equal to, or within a set range of, the last close price AND current candle is the opposite color of last candle. This indicator is based on my observation that when O = C AND the last candle's color is opposite of the current candle, the NEXT candle seems to follow the color of the current candle and a change in trend tends to follow.

This is not an absolute rule and it seems to work better with middle and higher priced assets where there is a lesser probability of O = C. Assets with very low prices or low volatility should use a Signal Precision value of 0. (ex: DGBBTC) and larger time frames tend to yield fewer false signals.

Signal precision (the absolute value of the difference between O and C ) can be adjusted in 0.00000001 increments.
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 đồ?
// EZTrend creates a signal when the current open price is equal to, or within a set range of, the last close price AND 
// current candle is the opposite color of last candle. 
// This indicator is based on my observation that when O= C AND the last candle's color is opposite of the current candle, 
// the NEXT candle seems to follow the color of the current candle and a change in trend tends to follow. 
// Signal precision (the absolute value of the difference between O and C) can be adjusted in 0.00000001 increments. 
// This is not an absolute rule and it seems to work better with middle and higher priced assets where there is a lesser probability of O = C. 
// Assets with very low prices or low volatility should use a Signal Precision value of 0. (ex: DGBBTC) and larger time frames tend to yield fewer false signals.

study(title="EZTrend", shorttitle="EZT 1.0", overlay=true)

range = input(0.25,step= 0.00000001, title= "Signal Precision")
show_bgrnd = input(true, title= "Show Background Colors?")

aaa = abs(open[0] - close[1]) <= range ? 1 : 0

bbb = close[1] - open[1] > 0 ? 1 : 0
ccc = close[0] - open[0] > 0 ? 1 : 0

ddd = bbb != ccc ? 1 : 0
eee = aaa and ddd? 1 : 0

fff = ccc == 1 ? 1 : 0
ggg = ccc == 0 ? 1 :0

bgcolor(show_bgrnd and fff? green : na, transp= 75, title= "Buy Background Color" )
bgcolor(show_bgrnd and ggg? maroon : na, transp= 70, title= "Sell Background Color" )

plotchar(fff? eee : na, transp= 0, char= "B", color= green, location= location.belowbar, title= "Buy Character"  )
plotchar(ggg? eee : na, transp= 0, char= "S", color= red, location= location.abovebar, title= "Sell Character"  )

// end