Herman --
Thank you for the suggestion. I especially like how you determine that
you're on the last stock in a list. I've been wondering about that for
a while, thinking ahead for my next project. I was thinking I might
have to use CBT, but really don't need it for backtesting.
However, for right now, I will try Vlad's use of OLE function Export.
It may better suit my present situation.
Thanks again.
-- Keith
On 4/18/2010 04:50, Herman wrote:
Hello Keith,
The problem is that Amibroker does not have a Status("ActionComplete")
function that tells you that AA operations are finished so I check the
number of tickers in the watchlist. The code below are pasted together
snips from larger code, not tested. Hope this gets you started.
Herman
*function* GetWatchlistCount( WLName )
{
WLNum = CategoryFind( WLName, *categoryWatchlist* );
WLList = CategoryGetSymbols( *categoryWatchlist*,
WLNum );
*if* ( WLList == "" ) WLCount = 0;
*else* WLCount = StrCount( WLList, "," ) + 1;
*return* WLCount;
}
*if* ( InExplore )
{
StockNum = Status( "stocknum" );
*if* ( StockNum == 0 )
{
ToScanCount = getWatchlistCount( "TickersToScan" );
StaticVarSet( "ToScanCount", ToScanCount );
}
*///.... other exploration stuff ...///
* ToScanCount = Nz( StaticVarGet( "ToScanCount" ) );
SN = ( StockNum + 1 );
*if* ( SN == ToScanCount ) *// End exploration
* {
_TRACE( "Export AA Report: " + LastReportPath );
AB = CreateObject( "Broker.Application" );
AA = AB.Analysis;
AA.Export( LastReportPath );
}
}
Hello Keith.
You can use following OLE method of Analysis object (See "AmiBroker's
OLE Automation Object Model" in AmiBroker help):
Function *Export*(ByVal *pszFileName* As String) As Boolean
It will create html-file with results of exploration.
/BR,
Vlad
/
*>*
Does anyone know if there is a way to programmatically export AA>Explore
results to file?
Thanks for any help on this.
-- Keith
,_._,___