PureBytes Links
Trading Reference Links
|
About open positions?
SetOption("UseCustomBacktestProc", True );
barDates = DateTime();
if( Status("action") == actionPortfolio )
{
bo = GetBacktesterObject();
bo.PreProcess();
for( bar = 0; bar < BarCount; bar++ )
{
barDate = barDates[bar];
OpenPos = "";
OpenPosCnt = 0;
for( pos = bo.GetFirstOpenPos(); pos; pos = bo.GetNextOpenPos() )
{
OpenPos += pos.Symbol + ",";
OpenPosCnt++;
}
_TRACE( NumToStr(barDate, formatDateTime) + " OpenPos( " + OpenPosCnt + " ):" + OpenPos );
bo.ProcessTradeSignals( bar );
}
bo.PostProcess();
}
--- In amibroker@xxxxxxxxxxxxxxx, "raskoks" <raskoks@xxx> wrote:
>
> Hi,
> I wonder how to use
> bo = GetBacktesterObject();
> and maybe loop like this:
>
> for( trade = bo.GetFirstTrade(); trade; trade = bo.GetNextTrade() )
> {
> // trade variable now holds Trade object
>
> }
>
> Too find information about current bactester position.
> I need to know for every bar information about position (long,short) because some signals shoud be use only when i have long and some for shorts.
> Maybe someone can help mi with this kind of problem.
>
> Best regards
> raskoks
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
|