Latest bar "live" on modified Heikin-Ashi
Author: pedro1977
Creation Date: 10/9/2013 8:58 AM
profile picture

pedro1977

#1
Hi, I´m trying to create a modified Heikin-Ashi from a book for intraday and I´d like to know if it´s possible to see the latest bar as it is forming, rather than getting the bars only from the closings. I understand the code creates the DataSeries and generates the bars. Would a "live" bar be another bar to draw ? Also, I´m not sure the modifications are having much effect on the resulting chart, should look more smoothed-out. Sorry, still new at this.

Basic Idea is to substitute

DataSeries HO = Open + 0;
DataSeries HH = High + 0;
DataSeries HL = Low + 0;
DataSeries HC = (Open + High + Low + Close) / 4;

for

DataSeries HO = Open + 0;
DataSeries HC = (Open + High + Low + 2 * Close) / 5;
DataSeries HL = SMA.Series(HO, 5);
DataSeries HH = SMA.Series(HC, 5);



CODE:
Please log in to see this code.
profile picture

Eugene

#2
What is the "live" bar here? Are you talking about the "partial bar" ("ghost bar")? The ability to create it comes from Streaming provider. Or, did you mean updating the Heikin Ashi bars in real time (partial bar)? There might be no need to do it when you better understand how Wealth-Lab operates after reading this FAQ:

FAQ | Data and Data Providers > Is it necessary to have access to intra-bar tick data to daytrade with Wealth-Lab?

P.S. Note: streaming updates to indicators are not supported.
profile picture

pedro1977

#3
Yes, it would be having a partial Heikin Ashi Bar in real time. I figured all the data necessary is coming in from the streaming provider, why wait for the close to update the bar ? The strategy would still trade only on the close, but I would be able to see the formation of the bar in real time. Otherwise, the last Heikin-Ashi bar is outdated for the next 4 minutes and 59 seconds.
profile picture

Eugene

#4
The proper tool for this job would be a ChartStyle -- like Heikin Ashi chart style. This way you could see the partial HA bar developing on the chart's right edge in real time.

The problem is, this open source chart style does not render the ghost bar (it's not implemented correctly). :(
profile picture

pedro1977

#5
According to the document Creating Chart Styles for Wealth-Lab Pro®, it appears it would only take adding something similar (for candles, instead of line) to the following code to the Chart Style, right ?

CODE:
Please log in to see this code.


It already has it, actually. :)

CODE:
Please log in to see this code.
profile picture

Eugene

#6
Not quite. The problem is to actually implement the PartialValue for all these H-A DataSeries. Only then it would be rendered. Currently, it's not defined, and Wealth-Lab won't draw the ghost bar because the actual values are Double.NaN or something like that.
profile picture

Eugene

#7
fyi,

Heikin Ashi plots the "ghost bar" since v2015.04 of the library.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).