BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScan
  New Posts New Posts RSS Feed: macd histogram scan
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

macd histogram scan

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Topic: macd histogram scan
    Posted: 02 Sep 2008 at 5:45pm

Yes I could see exactly from your example, thanks that helps.

I replaced the code with original MACD formula and made the histogram detection a fraction flexible. ie. 99.9% is close enough to allow a signal.   IPL was missed from the weekly scan because the ascent bar of the histogram was within 1% higher of the previous bar.  It's now close enough to pass the scan.   I really like this entry signal and speaking of financial strength (TA wise)  it would go well with those closing above the 41 MA weekly & 200 MA daily.   Can see by looking at a few charts that at least 2 out of 3 signals result in a price swing.     
 

{ MACD+ }

[Description:="MACD+ Momentum Swing Signal"]

a1 := input("Short MA",12,1);

a2 := input("Long MA",26,1);

a3 := input("Signal period",9,1);

r1 := 2/(a1+1);

r2 := 2/(a2+1);

ma12 := C*r1 + previous(C)*(1-r1);

ma26 := C*r2 + previous(C)*(1-r2);

res := wait(ma12 - ma26,25);

signal := ma(res,a3,E);

[Name=MACD; color=dodger blue]

res;

[name=Signal; linestyle=solid; color=red]

signal;

[color=navy]

0;

[Name=Histogram; linestyle=Histogram; color=black]

histogram:=res - signal;

histogram;

[Name=" "; linestyle=Marker; marker=Long]

descent3:=if(histogram < 0 and histogram*0.999 > hist(histogram,1) and hist(histogram*0.999,1) < hist(histogram,2) and hist(histogram*0.999,2) < hist(histogram,3) and hist(histogram,3) < hist(histogram,4),1,undefined);

descent3;



Edited by maximo - 03 Sep 2008 at 3:07am
Back to Top
pinto View Drop Down
Newbie
Newbie
Avatar

Joined: 29 Aug 2008
Posts: 2
Post Options Post Options   Quote pinto Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 2008 at 8:02am
Hi Maximo,
thanks for that.

I have built the indicator and scan and it certainly shows up interesting things, however, it misses some of the things I want.
It is probably my lack of knowledge I suspect -------- here is an example of what I want it to find.

If you look at a weekly chart of ipl ---- you will see that the weekly macd jumped on the week ending 22/8/08 ------------- the scan misses that signal.
Is it because there are not enough (consistent) weeks in decline before that?
It does, however, give a signal on the week ending 1/8/08.

The scan I want would not be the only criteria for a long entry as many times the weekly macd will begin an upward movement whilst the price is still in decline. I have noticed that when this happens a lot of the time the price will begin an upward movement when the macd gets somewhat closer to the line. This is often the start of a solid up trend.

Along with macd I look at momentum indicators on a shorter time frame as well as financial strength ---- it doesn't often happen but when the 3 are in alignment it really can be party time.

Pinto
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 31 Aug 2008 at 8:40pm
Hi Pinto,
 
What a great idea for  a scan!  This finds the start of all new uptrends and
often well before the MACD crosses over.
 
I created a simplified MACD indicator which is 99.5% the same and it checks for
this signal:   3 descents  before 1 ascent of the histogram and this must be
below the zero line.   Add the following new indicator and create a new scan,
select 'is an indicator signal' and weekly or daily whichever you choose.
 

{ Trend MAC }

[Description:="Simplified MACD"]

a1 := input("Short MA",12,1);

a2 := input("Long MA",26,1);

a3 := input("Signal period",9,1);

[color=blue]

mac:=(C*ma(C,a1,E)-C*ma(C,a2,E))*.20;

mac;

[color=red]

ma(mac,a3,E)

[Name=Histogram; linestyle=Histogram; color=black]

histogram:=mac-ma(mac,a3,E);

histogram;

[Name=" "; linestyle=Marker; marker=Long]

descent3:=if(histogram < 0 and histogram > hist(histogram,1) and hist(histogram,1)<=hist(histogram,2) and hist(histogram,2)<=hist(histogram,3) and hist(histogram,3)<=hist(histogram,4),1,undefined);

descent3;

 
 
 


Edited by maximo - 01 Sep 2008 at 3:54pm
Back to Top
pinto View Drop Down
Newbie
Newbie
Avatar

Joined: 29 Aug 2008
Posts: 2
Post Options Post Options   Quote pinto Quote  Post ReplyReply Direct Link To This Post Posted: 29 Aug 2008 at 10:43am

Hi,

I would like to run a scan that tells me when a weekly macd histogram first ticks upward after several weeks decent.


Can anyone help please?

tia  Smile          Pinto
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

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