allanster

Heikin-Ashi Source Function

Custom source function for toggling traditional Candle sources or Heikin-Ashi sources on a traditional Candles chart.
Thanks to PineCoders for rounding method: https://www.pinecoders.com/faq_and_code/...
Thanks to @LucF and @RicardoSantos for their advice and enlightenment as always.

NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
版本注释: Simplified code due to plotcandle() function now supporting series color for wickcolor and bordercolor.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,因此交易者可以理解和验证它。为作者加油! 您可以免费使用它,但是在发布中重复使用此代码受网站规则的约束。您可以收藏它以在图表上使用。

想在图表上使用此脚本?
Telegram: https://t.me/allanster • Gunbot Tuners: http://www.allanster.com

If you would like to buy me a refreshing beverage :)...

LTC (preferred): LTDaAe7nPzbpBhZVT9o5f9f8M3aZSPa46Y

BTC: 13LhkeXBYrRomVAqbXcoLXHuqMk6Mf7G6N

评论

This publication will be featured in our "Best Scripts of The Month" selection. Thank you for your valuable contribution to the TradingView community, and congrats!
+4 回复
allanster PineCoders
@PineCoders, I stand on the shoulders of giants but am honored to be chosen, thank you so much!
+6 回复
Thank you
+1 回复
allanster TusharKale
@TusharKale, hope you find helpful.
+1 回复
Nice job bro :)
+1 回复
allanster cgminer997
@cgminer997, thanks much appreciated!
回复
Hi Allanster,

Can you please help me out. For in stance for ADAUSDT I have the following tickerdata
Date Open High Low Close Open High Low Close
20210305 1.11261 1.1972 1.03374 1.15908 1.20002 1.20002 1.03374 1.12566
20210306 1.15907 1.183 1.08493 1.129 1.16284 1.183 1.08493 1.139
20210307 1.12901 1.145 1.10562 1.13042 1.15092 1.15092 1.10562 1.12751

The first 4 are for the original tickers and the last 4 are output of your Heikin-Ashi script.
If I calculate the Heikin-Ashi for 20210306, based on the open/close of 20210305 I get (1.20002 + 1.12566) / 2 = 1.135845 which is not equal to what your script calculates being 1.16284. Your script finds the same numbers as the TradingView built-in Heikin-Ashi candles so I must be doing something wrong.

Can you please explain to me?
Kind regards
Eric
回复
Hello, I would test the indicator and certainly update the results.
I like to ask -which time frame - 5min or 15m or 1 hr is this best suited for and is it only for currency trades or also good for euities,
kindly do reply,
thanks,
Deevee
回复
allanster deevee1972
@deevee1972, this is just an example script and not meant to be used as an actual strategy. It is a custom source function for toggling traditional Candle sources or Heikin-Ashi sources on a traditional Candles chart.
回复