BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Heikin - Ashi  Candlesticks
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Heikin - Ashi Candlesticks

 Post Reply Post Reply Page  <1234 5>
Author
Message / View First Unread Post
Gordon7 View Drop Down
Newbie
Newbie
Avatar

Joined: 09 Sep 2012
Location: Sydney
Posts: 6
Post Options Post Options   Quote Gordon7 Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2012 at 7:46am
Thanks cmacdon, it matches the haDelta as it appears on the sample charts on the educofin website.

It's the same as your oscillator but with a 3 day simple moving average overlaid.
Back to Top
jazza View Drop Down
Regular
Regular
Avatar

Joined: 10 Aug 2007
Posts: 33
Post Options Post Options   Quote jazza Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2012 at 3:45pm

 Works a treat. Thanks also for the explanation re your other indicators from yesterday. As always, very much appreciate your help. Cheers

Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2012 at 6:58pm
Set out below is another Heikin Ashi "related" indicator that shows and colours actual bars according to the relevant HA bar that would have been superimposed over it.  The memorandum at the top of the indicator code explains why I have found it to be more appropriate for for use in actula trading EOD or longer tradingperids.
 
It may help overcome tje earlier issue oif showiung fills on candlestick bars as it can be used to colours OHLC bars as well as normal candlesticks.
 
 
-------------------------------------------------------------------------------------
 
 

{Heikin-Ashi is fine for trading intraday as gaps between actual bars are usually minimal intraday. However, one of the potential drawbacks when trying to trade end of day (or longer) is that the "synthetic" Ha bars  bars drawn over actual bars look good on a chart but in trading reality it may be difficult to get order fills or be exact in order placementusing Ha Bars (you cannot get an order fill within a gap which is often absore3d into a HA bar).  A "work around" is to colour real bars with the colour of a relevant HA bar.  This methods expose the gaps between real price bars.  This indicator attempts to do that.

 

For this indicator, congestion bars are absorbed into up or down HA colours.}

 

[target=Price; linestyle=PriceColor]

haClose := (O+H+L+C)/4;

haOpen := (prev + hist(haClose,1))/2;

haHigh := max(H, haOpen, haClose);

haLow := min(L, haOpen, haClose);

haCl:=((O+H+L+C)/4+haOpen+Max((O+H+L+C)/4,Max(H,haOpen))+Min((O+H+L+C)/4,Min(L,haOpen)))/4;

 

Greenlight:=Hahigh-haopen;

Redlight:=Halow-haOpen;

 

{ Inetted off the Traffic lights bars to give longer trends instead of the showing congestion bars}

 

Difflight:=Greenlight+Redlight;

 

[color=Green; name=Trendup]

Difflight >=0.000;

 

[color=Red; name=TrendDown]

Difflight <=0.000;

BC User since June 2007
Back to Top
jazza View Drop Down
Regular
Regular
Avatar

Joined: 10 Aug 2007
Posts: 33
Post Options Post Options   Quote jazza Quote  Post ReplyReply Direct Link To This Post Posted: 11 Sep 2012 at 10:46pm
Hi Cmacdon, Nice addition to the Heikin-Ashi. Interesting points you make. I am very new to Heikin -Ashi, but love the way it filters out the noise and shows the trend. At this stage I am using it in conjunction with normal candlesticks for the more specific price action and gaps that  you are pointing out.

I tried the candlestick overide on the Bullcharts and some more fiddles with the formula but still can't get those pesky down candles to fill!

As always, thanks for your contributions and help. Cheers

Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 12 Sep 2012 at 9:11am
Jazza
 
Ifyou apply the above HA colour bar indicator, turn on candlestick on the top of the chart drop down menu, double click on any price bar to bring up the Price Plot Properties, click on Colour tab, and in that screen click on fill  all bars - it will give you , normal candlesticks with the solid fill HA colours you want. That will probably save you having two screens one with HA and one your normal candlesticks if that is how you are set up.
BC User since June 2007
Back to Top
jazza View Drop Down
Regular
Regular
Avatar

Joined: 10 Aug 2007
Posts: 33
Post Options Post Options   Quote jazza Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2012 at 2:13am

Hi Cmacdon, That’s great. Got it working, thanks very much for that.

I am still trying to replicate the true Heikin- Ashi candlestick formula with the colors filled or with white up and black down candles.

If I use your HA formula as: [target=Price; linestyle=PriceColor] then I will get the OHLC bars which I can override and fill in the price plot as you say , but ends up as a standard colorized Candle price chart, albeit with the trend change colorized ,still not with the HA averaged out bars.

If I go back to the original formula, yours, Maximo’ or Bullcharts as: [linestyle=Candle], then when it is added to the chart as a Candle, it overrides the drop down menu. If you double click the candle, you will not get the price plot.

Any other ideas on how to get those candles filled?

Cheers Jazza

Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2012 at 9:07am
Jazza
 
You can get what you want albeit with some smoke and mirrors but you also end  up with Black up bars and White down HA bars that appear solid fills.
 
Take Maximos candlestick code and change the Lime Green colour to Black and the Red Colour to White.
 
That will give the perception of solid up black bars and solid down white bars.
 
Copy that amended code and change the Target=Price to Target=ribbon,  and reverse the colour Black to White and color white to Black.
 
Put that new ribbon indicator on the chart and go into the advance setting on the ribbon and tick the box solid background.
 
That gives you the ha bars illusion you want and clearly shows the Ha up and down trend.
BC User since June 2007
Back to Top
jazza View Drop Down
Regular
Regular
Avatar

Joined: 10 Aug 2007
Posts: 33
Post Options Post Options   Quote jazza Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2012 at 12:04pm

Hi Cmacdon,

Nice bit of lateral thinking re the trend via the ribbon.  Still doesn’t solve our problem of unfilled down candles. Maybe just got to get my head around the visual flip. Hopefully a solution somewhere.

Thanks again for all your help and input so far.

Cheers Jazza

Back to Top
cmacdon View Drop Down
BullCharts Guru
BullCharts Guru


Joined: 09 Sep 2012
Location: Brisbane
Posts: 236
Post Options Post Options   Quote cmacdon Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2012 at 3:45pm
Jazza
 
I do not know if you have tried the abovebut as well as the Ribbon backgound it shows the proper HA bars filled in solid black for up and solid white for down.
 
 
BC User since June 2007
Back to Top
jazza View Drop Down
Regular
Regular
Avatar

Joined: 10 Aug 2007
Posts: 33
Post Options Post Options   Quote jazza Quote  Post ReplyReply Direct Link To This Post Posted: 13 Sep 2012 at 11:45pm

Hi Cmcdon,

I think we have a slight misunderstanding with terminology. I think the screen shot below is the final result we are talking about?

My point, is that I am trying to achieve the opposite of that, with the white candles for up and the black candles for down as per normal candlestick custom.

Maybe answer is for a “Solid fill” attribute to be added to Bullscript or HA to be coded and added to the linestyle dropdown menu?

Cheers for hanging in with this one, Jazza

Back to Top
 Post Reply Post Reply Page  <1234 5>

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz