[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help please, with maxsharesheld syntax



PureBytes Links

Trading Reference Links

At 6:00 PM -0500 1/27/02, tedclimo wrote:

>I want to backtest a particular strategy with $100,000 initial investment
>100% of account balance used in each trade.  


At 10:03 AM -0700 1/28/02, Gary Fritz wrote:

>You want something like this:
>
>  Inputs:  AcctSize(100000);
>  Vars:  PosSize(0);
> 
>  PosSize = (AcctSize + NetProfit + OpenPositionProfit)
>                / (BigPointValue * Close);
> 
>  if C > O then buy PosSize shares at close;

Gary is correct if you want to invest your total account in the stock
at every trade. (I read it to mean you wanted to invest $100,000 in
each trade.)

If you do scale the trades with the account size be careful to check
for errors. With any decent system, the numbers can get very big very
fast and strange things start happening in TradeStation as you get to
very big numbers. (These errors occur with no error messages.)

Bob Fulks