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

[amibroker] Re: Value of all my trades on a bar by bar basis



PureBytes Links

Trading Reference Links

Thanks Tomasz!

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Hello,
> 
> Equity() evaluates equity in one step and returns array.
> 
> If you need equity evaluated on bar-by-bar basis during backtest
> - yes it is possible and available from custom portfolio backtester 
interface
> (Equity property of Backtester object)
> http://www.amibroker.com/guide/a_custombacktest.html
> 
> 
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "garycristo" <garycristo@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, October 04, 2005 10:13 AM
> Subject: [amibroker] Re: Value of all my trades on a bar by bar 
basis
> 
> 
> > Tomasz,
> > 
> > Could you tell me please if it is possible during a backtest to 
> > reference a value of the open trades ie: 
> > 
> > Open Trade Equity plot is a plot of current equity on a bar by bar 
> > basis. It tells you your current equity based on the currently 
open 
> > trades. If you liquidated ALL currently open trades then this is 
the 
> > amount of money you would have in your pocket.
> > 
> > ...or am I missing something that equity() does?
> > 
> > Thanks.
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "garycristo" <garycristo@xxxx> 
> > wrote:
> >> Hi,
> >> 
> >> I found one error I made in the code numberofshares should be:
> >> 
> >> numberofshares = (Equity() * (PositionSize * -1) / 100) / C;
> >> 
> >> I had the close divided by the position size instead of the other 
> > way 
> >> around to get the number of shares bought.
> >> 
> >> Even so, it still isn't what I'm after because I am using -10 for 
> > the 
> >> PositionSize and it is not increasing as equity increases. 
Looking 
> > at 
> >> the BarByBar output the stock value is stuck at 10% of equity.
> >> 
> >> Thanks
> >> 
> >> --- In amibroker@xxxxxxxxxxxxxxx, "garycristo" <garycristo@xxxx> 
> >> wrote:
> >> > Thanks Graham.
> >> > 
> >> > > I think you would need to use custom backtest stuff
> >> > 
> >> > OK cheers, I think that will take a bit of learning!
> >> > 
> >> > I did try this but it is simply the wrong way to do it I think:
> >> > 
> >> > Intrade        = Flip(Buy,Sell);
> >> > numberofshares = C / (Equity() * (PositionSize * -1) / 100);
> >> > BarByBar       = IIf(Intrade, C * numberofshares, Null);
> >> > AddToComposite(BarByBar, "~BarByBar", "C");
> >> > 
> >> > AddColumn(Equity()*PositionSize*-1/100,"BuyValue",1.3,
colorIndigo,
> >> > colorYellow);
> >> > AddColumn(BarByBar ,"BarByBar ",1.3,colorIndigo,colorYellow);
> >> > AddColumn(numberofshares ,"numberofshares ",1.3,colorIndigo,
> >> > colorYellow);
> >> > 
> >> > I'm getting errors in the result list.
> >> > 
> >> > Thanks
> >> > 
> >> > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> 
> > wrote:
> >> > > I think you would need to use custom backtest stuff
> >> > > 
> >> > > You could try addtocomposite from an explore by adding the 
price
> >> > > values only when in trades.
> >> > > 
> >> > > On 10/3/05, garycristo <garycristo@xxxx> wrote:
> >> > > > Anyone have any tips to do this?
> >> > > >
> >> > > > I have a suspicion that I can't simply do a scan/
> > addtocomposite 
> >> to
> >> > > > get
> >> > > > the total value of all trades bar by bar as I think the 
> >> backtester
> >> > > > needs to run to get the correct position sizes.
> >> > > >
> >> > > > Could this be a custom backtester job? I hoped it would be
> >> > simpler 
> >> > as
> >> > > > the custom backtester baffles me!
> >> > > >
> >> > > > Thanks for any help.
> >> > > >
> >> > > >
> >> > > > --- In amibroker@xxxxxxxxxxxxxxx, "garycristo" 
<garycristo@xx
> > ..>
> >> > > > wrote:
> >> > > > > Hi group,
> >> > > > >
> >> > > > > How can I get the value of all my trades on a bar by bar
> >> basis 
> >> > in
> >> > > > my
> >> > > > > backtested system and chart it?
> >> > > > >
> >> > > > > I'm not talking about the normal equity() which is 
plotted 
> > at 
> >> > the
> >> > > > exit
> >> > > > > of a trade but by multiplying the Positionsize by the
> >> Buyprice 
> >> > for
> >> > > > > each trade that is open on each bar and add them to get 
the 
> >> > value.
> >> > > > How
> >> > > > > can I do this please?
> >> > > > >
> >> > > > > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> >




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/