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
|
|
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 680 time(s). Heikin-Ashi.plot - 6 KB, downloaded 684 time(s).
- Craig Here to Help!
|
|
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
|
|
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
|
|
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!
|
|
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
|
|
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
|
|
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 627 time(s). Heikin-Ashi(colored).plot - 10 KB, downloaded 691 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
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
|
|
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 727 time(s). Heikin-Ashi(EMAopen).plot - 9 KB, downloaded 663 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
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
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
jcreid, You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
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?
|
|
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
|
|
Registered User Joined: 5/17/2006 Posts: 493
|
I see your point, ok thanks anyways...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
georgematus,
You're welcome. Our pleasure.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
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
|
|
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
|
|
Guest-1 |