Experiments in Technical Analysis

karthikmarar

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

Hi Friends

Continuing with "Trading the MACD"...

Trading MACD better combining with ADX

Combining with ADX provides some good additional clues and we can differentiate which are better signals. I call these signals Power Buys, Power Dips and Power shorts. We will take up some example and define some basic rules, which can be consistently followed.

RULE : All Bullish signals Buys, Dips, Hooks, Zero line crossover are generally good when the Both the ADX and DI+ are rising. To differentiate these from other signals we will call then Power Buys, Power Dips etc.

The Afl draws small hollow circles in Magenta color when these power signals occur. A point to be noted here is that though most of the time the Afl does pick up the signals, times the Afl misses these points (I have tried many methods to code the rising AD and DI+ and each had its own drawback) or the ADX and DI+ starts rising soon after the signals occurs. So eyeballing becomes necessary.

RULE: Generally sell signals like bearish ZL crossover, Dips and Hooks are ineffective when Both ADX and DI+ are rising or high above the DI-.

Check out Example –1

We will the standard ADX(14) here along with the MACD.

Those who have downloaded the Afl can check themselves on their charts..

Reagrds

Karthik
 
Last edited:

oxusmorouz

Well-Known Member
You can avoid multiple signals in metastock in the following way:

a:= "Enter the condition for buy" ;
b:= "Enter the condition for sell" ;
(in case of buy signal)
state:=If(BarsSince(a)<BarsSince(b),1,0);
state>Ref(state,-1);

(in case of sell signal)
state:=If(BarsSince(a)>BarsSince(b),1,0);
state>Ref(State,-1);
 
You can avoid multiple signals in metastock in the following way:

a:= "Enter the condition for buy" ;
b:= "Enter the condition for sell" ;
(in case of buy signal)
state:=If(BarsSince(a)<BarsSince(b),1,0);
state>Ref(state,-1);

(in case of sell signal)
state:=If(BarsSince(a)>BarsSince(b),1,0);
state>Ref(State,-1);
I think it may help to modify the MABIUTS - HB code for metastock to avoid multiple signals in metastocks.
 

oxusmorouz

Well-Known Member
Great thread guys!

The MACD (or any indicator based on a moving average for that matter) simply cannot exist without the lag effect. If it did, it would be going against the purpose of what it was meant to do,LOL...follow the trend.

Another point I'd like to stress here is that the lag associated with an indicator is inversely related to the number of false trades generated by a security. So an indicator which doesn't lag the market is an indicator which gives out the most number of false signals! (commission cost + loss incurred from false trades should approximately be equal to the loss incurred by lagging the market). So whether an indicator lags or does not shouldn't be much of a worry to a person unless it lags by a terrible degree or it produces too many false signals...
What,I guess, should be more of a concern is the "smoothness" of the indicator,given the volatility. In the earlier pages of this post, I saw Karthik explaining about the 9 day EMA of the 13 day EMA...an excellent way to increase the smoothness of the indicator (DEMA - Double exponential moving average).
In one of my experiments using the same logic as the base, I have attempted to smoothen the moving average, but only to a great extent (With 7 TEMAs - Triple Exponential Moving Average and 5 Exponential MAs...a bit overcooked but the food has seemingly turned out good)
Here is an example:
http://rapidshare.com/files/12504629/Smoothed_MA.rar.html

For metastock users, here is the metastock code:
Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(C,7,E),2),3,E),2),2,E),2),2,E),2),3,E),2),2,E),2),2,E)

Unfortunately or fortunately, I don't have a clue about amibroker programming
and hence, the amibroker users must forgive me.

Oxymoron
 
Last edited:

karthikmarar

Well-Known Member
Hi Oxy

Interesting... Yes your MA is very smooth indeed. Naturally a little more lagging compared to a similiar period EMA. Thanks for sharing it with us.
Another ingredient for experiment ... :)

regards

Karthik
 
good good...yeh dil mange more....Hi Karthik, I dont know why your thread is making me refer to so many TV commercials and movies. Hmm in short I M Lovin it :)

Regards

Rahul
 

kkseal

Well-Known Member
Great thread guys!

The MACD (or any indicator based on a moving average for that matter) simply cannot exist without the lag effect. If it did, it would be going against the purpose of what it was meant to do,LOL...follow the trend.

Another point I'd like to stress here is that the lag associated with an indicator is inversely related to the number of false trades generated by a security. So an indicator which doesn't lag the market is an indicator which gives out the most number of false signals! (commission cost + loss incurred from false trades should approximately be equal to the loss incurred by lagging the market). So whether an indicator lags or does not shouldn't be much of a worry to a person unless it lags by a terrible degree or it produces too many false signals...
What,I guess, should be more of a concern is the "smoothness" of the indicator,given the volatility. In the earlier pages of this post, I saw Karthik explaining about the 9 day EMA of the 13 day EMA...an excellent way to increase the smoothness of the indicator (DEMA - Double exponential moving average).
In one of my experiments using the same logic as the base, I have attempted to smoothen the moving average, but only to a great extent (With 7 TEMAs - Triple Exponential Moving Average and 5 Exponential MAs...a bit overcooked but the food has seemingly turned out good)
Here is an example:
http://rapidshare.com/files/12504629/Smoothed_MA.rar.html

For metastock users, here is the metastock code:
Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(Tema(Mov(C,7,E),2),3,E),2),2,E),2),2,E),2),3,E),2),2,E),2),2,E)

Unfortunately or fortunately, I don't have a clue about amibroker programming
and hence, the amibroker users must forgive me.

Oxymoron
Hi Oxy,

Agree with you It's always a choice between 'quick' & 'sure' and difficult to integrate the two.

BTW you seem to be an expert in Metastock coding. So could you please help in deciphering the meaning of the code i've posted at http://www.traderji.com/73645-post595.html (it's post 595 on pg 60 of this thread)

specially the meaning of the PREV function (what it returns etc.).

The code is one for determining Stop Losses based on Linear Regression & (Wilder's) Average True Range.

Thanking you in advance.

Regards,
Kalyan.
 

karthikmarar

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

Hi Friends

Continuing with MACD....

We will define the remaining rules.

RULE: Bearish signals like ZL crossover, MA Crossover, Dips and Hooks are effective when the ADX is rising and DI- is also rising and both ADX and DI- are above D+.


RULE: Bullish signals are ineffective when the ADX are ineffective when the ADX is rising along with DI- and both are above D+.

RULE: When Bullish and Bearish signals are appearing alternately in quick succession it shows period of indecision and better to stay away .

Since ADX is a lagging indicator many times the ADX reacts only after a BUY or SELL condition occurs. In such case it is better to eye ball the charts and enter/exit a few days after the Buy/Sell condition. Many times a Power dips comes after a BUY condition indicating good entry opportunity.

Check out Example 2

Regards

Karthik
 
Last edited:

jatayoo

Well-Known Member
hi kalyan
Have we not made the markets like a IT software hub.we are not trading/investing--- it is like doing advanced math's paper??
 

Similar threads