PureBytes Links
Trading Reference Links
|
neuro
Thanks for the reply... I think im really lost now as im not really
code smart at all.
SetCustomBacktestProc("");
if(Status("action") == actionPortfolio)
{
bo = GetBacktesterObject();
bo.Backtest(1); // run default backtest procedure
NumTrades = 0;
for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
{
bo.ProcessTradeSignals(BarCount);
if(trade.isentry())
{
//TradeDD = -100 * GetMAE();
//TradeDC = openpos.EntryPrice();
//TradeDE = openpos.GetPrice(BarCount-1,"L");
//openpos.AddCustomMetric("TradeDD",TradeDD);
//openpos.AddCustomMetric("Close",TradeDC);
//openpos.AddCustomMetric("Close",TradeDE);
}
NumTrades++;
}
bo.ListTrades();
}
don't laught to hard but this is where i have gotten with your
previous comment...
Brian
--- In amibroker@xxxxxxxxxxxxxxx, neurotic self <neuroticself@xxxx>
wrote:
> Hi Brian,
>
> there may be a simpler solution, can't think of it right now.
>
> This definitely can be done in low level backtesting, eg:
track/update
> your personalized MAE/MFE at every bar in a set of variables
> (varset/varget, one per symbol) from the bar after entry and
onwards,
> and after invoking
> bo.ProcessTradeSignals( bar );
> you can scan all your trades (I wish TJ could give us a more
efficient
> way, like scanning from last closed trade and backwards...) and
add a
> custom metric to those that closed during the current bar, with the
> proper value.
>
> Hope it's correct, let me know if this is clear and fits you
>
> neuro
>
> On 9/4/05, coba702002 <coba702002@xxxx> wrote:
> > I am trying to figure out a way to NOT include (h-L) activity in
the
> > MAE/MFE calcs,since i enter on bar close and don't want the
entry bar
> > (H-L) to be part of the calc. Is there a way around this in the
low
> > level backtester custom metrics code. I have tried sooooo many
things
> > and cannot get anything to work, i have pulled most of my hair
out so
> > before i lose it all please help :))
> >
> > Trade drawdown (as well as MAE and MFE) is different because it
> > *includes* intraday activity (H-L)
> >
> > thanks in advance
> > Brian
> >
> >
> >
> >
> >
> > 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 --------------------~-->
Help tsunami villages rebuild at GlobalGiving. The real work starts now.
http://us.click.yahoo.com/njNroD/KbOLAA/cosFAA/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/
|