TradingView
allanster
2019年10月5日晚上7點10分

Heiken-Ashi Candles 

Bitcoin / United States DollarCoinbase

描述

Simple script to view Heiken-Ashi candles below a normal candles chart.

Could also be useful for using HA calcs in strategy scripts on normal candles chart for proper backtesting.

I adapted this to v4 from original v2 script by @samtsui. If you like please remember to give him a Thumbs Up for his original version! -> tradingview.com/script/1lgqD3UK-I-Heikin-Ashi-Candle/

發布通知

Cosmetic update to match default candle colors.

發布通知

Cosmetic.

發布通知

Added series color support for wickcolor and bordercolor.

發布通知

Updated for Pine Script v5.
評論
gooberpees
This is very cool, allanster. I've had a problem with it though... when I go into replay mode, the candles revert to normal candles. Is there a way around this? I'm working on the 1M timeframe
allanster
@gooberpees, thanks for your comment. I unfortunately was unable to reproduce the behavior you have described. Not suggesting that there is no issue but it makes it hard to troubleshoot without being able to reproduce it myself. Nothing comes to mind why this might be occurring so the only thing I can suggest is to see if a browser refresh sorts it, if not the next thing I would try is seeing if it happens on other chart symbols or only on one particular symbol.
peacefulLizard50262
Thank you for your work and thank you for making sure its up to version!
allanster
@peacefulLizard50262, thanks for your interest and comment!
TheCryptoBot
great job as always :)
allanster
@TheCryptoBot, sorry I missed your comment, always nice to hear from you!
RyanLeeJC
Thanks for your contribution! I am trying to figure out how to only get colour of Heiken Ashi candle of a 4 hour timeframe, while I add the script to a lower timeframe, say 5mins?
allanster
@jianchao88, I published a HTF (higher timeframe) example you may wish to see here: tradingview.com/script/U1QGgSOw-Heikin-Ashi-Source-Function-HTF/
allanster
Per earlier request below by original author @samtsui, I am linking the following work by @PineCoders, which explains the purpose of example scripts like ours in a much more thorough way:
tradingview.com/script/q9laJNG9-Backtesting-on-Non-Standard-Charts-Caution-PineCoders-FAQ/
更多