Seeking Alpha

Brad Kenagy's  Instablog

Brad Kenagy
Send Message
-I have been investing since the fall of 2008 and invested through one of the most difficult investing periods in history and know the importance of dividend growth and stability during those times as well as during the good times. I started writing for Seeking Alpha a little over three years... More
My blog:
My Historical Performance
  • Berkshire Ratio Indicator ThinkorSwim Code 2 comments
    Feb 5, 2014 1:31 PM | about stocks: BRK.B

    For those that have thinkorswim, here is the code for my Berkshire ratio indicator, indicator value of 7 is a buy point. Enjoy!

    Declare Lower;

    input length = 50;

    def Vol = volume;

    def VolAvg = Average(volume, length);

    Def A = close;

    Def B = close("BRK/B");

    def V = close("VIX");

    def Spread=(A/B);

    Plot ind= if(spread>1510,1,0)+if(v>v[1],1,0)+if(close<open,1,0)+if((vol>volavg*2),1,0)+if(volume>volume[1],1,0)+if(low<low[1],1,0)+if(high<high[1],1,0);

    Stocks: BRK.B
Back To Brad Kenagy's Instablog HomePage »

Instablogs are blogs which are instantly set up and networked within the Seeking Alpha community. Instablog posts are not selected, edited or screened by Seeking Alpha editors, in contrast to contributors' articles.

Comments (2)
Track new comments
    , contributor
    Comments (30) | Send Message
    I don't use thinkorswim and I have limited programming experience but there seems to be something missing in your code.
    Def A = close.
    Did you mean Def A = close("BRK/A")?
    I don't know the details of your strategy--- are you arbitraging price differences between BRK.A and BRK.B? Have you backtested the strategy and if so how has it performed?
    5 Feb 2014, 09:40 PM Reply Like
  • Brad Kenagy
    , contributor
    Comments (2195) | Send Message
    Author’s reply » I have an article pending that explains what I'm doing. Yeah you could put close("BRK/A") or just when viewing the study have BRK/A as the stock you are looking at.
    5 Feb 2014, 10:42 PM Reply Like
Full index of posts »
Latest Followers


More »

Latest Comments

Instablogs are Seeking Alpha's free blogging platform customized for finance, with instant set up and exposure to millions of readers interested in the financial markets. Publish your own instablog in minutes.