How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# EZ Trend

307 0
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.
// 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
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter