True Comparative Strength |
Post Reply |
Author | |
maximo
BullCharts Guru Joined: 02 Sep 2006 Location: Australia Posts: 232 |
Post Options
Quote Reply
Topic: True Comparative Strength Posted: 30 Oct 2010 at 6:00pm |
Hiya's
I've had this on the drawing board for a few weeks just needed to get around to coding it.
It compares any stock with an index without the use of averages or indicators. ie. It sums the percentage change of both a stock versus an index over N period.
The reason for not using any averages may not be clear, but firstly you eliminate lag and at the same time you eliminate the exponential error factor due to averages becoming less accurate with each successive bar. eg. a 14 period average drops the bar 15 bars back from the average so each successive calculation becomes 1/14; 7% less accurate over a longer term. The idea is to have a precise comparison instead of one which degrades over time.
Now for some ideas on how to use the indicator. You can suggest them if you have any.
One idea is to make your own index of stocks which would be likely to outperform the index comparison. You could construct a rating model for example to seek out the best performers. Example is the ASX20 stocks compared to ASX200, a +ive attribute represents over performing and -ive for under performing. Holding good performers can be an objective for both traders & investors.
Rating Stock Weekly Daily
AMP - -
1 ANZ + +
2 BHP + +
BXB - -
CBA + -
CSL - -
FGL - -
MQG - +
NAB + -
3 NCM + +
ORG - -
QBE - -
4 RIO + +
5 SUN + +
TSL - -
WBC + -
WDC - -
6 WES + +
WOW - -
WPL + -
note: This is not a recommendation to buy or sell.
[Description ="True Comparative Strength, Max (c) Copyright 2010"]index := inputsymbol("Compare to", "XJO");lookback:= input("period",100,1);start:= barnumber > lastvalue(barnumber) - lookback;[color =lime green]{ Sum price percentage change relative to lookback period ago } if (start,( (((Close-ref(Close,-1)) / ref(Close,-1))*100) + prev),prev);[color =blue]if (start,( (((LoadSymbol(index,C)-ref(LoadSymbol(index,C),-1)) / ref(LoadSymbol(index,C),-1))*100) + prev),prev);Edited by maximo - 30 Oct 2010 at 7:27pm |
|
Post Reply |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |