PureBytes Links
Trading Reference Links
|
Thanks Thomasz,
if I may give some suggestions for further extension to the custom
backtester interface (which btw is already very powerful, just not
enough for what I'm trying to backtest), I understand some of these
may be challenging but...
-better support for multiple positions on same symbol, not only
GetFirstOpenPos() and GetNextOpenPos() for different sort orders or
only for a given symbol, but also: ExitTrade should be working trade
by trade on same symbol
-AddToComposite should work in low-level backtesting, *may be some
mistake on my part* but in spite of using atcFlagEnableInBacktest I'm
not able to actually get values in the composite if I use something
like
SetCustomBacktestProc("");
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
Buy= anything;
bo.PreProcess();
for( i = 0; i < BarCount; i++ )
{
bo.UpdateStats( i, 0 );
bo.HandleStops( i );
p[i] = 5; // composite formula here (eg based on open trades for the bar)
// missing actual buy code here, with bo.EnterTrade
bo.UpdateStats( i, 2 );
}
bo.PostProcess();
}
AddToComposite(P, "~p", "X", 1+2+4+8);
Anybody else feels like those would be valuable improvements?
Thanks so far,
n.
On 8/23/05, Tomasz Janeczko <amibroker@xxxxxx> wrote:
> Hello,
>
> No, GetNextOpenPos always reports positions in the order in which they were entered (FIFO)
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "neurotic self" <neuroticself@xxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Tuesday, August 23, 2005 6:10 PM
> Subject: [amibroker] GetNextOpenPos()
>
>
> > Hello,
> >
> > my strategy requires multiple open positions for the same symbol,
> > moreover the next step requires analyzing all currently open positions
> > to take a decision on position size.
> >
> > I was able to code the rules thanks to the custom backtester, problem
> > is I have to analyze open positions in ascending or descending entry
> > price order.
> >
> > Is there any way to use GetNextOpenPos() so that trades are reported
> > in the desired sequence?
> >
> > I could write the code to sort positions at every bar but that I'm
> > afraid would be very inefficient.
> >
> > Thanks,
> > neuro
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
>
>
>
>
> 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
>
>
>
>
>
>
>
--
Janeczko for President!
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hecev70/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1124901628/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~->
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/
|