Experiments in Technical Analysis

karthikmarar

Well-Known Member
Re: Experiments in Technical Analysis - Trading the MACD

Friends

Here is another attempt to get on with the the business of Trading the MACD :)

MACD HISTOGRAMS


Another way to plot the MACD is as a Histogram. The MACD Histogram is nothing but the difference between the MACD line and the signal line plotted as a Histogram. The Histogram line oscillates above and below the zero line rising above the zero line to make a positive peak and then falls below the zero line to make a negative peak.

The Histogram depicts the momentum increasing becomes positive (crossing above the zero line) reaches a peak and then wanes to turn negative (falling below the zero line) and reaches a negative peak and then turn positive again.

Ideally an entry just when the momentum turn from negative and exit when the momentum wanes should give ideal results. Unfortunately stocks dont behave in an ideal way. But catching the negative peaks when the MACD is increasing does provide good entry points in a trending market.

Chart- 8 provides a chart with MACD and MACD Histogram. Next we will see how to couple the Histogram with other signals to get good entries.

To be continued...

regards

Karthik
 
Last edited:

kkseal

Well-Known Member
Kalyan!

I did beat by a huge margin of Rs. 5. My suggested entry was Rs. 695. ;)

Enjoy the trading & Enjoy the banter.

Best Regards,
--Ashish
http://tradingtalks.blogspot.com
I know Ashish I am a regular reader (& beneficiary) of both your wonderful thread & blog (they are to me Practical Workbooks of Magee & Edwards book on Chart Patterns).

It's just how people assume (without any premise) that if you're interested in one thing you're not interested in (& don't make use of) others. I even read threads on EW & am thankful for the views of the experts there as this is an area of TA i'm totally ignorant of.

And everything in TA (graphs, indicators, patterns, waves) is about price & volumes, isn't it?

Regards,
Kalyan.
 
Last edited:

oxusmorouz

Well-Known Member
Re: Experiments in Technical Analysis - Trading the MACD

Friends

Here is another attempt to get on with the the business of Trading the MACD :)

MACD HISTOGRAMS


Another way to plot the MACD is as a Histogram. The MACD Histogram is nothing but the difference between the MACD line and the signal line plotted as a Histogram. The Histogram line oscillates above and below the zero line rising above the zero line to make a positive peak and then falls below the zero line to make a negative peak.

The Histogram depicts the momentum increasing becomes positive (crossing above the zero line) reaches a peak and then wanes to turn negative (falling below the zero line) and reaches a negative peak and then turn positive again.

Ideally an entry just when the momentum turn from negative and exit when the momentum wanes should give ideal results. Unfortunately stocks dont behave in an ideal way. But catching the negative peaks when the MACD is increasing does provide good entry points in a trending market.

Chart- 8 provides a chart with MACD and MACD Histogram. Next we will see how to couple the Histogram with other signals to get good entries.

To be continued...

regards

Karthik
Hi Karthik,
A divergence between the price and the MACDH is bound to happen when the price rises, takes a small correction and the price rises again. Why? Because MACD is nothing but the difference between 2 moving averages and the 2 MAs come close to oneanother when there is a correction/pullback...
I have attached a chart where a clear divergence has taken place. More the corrections/pull backs in a trend, more the divergence between the price and the indicator...atleast from what I can see.

For metastock users, here is the formula/expert for MACDH divergence:
http://rapidshare.com/files/14826129/MACDH_Divergence.exe.html
This self installing program may not work for users of metastock 8.

Oxy
 
Last edited:

kkseal

Well-Known Member
Re: Experiments in Technical Analysis - Trading the MACD

Hi Karthik,

Great going on the MACD. Just a few questions on the MACD Histogram part

1) Would it make any difference if we plot the difference between the MACD & the Signal as a line plot instead of a histogram (as it is, 'histogram' in this case is i feel a bit of a misnomer as there's no frequency involved; it's more of a bar graph The line i suggest would be one connecting the peaks of the bars)

2) Is there any way of calculating the slope of the MACD histogram? Would the LRS of the difference between MACD & Signal be good enough? I've observed that a slope above 45 degrees works quite reliably (whereas anything lower than 45 would be suspect). This, if it proves reliable in an overwhelming majority of cases, can be made use of in Anant's system.

3) Do you think the same concept can be used for the Chaikin Oscillator as well (as CO is also an MACD - of A/D)?

Take your time friend You can carry on your discussions on the MACD & answer my questions later - when you have some free time.

Regards,
Kalyan
 

kkseal

Well-Known Member
WoW! Oxy has already provided the answer to my first question even while i was typing my post! (what can be more 'leading'? ... :)) The observation on divergences of prices & MACDH is also very interesting (shows we don't need to grab a book everytime we want to figure out something Just apply that common sense).

And do i see a confirmation of the slope factor yet again (in the chart posted by Oxy) ??

Regards,
Kalyan.
 

oxusmorouz

Well-Known Member
Hello Kalyan,
The slope of the MACDH would be more than 45* usually when the corrective rally is short but sharp and the succeeding rally is sharp. This is an implication that the market has corrected too much in a very short period of time...
Putting it in other words, are we not perhaps assuming directly or indirectly that the traditional elliot wave principle of a 3 wave correction holds good? (Sorry if I'm crapping here) This setup would probably go for a sixer when there is another retracement and another sharp rally. I have posted a chart which decipts the same

Oxy
 
Last edited:

karthikmarar

Well-Known Member
Re: Experiments in Technical Analysis - Trading the MACD

Hi Karthik,
A divergence between the price and the MACDH is bound to happen when the price rises, takes a small correction and the price rises again. Why? Because MACD is nothing but the difference between 2 moving averages and the 2 MAs come close to oneanother when there is a correction/pullback...
I have attached a chart where a clear divergence has taken place. More the corrections/pull backs in a trend, more the divergence between the price and the indicator...atleast from what I can see.

For metastock users, here is the formula/expert for MACDH divergence:
http://rapidshare.com/files/14826129/MACDH_Divergence.exe.html
This self installing program may not work for users of metastock 8.

Oxy
Hi Oxy

Thanks. I had postponed the discussion on divergence till a later date until we build the basics. Diverences in the Histograms could be more powerful than the divergence on the MACD itself. I plan to cover the Divergence a little later afer we cover the Histograms uses and combining daily Histogram wih the weekly Histograms.

Thanks for the Metastock expert. If you post th code I may be able to adjust it for MS 8 users.

regards

Karthik
 

oxusmorouz

Well-Known Member
Hi Karthik,

Here is the code:

Indicator 1:
Name : "zz macd divergence binary wave bullish"
Formula : If((Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-5) AND H < Ref(H,-5)) AND (Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E) > Ref(Mov(C,12,E) - Mov(C,26,E)-Mov(Mov(C,12,E) - Mov(C,26,E),9,E),-4) AND H < Ref(H,-4)),1,0)

Indicator 2:
Name: "zz macd divergence binary wave bearish"
Formula: If(((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E)
< Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-5) AND C > Ref(C,-5)) AND(Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-1) < Ref((Mov(C,12,E) - Mov(C,26,E)) - Mov((Mov(C,12,E) - Mov(C,26,E)),9,E),-6)AND Ref(C,-1) > Ref(C,-6)),1,0)

----> Expert :
In highlights :
1) Bullish divergence: Fml( "zz MACD divergence binary wave bullish") = 1 (colour = green)
2) Bearish divergence: Fml( "zz macd divergence binary wave bearish") = 1 (colour = red)

In Symbols:
1) Buy :
Fml( "zz MACD divergence binary wave bullish") = 1 AND C > O AND C > Ref(C,-1)
2) Sell:
Fml( "zz macd divergence binary wave bearish") = 1 AND C < O AND C < Ref(C,-1)

This was coded about 2months back when I started off with metastock coding. You would find terrible coding techniques used here and hence, you must excuse me.

However, here is the MACDH formula with customizable time frames (created today):

FMA:= Input("FastMA",1,500,12);
SMA:= Input("SlowMA",1,500,26);
Sig:= Input("Signal",1,500,9);

a:= Mov(C,FMA,E);
b:= Mov(C,SMA,E);
d:= a - b ;
f:= Mov(a-b,Sig,E);
d-f;
0

BTW, I'd also recommend you visiting www.metastocktools.com
Jose's MACDH divergence toolkit is considered superb but it costs E400 I guess.

Oxy
 

kkseal

Well-Known Member
Hello Kalyan,
The slope of the MACDH would be more than 45* usually when the corrective rally is short but sharp and the succeeding rally is sharp. This is an implication that the market has corrected too much in a very short period of time...
Putting it in other words, are we not perhaps assuming directly or indirectly that the traditional elliot wave principle of a 3 wave correction holds good? (Sorry if I'm crapping here) This setup would probably go for a sixer when there is another retracement and another sharp rally. I have posted a chart which decipts the same

Oxy
I was simply trying to figure out whether the chances of failure of EMA crossovers was less when the slope (or rather it's angle) of the corresponding MACDH was greater than 45 degrees - (nothing to do with Elliott but perhaps something to do with GANN). This seems to hold (specially when measured at the point of crossover) - even in the chart you've posted.

In any case i'm not looking to apply it in the MACDH of prices.

Regards,
Kalyan.
 

Similar threads