Hi,
When I switch a chart style from regular candles to Heikin Ashi candles, I expect any applicable indicators on the chart to also change accordingly. This does not seem to be the case. The indicators plots stay the same as if the indicators are plotted only based on the regular candles. Maybe I am missing some setting or misunderstanding how Heikin chart works but I have checked the wiki/forum posts and found no answer. Thanks for your help.
Size:
Color:
Hi,
Your expectation is not correct. The indicators stay always based on the regular bars. ChartStyles are just
chart styles - an eye candy. For indicators to apply to a ChartStyle it'd require certain development effort. For example, see the WealthScript Programming Guide >
Backtesting with ChartStyles.Trending: these chart styles are specially crafted to allow for it.
Although H-A code sample exists in the QuickRef tool (F11 key) > Bars object >
SaveToFile and there are several forum threads with code examples which illustrate the creation of H-A bars, to my surprise none of them feature the application of indicators to H-A:
https://www.wealth-lab.com/Forum/Posts/Create-a-Heikin-Ashi-Bars-Object-39591Fortunately, it's easy with Heikin Ashi. All these examples teach how to create a H-A
Bars object. Applying a DataSeries (an indicator) to the H-A Bars is nothing different from applying one to the regular Bars object. For instance, let's create a H-A bars on the fly, plot it on a ChartPane and apply a SMA to the H-A Bars object:
CODE:
Please log in to see this code.
Size:
Color:
Thanks. I will play with this.
Size:
Color:
You're welcome. Let me know if you have followup questions.
Size:
Color: