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

[amibroker] Re: Evaluate Last Position



PureBytes Links

Trading Reference Links

I'm just using single symbol backtest.
When you say: "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." 
How can I refer to previous buy/sell signal results?  
Should I look through the buy array when its value is =1 and compute
the difference between buyprice and sell price? 
How do I know  the position size of the previous trade to calculate
the trade P&L?

thanks in advance

--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> 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 <pmxgs@xxx> 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
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/