You may need to use the advanced backtest coding to achieve this because it is changing the portfolio trades.
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 24/02/07, Keith McCombs <[EMAIL PROTECTED]> wrote:
Nope, that's not what I am looking for. SetTradeDelays() delays trade after the *signal*. Assuming I have SetTradeDelays(1,1,1,1), then if I have a buy signal yesterday, backtester will buy a stock today even if I had max positions yesterday and sold one position at open today. Under these circumstances, I do not want backtester to buy anything today, but instead be able to buy only one stock tomorrow. -------------- Original message -------------- From: "cstrader" <[EMAIL PROTECTED]> I think you are looking for settradedelays() ** ** ----- Original Message ----- *From:* Keith McCombs <[EMAIL PROTECTED]> *To:* [email protected] *Sent:* Friday, February 23, 2007 11:10 AM *Subject:* [amibroker] Backtesting personal trading style. I'm trying to backtest a system using "MaxOpenPositions". However, I want a day between the sale of a stock and the purchase of a new one. For example say, I have MaxOpenPositions set to 5; Yesterday I had 5 open positions. Today I sell one position. I want AB to wait at least until tomorrow before buying a new position to replace the one I sold. Any way to do this? Thanks. -- Keith -- <http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01> -- <http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=en-mail_a_01>
