great tip Ed... backtestRegularRawMulti is very close - but not quite there...
from the doc on backtestRegularRawMulti: // Sell/Cover exit all open positions on given symbol, Scale-In/Out work on all open positions of given symbol at once. So the remaining problem is, that a sell signal closes ALL positions - but I need individual closes for each trade (when individual profit/loss target is hit for each trade).. but perhaps I can make it work with the custom backtester and handle each exit individually there... as I have access to entryprice - and access to priceArrays... If so, big step forward in resolving this... any other tips? Jens --- In [email protected], "Edward Pottasch" <[EMAIL PROTECTED]> wrote: > > hi, > > have a look at these two modes. This is the easiest way to do such a thing: > > SetBacktestMode( backtestRegularRaw ); > SetBacktestMode( backtestRegularRawMulti ); > > rgds, Ed > > > > > > > ----- Original Message ----- > From: tiedemj > To: [email protected] > Sent: Friday, August 08, 2008 1:12 PM > Subject: [amibroker] Taking all signals (long/short) with individual profit/loss target exits > > > Hello > > Anybody know how to express a system in AFL, that trades ALL buy and > short signals - holding each trade until a profit or loss target is > reached independent for each individual trade? > > I was trying to use sigScaleIn/Out - but as there can be both entry - > and exit signals on each bar - I was not able to express the correct > pricing and sizing. > > I also tried use custom backtest - but that did not do the trick. Any > hint's appreciated! > > Regards, > Jens Tiedemann >
