DM --If you want to see how your entire portfolio would perform, buy and
hold, you can use AddToComposite() function, often called ATC on this
board.  This will take a little study on your part but will be worth
every minute and then some.  BTW, you can multiply each 'Array' in ATC by
the number of shares purchased to get results in $,   If you are using
data corrected for dividends and stock splits, you will have to keep your
number of shares up to date manually.-- Keith

  -------------- Original message --------------
  From: "Paul Ho" <[EMAIL PROTECTED]>

  Just copy and paste from Tomasz's forumla on individual equity .....

  if( ParamToggle("Show Buy-and-Hold?", "No|Yes", 1) )

  {

  /* now buy and hold simulation */

  Short=Cover=0;

  Buy=Status("firstbarintest");

  Sell=Status("lastbarintest");

  SetTradeDelays(0,0,0,0); PositionSize = -100;

  ApplyStop(0,0,0,0);

  ApplyStop(1,0,0,0);

  ApplyStop(2,0,0,0);

  Plot( Equity( 0, -2 ), "Buy&Hold", -9 );

  }


  --------------------------------------------------------------------

  From: [email protected] [mailto:[EMAIL PROTECTED] On
  Behalf Of dmcleod1981
  Sent: Saturday, 17 February 2007 3:31 AM
  To: [email protected]
  Subject: [amibroker] Adding Buy & Hold Metric to backtest

  I may be using the wrong key words when I am searching but I can't
  find
  any previous samples that show how to add the buy and hold return
  during the back test period. If someone has any snippets or can
  reference a post number I would be greatful.

  Thanks
  DM

Reply via email to