BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: True Comparative Strength
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

True Comparative Strength

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz