Traderji.com - Discussion forum for Stocks Commodities & Forex

Experiments in Technical Analysis

Discuss Experiments in Technical Analysis at the Technical Analysis within the Traderji.com - Discussion forum for Stocks Commodities & Forex; The Accumulation/Distribution Line is a fairly good means to measure the force behind a move. ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > METHODS & STRATEGIES > Technical Analysis

Notices

Technical Analysis Discussion of all the principles involved in technical analysis.


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #701  
Old 31st January 2007, 01:12 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

The Accumulation/Distribution Line is a fairly good means to measure the force behind a move.
Out of all the 'avatars' of A/D the Williams' A/D seems to be the most scientific.

The Chaikin Oscillator is an indicator to predict changes in the Accumulation/Distribution Line. It is simply the Moving Average Convergence Divergence indicator (MACD) applied to the Accumulation/Distribution Line. (Usually the difference between the 3-day exponential moving average and the 10-day exponential moving average of the Accumulation/Distribution Line is used)

Just as MACD injects momentum characteristics into moving averages (it's actually nothing but the ROC of convg/divg of the 2 MAs), the Chaikin Oscillator gives momentum characteristics to the Accumulation/Distribution Line, which can be a bit of a laggard sometimes. By adding momentum features, the Chaikin Oscillator will lead the Accumulation/Distribution Line.

So what if we plot the Chaikin Oscillator based on Williams A/D (rather than the vintage A/D) and use it as a filter for our entries?

This can be tried in 2 ways :-

1) By introducing a Signal line for the CO and using cross-overs (as in MACD)
or
2) By using the PEAK function, with the CO values as the input array.

We can also mull using LRS & R2 on the CO with appropriate threshold lvls (as is already being used in one of the systems) or even an FT of CO (or the 'parent' A/D)

A (3,13,9) or a (5,15,9) CO can be tried (to be more in sync with the trigger line EMA periods being used in the systems under test).

This will introduce an indicator into the systems, but they will still very much remain MA based systems as the CO too is nothing but a couple of EMAs & their MACD. The use of separate volume filter will also become redundant as the volume strength will be incorporated in the Williams' A/D.

The ideal use of CO is trading the divergences between it & the A/D line on which it is based; but this i guess would be difficult to implement in a mechanical trading system.

Regards,
Kalyan.

Last edited by kkseal; 31st January 2007 at 09:34 PM.
Reply With Quote
Sponsored Links
  #702  
Old 1st February 2007, 03:58 PM
Member
 
Join Date: Feb 2006
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
p_ashvin is on a distinguished road
Reputation: 20
Default Re: Experiments in Technical Analysis

hI,
Good knowledge sharing for the learners like me. Thanks for that. Actually I was trying to make A/D (Larry williams) line in metastock but it is giving error of division by zero error. Please help in removing this error.

I am writing metastock coding here.
If(H-L<>0 AND C-O<>0,
If(C-O>0,PREV + PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10),
PREV - PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10)),
0)

But As I said I am getting division by zero error.

Please help me in clearing this error.

If any body has used A/D flow line of Larry williams then please tell me about the result as I am planning to use this in my trading.

Ashvin


Quote:
Originally Posted by kkseal View Post
The Accumulation/Distribution Line is a fairly good means to measure the force behind a move.
Out of all the 'avatars' of A/D the Williams' A/D seems to be the most scientific.

The Chaikin Oscillator is an indicator to predict changes in the Accumulation/Distribution Line. It is simply the Moving Average Convergence Divergence indicator (MACD) applied to the Accumulation/Distribution Line. (Usually the difference between the 3-day exponential moving average and the 10-day exponential moving average of the Accumulation/Distribution Line is used)

Just as MACD injects momentum characteristics into moving averages (it's actually nothing but the ROC of convg/divg of the 2 MAs), the Chaikin Oscillator gives momentum characteristics to the Accumulation/Distribution Line, which can be a bit of a laggard sometimes. By adding momentum features, the Chaikin Oscillator will lead the Accumulation/Distribution Line.

So what if we plot the Chaikin Oscillator based on Williams A/D (rather than the vintage A/D) and use it as a filter for our entries?

This can be tried in 2 ways :-

1) By introducing a Signal line for the CO and using cross-overs (as in MACD)
or
2) By using the PEAK function, with the CO values as the input array.

We can also mull using LRS & R2 on the CO with appropriate threshold lvls (as is already being used in one of the systems) or even an FT of CO (or the 'parent' A/D)

A (3,13,9) or a (5,15,9) CO can be tried (to be more in sync with the trigger line EMA periods being used in the systems under test).

This will introduce an indicator into the systems, but they will still very much remain MA based systems as the CO too is nothing but a couple of EMAs & their MACD. The use of separate volume filter will also become redundant as the volume strength will be incorporated in the Williams' A/D.

The ideal use of CO is trading the divergences between it & the A/D line on which it is based; but this i guess would be difficult to implement in a mechanical trading system.

Regards,
Kalyan.
Reply With Quote
  #703  
Old 1st February 2007, 04:23 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by p_ashvin View Post
hI,
Good knowledge sharing for the learners like me. Thanks for that. Actually I was trying to make A/D (Larry williams) line in metastock but it is giving error of division by zero error. Please help in removing this error.

I am writing metastock coding here.
If(H-L<>0 AND C-O<>0,
If(C-O>0,PREV + PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10),
PREV - PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10)),
0)

But As I said I am getting division by zero error.

Please help me in clearing this error.

If any body has used A/D flow line of Larry williams then please tell me about the result as I am planning to use this in my trading.

Ashvin
Please refer my posts

#679 on pg 68
&
#662 on pg 67

in that order.

I think you'll be able to figure it out yourself.
BTW i'm not much of an expert in FLs.

Regards,
Kalyan.
Reply With Quote
  #704  
Old 1st February 2007, 05:56 PM
Member
 
Join Date: Feb 2006
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
p_ashvin is on a distinguished road
Reputation: 20
Default Re: Experiments in Technical Analysis

Hi,
Thanks for your reply,

Actually I have gone thru your posts but I am still not able to find answer of my problem,

Plese help, actually I am getting the division by zero error while in your post u have not used any division formula and accumlation and distribution formula i am looking is ((CLOSE-OPEN) / (HIGH-LOW)) * VOLUME.

Please help if any body have any idea.

Thanks,

Ashvin

Quote:
Originally Posted by kkseal View Post
Please refer my posts

#679 on pg 68
&
#662 on pg 67

in that order.

I think you'll be able to figure it out yourself.
BTW i'm not much of an expert in FLs.

Regards,
Kalyan.
Reply With Quote
  #705  
Old 2nd February 2007, 11:01 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by p_ashvin View Post
hI,
Good knowledge sharing for the learners like me. Thanks for that. Actually I was trying to make A/D (Larry williams) line in metastock but it is giving error of division by zero error. Please help in removing this error.

I am writing metastock coding here.
If(H-L<>0 AND C-O<>0,
If(C-O>0,PREV + PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10),
PREV - PREC(((CLOSE-OPEN)/(HIGH-LOW)),2 ) * (VOLUME/10)),
0)

But As I said I am getting division by zero error.

Ashvin
The problem may arise from the Data Array type parameter used by the PREC function. Have you tried without the function? You can also try the 'lastvalue' function i.e. prec(lastvalue((C-O)/(H-L)),2) Better would be, first assign the result of the calculation to a variable (say AD) and then apply the PREC (or ROUND) function on AD.

Last edited by kkseal; 2nd February 2007 at 11:07 PM.
Reply With Quote
  #706  
Old 3rd February 2007, 12:17 PM
Member
 
Join Date: Feb 2006
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
p_ashvin is on a distinguished road
Reputation: 20
Default Re: Experiments in Technical Analysis

Hi,
Thanks for your suggestion, Actually I tried with both the options u have given(using last value function and assigning variable to result) but still that error continues. Then I have calculated the value manually in excell and matched with metastock and found that values displayed by metastock is correct even when error is coming.
SO what I think is when we use IF function it calcultes both the options (that's why it is giving error) but display the result according to the expression result in IF function.

This is wht I understand if anybody has a similiar kind of experience please privide the input.

Ashvin

Quote:
Originally Posted by kkseal View Post
The problem may arise from the Data Array type parameter used by the PREC function. Have you tried without the function? You can also try the 'lastvalue' function i.e. prec(lastvalue((C-O)/(H-L)),2) Better would be, first assign the result of the calculation to a variable (say AD) and then apply the PREC (or ROUND) function on AD.
Reply With Quote
  #707  
Old 3rd February 2007, 04:01 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Quote:
Originally Posted by p_ashvin View Post
Hi,
Thanks for your suggestion, Actually I tried with both the options u have given(using last value function and assigning variable to result) but still that error continues. Then I have calculated the value manually in excell and matched with metastock and found that values displayed by metastock is correct even when error is coming.
SO what I think is when we use IF function it calcultes both the options (that's why it is giving error) but display the result according to the expression result in IF function.

This is wht I understand if anybody has a similiar kind of experience please privide the input.

Ashvin
You must also be careful while using the PREV function; in your code it is not clear what PREV is referencing. Your intention is clear enough - you want to reference the previous value of A/D but the question is - is it equally clear to the program?
And if it does try to calculate the previous value it will do so bypassing the condition of H-L <> 0 and in the process generate the error.

I think a simpler way to do it would be to use the following code

Cum(If(H-L<>0, (C-O)/(H-L) * V/10, 0))

This will produce a cumulative total (which in fact is the A/D) for each of the bars loaded.

If this works, then you can add the PREC (though i prefer ROUND) as follows

PREC(Cum(If(H-L<>0, (C-O)/(H-L) * (V/10), 0)),2)

If it doesn't work then PM Oxy

Regards,
Kalyan.

Last edited by kkseal; 3rd February 2007 at 04:11 PM.
Reply With Quote
  #708  
Old 3rd February 2007, 08:58 PM
Member
 
Join Date: Dec 2005
Location: Hyderabad
Posts: 326
Thanks: 0
Thanked 1 Time in 1 Post
asnavale is on a distinguished road
Reputation: 30
Default Re: Experiments in Technical Analysis

Dear Ashvin,

I am giving the Larry Williams' Acc/Disr formula as AmiBroker AFL here. You may try to write the Meta Stock code from this.

I am quoting here what Larry Williams has written in his book "The Secret of Selecting Stocks for Immediate and Substantial Gains", published by Windsor Books, Brightwaters, New York. This book is available as e-book.

Quote:
... there is a battle ... every day on the floor of the Exchange between buyers and sellers in each stock.... The battle between the buyers and sellers ends each day with the final bell. Someone has won that round. The next day it is a new battle, but at the end of each day we can sit back and see who was the winner.
.... the daily high for the stock is established by the bulls. The distance from the morning's open to the daily high shows the power of the bulls. ... The Bears show their daily power by driving prices down. Hence, the distance from morning's opening to the low point represents their pressures, or the amount of selling.
.... accumulation and distribution is calculated by finding the difference between the stock's high and low for the day. We then find the difference between close and open. ... The next step is to divide the close-to-open distance by the high-to-low distance. This resulting figure is percentage of net buying or selling for the day.
....
In a concise form the equation is this: Close minus the opening, divided by the high minus the low times volume = net buying or selling for the day (net daily A/D). ... On the days when there is more buying the net daily A/D figure is added to yesterday's figure. On days of more selling the net daily A/D figure is subtracted from yesterday's figure.
Based on my understanding of the above I have written the Accumulation/Distribution AFL for AmiBroker as follows:
Code:
DR = H-L;		//Day's Range
DC = C-O;		//Day's Change
 F = 0;		        //Factor to calculate Acc/Dist. Initialised with zero.
WAD = 0;		        //William's Acc/Distr Value. Initialised with zero.

If(H[0] == L[0])	//In case first day's Hi and Lo are same
   F[0] = 1;            //Factor is taken as 1.         
else                    //Otherwise
F[0]=DC[0]/DR[0];	//Calculate the ratio and assign it to factor for first day.

WAD[0]=V[0]*F[0];	//First day's Acc.Dist 
	
for (i=1;i<BarCount;i++)	//For second day onwards
{
	
	if (H[i]==L[i] AND O[i]<C[i-1]) F[i]=-1;	//Lower circuit
	else
	if (H[i]==L[i] AND O[i]==C[i-1]) F[i]=F[i-1];	//Very rare case
	else
	if (H[i]==L[i] AND O[i]>C[i-1]) F[i]=1;		//Upper circuit
	else
		F[i]=DC[i]/DR[i];			//Normal case
		WAD[i]=V[i]*F[i]
}

Plot(Cum(WAD),"AccDist",colorRed,styleOwnScale+styleLine);
A few points explained:

1. When Volume is large number, say in lakhs, then divide the volume by a suitable number such as 1000 so that you get a smaller number which is easy to manage. The final A/D graph is not affected by this division.
2. When the stock is locked in lower circuit throughout the day, the High and Low are same and the Open would be lower than previous Close. In this case the factor F is taken as -1.
3. When the stock is locked in upper circuit throughout the day, the High and Low are same and the Open would be higher than previous Close. In this case the factor F is taken as 1.
4. In very rare cases the stock opens at previous Close and High and Low are same. In this case the factor F is taken to be same as previous day's value.
5. In the last line, the plot function uses styleOwnScale because we don't want the A/D graph to distort the price chart when it is used as an indicator in the same graph.

If the above claculation steps are used you will never get 'Divide by zero' error. I hope this will help you overcome the problem you are facing. Unfortunately I am not in a position to write the AFL in MS code. I hope the explanations will help you write your own MS code. Or somebody else may be able to write it for you and help.

As far as the method of using this indicator and its interpretation, you may refer to the book mentioned above. The space is not sufficient to explain it here. I may have to write a separate post for that.

Regards

-Anant
Reply With Quote
  #709  
Old 3rd February 2007, 11:14 PM
Member
 
Join Date: May 2006
Posts: 486
Thanks: 0
Thanked 17 Times in 5 Posts
Ajax will become famous soon enough
Reputation: 53
Default Re: Experiments in Technical Analysis

Hi all

I see lots of traders discussing whole lot of bull **** & getting confused.
Are u people academicians hoping to win Noble prize in TA or in the markets
to make money???

Price action & volume is the what one requires to trade. All indicators & fancy structures are just derivatives of these two basic parameters.

I am attaching a yearly chart of CMC which has broken out of ascending triangle with big bull candle >> target of 3600 & 2nd target ~ 22000/- ??

No fancy indicators / calculations / algorithms , just PLAIN SIMPLE PRICE ACTION. i GOT INTO THE STOCK @ Rs 700/- , AND ITS DONE 1300/- ALREADY IN LESS THAN A WEEK. i AM NOT SELLING AS YET.
( big profits with least amount of trades , of course it requires tonnes of patience),

regards

Ajax

Last edited by Ajax; 22nd October 2008 at 10:55 PM.
Reply With Quote
  #710  
Old 3rd February 2007, 11:15 PM
Member
 
Join Date: Nov 2006
Posts: 1,496
Thanks: 55
Thanked 69 Times in 38 Posts
kkseal will become famous soon enoughkkseal will become famous soon enough
Reputation: 133
Default Re: Experiments in Technical Analysis

Hmmm ... that makes 3 formulae for Williams' A/D
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: Experiments in Technical Analysis
Thread Thread Starter Forum Replies Last Post
Technical Analysis Course snowy Technical Analysis 28 7th November 2008 07:37 PM
Technical analysis course sh50 Seminars & Tutors 18 10th June 2007 03:46 PM
Hello everybody.Technical Analysis vijay chauhan Introductions 2 30th May 2007 03:09 PM
Technical Analysis crosscurrency Forex 0 30th October 2005 11:00 PM


All times are GMT +5.5. The time now is 05:34 AM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com