Experiments in Technical Analysis

oxusmorouz

Well-Known Member
Improved MACDH divergence kit :D

Download Link:
http://www.4shared.com/file/10030008/d42b7009/MACDH_Divergence.html

Metastock coding for metastock 8 users:

Indicator 1: zz MACDH
Formula:
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

Indicator 2: zz MACDH Divergence
Formula:
If( H = HHV(H,60) AND Fml( "zz MACDH") = LLV(Fml("zz MACDH"),40),-1,
If(L = LLV(L,25) AND Fml("zz MACDH") = HHV(Fml("zz MACDH"),25),1,0));

Now go to expert advisor ---> new (name it MACDH Divergence kit) ---> symbols:

Symbol 1: Buy
Formula: Fml( "zz MACDH divergence") = 1 AND C > O AND C > Ref(C,-1)

Symbol 2: Sell
Formula: Fml( "zz MACDH divergence") = -1 AND C < O AND C < Ref(C,-1)

Go to highlights:
Highlight 1: Bullish divergence
Formula: Fml( "zz MACDH divergence") = 1

Highlight 2: Bearish Divergence
Formula: Fml( "zz MACDH divergence") = -1

A hectic process, I must say.
I have enclosed a couple of charts.
Note : Trend kills this system (generates too many false trades when in an established trend). The system does not kill the trend ;)

Oxy
 
Last edited:

oxusmorouz

Well-Known Member
Kalyan, I was just trying to establish a link between EWs and MACDH divergence ,LOL...as absurd as it may sound, I strongly believe they are derived from the same premise --> a 3 wave correction
 

karthikmarar

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)
Hi kalyan

Actually it does not make a difference how you plot it as long as you can interpret it properly. But the Histogram presents a easier to visualize and understand picture especially in case of divergences. Also the histogram lends itself to some nice color coding to make the understanding easier and quicker.

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.
Yes you can do the LR on the difference between the MACD and the Signal line. Also you can use Ananths innovative idea of BB on the Histograms as well as the LR of Histogram. But the inherent problem in using this method is the whipsaws. I have been experimenting a lot on Ananths method and realized that the whipsaws will be a inherent problem in this method which can be only reduced by coupling it with another indicator.. More of it later

Right now I am not in a position to comment on the Chaikin Oscillator.

Enclosing a sample chart showing the MACD with Histogram, LR of close and LR of the Histogram.

Regards

Karthik
 
Last edited:

uma_k

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

Hi Anant,

No new post from you for long time. Are you working on any new twist to Experiments in Technical Analysis.

Regards

*** Uma ***
 

kkseal

Well-Known Member
Kalyan, I was just trying to establish a link between EWs and MACDH divergence ,LOL...as absurd as it may sound, I strongly believe they are derived from the same premise --> a 3 wave correction
Could be. If prices rise & fall in 5 & 3 wave patterns then it will get reflected in the MACD as well since both reflect the same price movements.
 

asnavale

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

Hi kalyan

.....................

Yes you can do the LR on the difference between the MACD and the Signal line. Also you can use Ananths innovative idea of BB on the Histograms as well as the LR of Histogram. But the inherent problem in using this method is the whipsaws. I have been experimenting a lot on Ananths method and realized that the whipsaws will be a inherent problem in this method which can be only reduced by coupling it with another indicator.. More of it later

...............................

Regards

Karthik
Hi Karthik,

You are right. The Histogram method has inherent problem of whipsaws. I have already used the Hi-Lo threshold and MA threshold to reduce them. I have described the two options in an earlier post in this thread. You might have gone through that. I was expecting some comments from you on this. Although there was reduction in whipsaws the two alternatives had some other problems in specific cases as I have pointed out in that post. The MA threshold still gives a few more whipsaws compared to Hi-Lo threshold.

I am working on another alternative. It appears to give better performance than all the earlier variants. I will post it in a day or two. Your comments and guidance will be very useful for refining the system.

Regards

-Anant
 

kkseal

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

Hi Karthik,

You are right. The Histogram method has inherent problem of whipsaws. I have already used the Hi-Lo threshold and MA threshold to reduce them. I have described the two options in an earlier post in this thread. You might have gone through that. I was expecting some comments from you on this. Although there was reduction in whipsaws the two alternatives had some other problems in specific cases as I have pointed out in that post. The MA threshold still gives a few more whipsaws compared to Hi-Lo threshold.

I am working on another alternative. It appears to give better performance than all the earlier variants. I will post it in a day or two. Your comments and guidance will be very useful for refining the system.

Regards

-Anant
Hi Anant,

Will be eagerly awaiting your post. I had read your earlier post but really didn't know what to say as both the thresholds seemed to have their own share of problems.

Your efforts are commendable and i'm sure there's some way to fix this (to a reasonable degree); but at the same time any filter should not leave out large chunks of profitable moves - i'm sure you'll agree to that.

Regards,
Kalyan.

P.S.: This whipsaw problem (not just for your system but more or less all MA based systems) somehow keeps playing at the back of my mind all day. I'm sure you or Karthik or both will succeed where my limited intelligence fails.
 

karthikmarar

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

Hi Karthik,

You are right. The Histogram method has inherent problem of whipsaws. I have already used the Hi-Lo threshold and MA threshold to reduce them. I have described the two options in an earlier post in this thread. You might have gone through that. I was expecting some comments from you on this. Although there was reduction in whipsaws the two alternatives had some other problems in specific cases as I have pointed out in that post. The MA threshold still gives a few more whipsaws compared to Hi-Lo threshold.

I am working on another alternative. It appears to give better performance than all the earlier variants. I will post it in a day or two. Your comments and guidance will be very useful for refining the system.

Regards

-Anant
Dear Ananth

Sorry, I did not give any comments as I had not really done a thorough check on your new modifications. Whatever I did showed clearly that these were still prone to too many whipsaws.

I was also experimenting with a dead band and all buy and sell signals will be active only beyond these bands. But these bands have to variable and one needs to adjust them based on the historical value of that particular stock. My work is incomplete as I am finding very little time nowadays. And that is one of the reasons for the MACD posts getting delayed. Do post your new idea and will surely check out and comment.

Warm regards

Karthik
 

uma_k

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

Hi Anant,

I have one request. In your modification to MABIUTS-HB system using Hi-Lo and MA thresholds you have given AFLs for each of them. Can you combine both and make a single AFL with provision for selecting either MA or HI-LO threshold? This will help in running a single AFL instead of two and visualising the differences better.

Regards

*** Uma ***
 

Similar threads