Zack_The_Lego

ZTLs Bar_Trend

Here is an adaptation of TTM_Trend I coded. It's all pretty self explanatory. Aqua = buy and red = sell.
There's only one setting to tweak and it's the look-back for highest and lowest.
I have found that this indicator gives signals at almost identical areas to the TTM_Trend but tend to actually be a little more efficient (earlier buy/sell signals), although I haven't thoroughly back-tested it.

Enjoy!
Please comment below if you have any questions.

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
study("ZTLs Bar_Trend", overlay=true)
//Adapted from TTM_Trend by Zack_the_Lego
lookback=input(6, defval=6, minval=1, title = "Bar Range")
barhigh= highest(lookback)
barlow = lowest(lookback)

avgprice= sma(close, 5)
half = (barhigh[1]-barlow[1])/2
range = barhigh[1]-half
barcolor = hl2 >= range ? aqua : red
barcolor(barcolor)