Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Heiken ashi Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jcreid
Posted : Wednesday, August 29, 2007 7:46:54 AM
Registered User
Joined: 3/2/2007
Posts: 29
I wonder if it is possible to create a heiken ashi candle chart or indicator for Blocks 2 or telechart. The formula to create the candles is:

haClose=(Open + High + Low +Close)/4
haOpen= (haOpen(previous bar) + haClose(previousbar))/2
haHigh= (Maximum(High,haOpen)
haLow=Minimum(Low,haOpen)

Thanks
Craig_S
Posted : Wednesday, August 29, 2007 8:23:02 AM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Please save the attached .pane and .plot files to:

My Documents\Blocks Files\Tool Parts\Chart

You can add them to any chart using the ADD STUDY button and then selecting Add Study | My Computer.

You can use QuickEdit to adjust the settings or view the Block Diagrams.

Attachments:
Heikin-Ashi.pane - 8 KB, downloaded 640 time(s).
Heikin-Ashi.plot - 6 KB, downloaded 649 time(s).



- Craig
Here to Help!
jcreid
Posted : Wednesday, August 29, 2007 11:44:27 AM
Registered User
Joined: 3/2/2007
Posts: 29
Thanks Craig.
The chart appears but before it does there is an "Unhandled Exception" error notice saying "Object reference not set to an instance of an object" which is pure gobbledegook to me followed by a whole lot more of the same.
I also would like to colour the candles (which I can probably do myself) as red for down days and green for up days (formula being Red=haClose<haOpen and Green=haClose>haOpen)but I thought I had better not do it in case this error message is something you need to look at.
Also just for yours or anybody else who is interested this web page at http://www.investopedia.com/articles/technical/04/092204.asp explains what this type of chart is about.
Cheers
Bruce_L
Posted : Wednesday, August 29, 2007 12:23:34 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jcreid,
I've uploaded slightly modified versions (developed by StockGuy) to the original topic that do not seem to generate the Unhandled Exception Error.

Use the .pane file if you want a new Pane and the .plot file if you want to display the Study in an existing Pane.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jcreid
Posted : Wednesday, August 29, 2007 12:44:04 PM
Registered User
Joined: 3/2/2007
Posts: 29
Thanks Bruce,
The chart and the plot are showing fine without any error messages. However, I am sorry to be a pain, but I am not sure that it is working properly. The concept is that a down candle is "red" and means that the average price has closed in the lower 50% of it's range over the previous 5 bars and will turn "green" when the average price has closed in the upper 50% of it's range over the previous 5 bars. I hope this makes sense.
Cheers!
Bruce_L
Posted : Wednesday, August 29, 2007 12:56:18 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jcreid,
You had indicated you were going to attempt to do the colors yourself.

It should be fairly simple to implement, but you have described two entirely different methods and the referenced topic does not appear to have any information on the correct way to color the candles (which are red and blue).

QUOTE (jcreid)
I also would like to colour the candles (which I can probably do myself) as red for down days and green for up days (formula being Red=haClose<haOpen and Green=haClose>haOpen)but I thought I had better not do it in case this error message is something you need to look at.

QUOTE (jcreid)
The concept is that a down candle is "red" and means that the average price has closed in the lower 50% of it's range over the previous 5 bars and will turn "green" when the average price has closed in the upper 50% of it's range over the previous 5 bars.


If you would provide further clarification, we would be happy to help you color the heiken ashi candles using whatever method you prefer.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jcreid
Posted : Wednesday, August 29, 2007 1:05:46 PM
Registered User
Joined: 3/2/2007
Posts: 29
Sorry Bruce, I thought I would be able to color the candles myself, but when I saw they were just basically following the normal candlestick pattern, I realized they were not really eliminating the noise. So the last post about the average over the previous 5 bars is what is supposed to happen to eliminate the noise.
If you still can't work with this info, I will try and dig up some more, so please let me know what to do next.
Cheers
Bruce_L
Posted : Wednesday, August 29, 2007 1:18:26 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jcreid,
Please save the attached .pane and .plot files to:

My Documents\Blocks Files\Tool Parts\Chart

You can add them to any chart using the ADD STUDY button and then selecting Add Study | My Computer.

You can use QuickEdit to adjust the settings or view the Block Diagrams.

We can help you modify them if they do not meet your needs.

Attachments:
Heikin-Ashi(colored).pane - 11 KB, downloaded 595 time(s).
Heikin-Ashi(colored).plot - 10 KB, downloaded 652 time(s).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jcreid
Posted : Wednesday, August 29, 2007 1:28:51 PM
Registered User
Joined: 3/2/2007
Posts: 29
Many thanks Bruce, that's working great now, if I make any money from it, I will buy you a pint, but you will have to come to Liverpool to drink it.
Cheers
Bruce_L
Posted : Friday, August 31, 2007 11:32:26 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jcreid,
In looking at the Heikin-Ashi(colored) Pane and Plot, I am not certain they are actually displaying what you want (although they might be). I believe they are displaying:

haClose = (Open + High + Low + Close) / 4
haOpen = (Open(previous bar) + Close(previous bar)) / 2
haHigh = (Maximum(High,haOpen)
haLow = Minimum(Low,haOpen)

Your actual request seems to outline the following description instead:

haClose = (Open + High + Low + Close) / 4
haOpen = (haOpen(previous bar) + haClose(previous bar)) / 2
haHigh = (Maximum(High,haOpen)
haLow = Minimum(Low,haOpen)

If this is the case, I believe haOpen would be the previous value for the 3-Period Exponential Moving Average of haClose. If you agree with this analysis, you may wish to try the attached .pane and .plot files instead. Please save them to:

My Documents\Blocks Files\Tool Parts\Chart

You can add them to any chart using the ADD STUDY button and then selecting Add Study | My Computer.

You can use QuickEdit to adjust the settings or view the Block Diagrams.

Attachments:
Heikin-Ashi(EMAopen).pane - 10 KB, downloaded 694 time(s).
Heikin-Ashi(EMAopen).plot - 9 KB, downloaded 628 time(s).



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jcreid
Posted : Friday, August 31, 2007 11:44:48 AM
Registered User
Joined: 3/2/2007
Posts: 29
Thanks Bruce,
I will do a bit of testing and see if there is much difference, on first sight it looks very similar for the colour change of the candles but they seem to be different sizes and fillings. Anyway, I will leave you in peace for your holiday now, have a good one.
Cheers
Bruce_L
Posted : Friday, August 31, 2007 12:17:39 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
jcreid,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mktwizard123
Posted : Monday, April 28, 2008 12:16:44 PM
Registered User
Joined: 5/17/2006
Posts: 493
Bruce,

Is there any way to create something similar in Telechart? I thought I saw on one of the posts that it would be hard to but can you duplicate something similar either in a custom indicator or percent true setting?
Bruce_L
Posted : Monday, April 28, 2008 12:47:28 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
georgematus,
There are two different Heikin-Ashi Plots presented. Neither can be plotted as candlesticks in TeleChart. It would be possible to Plot Line Chart Custom Indicators for the Heiken-Ashi Open, High, Low and Close for either, but you would have four lines that crossed each other, not a Heikin-Ashi Chart.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mktwizard123
Posted : Monday, April 28, 2008 12:48:31 PM
Registered User
Joined: 5/17/2006
Posts: 493
I see your point, ok thanks anyways...
Bruce_L
Posted : Monday, April 28, 2008 12:51:12 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
georgematus,
You're welcome. Our pleasure.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
mktwizard123
Posted : Friday, November 7, 2008 10:29:32 AM
Registered User
Joined: 5/17/2006
Posts: 493
bruce, would it be possible to create a pcf that would show a heiken ashi green or red candle? not looking to plot a candlestick but just a pcf that returns true for a red or green candle.

thanks
Bruce_L
Posted : Friday, November 7, 2008 12:05:25 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
georgematus,
How would you want to color the candle?

If you want the HA Close to be higher than the previous HA Close for a Green Candle, you could use the following:

Green:

O + H + L + C > O1 + H1 + L1 + C1

Red:

O + H + L + C <= O1 + H1 + L1 + C1

If you want the HA Close to be higher than the HA Open for a Green Candle, you could use the following:

Green:

O + H + L + C > XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1

Red:

O + H + L + C <= XAVGO3.1 + XAVGH3.1 + XAVGL3.1 + XAVGC3.1

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.