Trendy Bar Trend Color

Trendy Bar Trend Color

Inspired by trend candlestick charts on other trading platforms. Changes bar colors to stay in trend much like Heikin Ashi candles without the ATR price distortion. This is done by comparing the HL2 and/or Open-Close values of current candlestick to the prior candlestick .
릴리즈 노트: Cosmetic only, experimental, not intended for use with trading

Update to script:
  • updated the Heikin Ashi calculation for trend coloration
  • Added ability to plot different bar types: High-Low bars without wicks or open & close data, or plot Open-Close bars without wicks
  • Option to only color the existing candlesticks instead of plotting different candlestick types
  • Experimenting with simple ability to highlight possible tops & bottoms of a trend; though it chases trends in live trading. Be careful
  • Experimenting with ability to grey-out consolidation ranges

If you wish to use the different candlestick types, it's advised to hide the existing candlesticks via chart options

Chart with High-Low bars and tops & bottoms highlighted:

Chart with High-Low bars, tops & bottoms highlighted, and consolidations painted grey:
릴리즈 노트: Edit 3:
Corrected Heikin Ashi calculation (again)

오픈 소스 스크립트

진정한 TradingView의 정신에 따라, 이 스크립트의 작성자는 스크립트를 오픈소스로 게시했기에 거래자들이 이해하고 확인할 수 있습니다. 작가님께 건배! 스크립트를 무료로 사용할 수 있지만, 게시물에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


Hi Fauxlife, your candlestick analysis is wonderful. Let say I would like to stick on hollow candles, is it possible to change the color of wick to black? Instead of showing color based on higher high/ higher low or consolidation.
vanness_lyh vanness_lyh
Instead of using "color.yellow", is it possible to code hexadecimal colour values for candlesticks?
fauxlife vanness_lyh
@vanness_lyh, Yes & no 😁 There's a work-around for this since I like to use hollow candles myself. If you use the "Just Color" option from the "Candlestick Option" this will use your chart display but only alter the color of the candlesticks.

For changing the color of anything, you can use the options menu of the indicator.

If you want to input specific hex values, first save a copy of the code to your profile as a new script. Open the script and change any of the color.**** options to the newer color function "color.new(,)" and input your desired hex value for the variable in the function. For instance the line 31 is originally:

col= tbtm and rcol ? color.yellow : ttop and rcol ? color.lime : sideways and ccol ? color.gray : haO < haC ? color.blue : color.red

could be changed to:

col= tbtm and rcol ? color.new(#ffff00, 0) : ttop and rcol ? color.new(#bfff00, 0) : sideways and ccol ? color.new(#c0c0c0, 0) : haO < haC ? color.new(#0000ff, 0) : color.new(#ff0000, 0)

The wick color does not like to be altered or switched dynamically with code. For some reason Pinescript designers want the wick color to be constant. If we change with wickcolor=na variable in line 51 to wickcolor=col (col being line 31, the color switch for different situations) it will throw an error when saving and break the indicator. I'm not a professional coder/scripter, and there may be an elegant work-around for this; but I am not aware of one at this time.
+1 응답
fauxlife fauxlife
@vanness_lyh, I just published a lite version of Trendy. It was completed shortly after Trendy but never made it to the public library for some reason 😅

Trendy Bar Trend Color Lite
+1 응답
vanness_lyh fauxlife
@fauxlife, I see, can I know what's the difference? Which one you prefer haha?
fauxlife vanness_lyh
@vanness_lyh, TBH I think the Lite version is less confusing. The high, low, and consolidation coloring made me indecisive about new positions or closing positions too early when testing.
+1 응답
vanness_lyh fauxlife
@fauxlife, Alright I will try it later, thank you! :)
+1 응답
vanness_lyh fauxlife
Hi @fauxlife ,

Thanks for your reply. I will try it out soon for the input of specific hex values. I hope the color to be more contrast or easy to recognize since I'm using white background of chart.

For the color of wick, I manage to change it through the chart setting that appeared on the right of the top, there're an options about borders and wick, you can just change the color whatever you desire.

You did a wonderful job. Thank you so much. :)
+1 응답
The colored bars only show when I click on setting but disappear when I'm doing looking at the settings.
홈으로 스탁 스크리너 포렉스 스크리너 크립토 스크리너 이코노믹 캘린더 정보 차트 특징 프라이싱 프렌드 리퍼하기 하우스룰(내부규정) 헬프 센터 웹사이트 & 브로커 솔루션 위젯 차팅 솔루션 라이트웨이트 차팅 라이브러리 블로그 & 뉴스 트위터