This all depends 1. If this is a portfolio backtest and you want to refer to the last trade for the portfolio, then you need to use the advanced backtest code to refer to the last closed trade. Remember you will need to allow for the case where no other trades were open when the last trade closed. So you would never enter another trade if the last closed trade profit was <3% 2. If you are referring to the same symbol and you need to refer to the actual trade taken in the portfolio backtest for that same symbol then use as 1. above. 3. If this is just the last chart trade for a symbol, whether used or not in portfolio backtest, then you need to use a loop to refer to previous buy/sell signals to exclude buy signals based on past result. 4. If a single symbol backtest then do as for 3 above
-- Cheers Graham AB-Write >< Professional AFL Writing Service Yes, I write AFL code to your requirements http://www.aflwriting.com On 11/04/07, pmxgs <[EMAIL PROTECTED]> wrote: > Hi, > > can someone give an hint on how to access the P&L of previously > closed positions? > For example, I have a buy signal but I will only trade that signal if > the last position ended with a profit > 3%. > This might be easy, but I'm just starting to learn AFL. > > thanks
