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

Re: [amibroker] DT's RelativeSlope Additions


  • To: "AmiBroker list" <amibroker@xxxxxxxxxxxxxxx>
  • Subject: [amibroker] Osaka plugin crash loading saved table with > 128 columns (not an AB bug)
  • From: "Dave Merrill" <dmerrill@xxxxxxx>
  • Date: Sat, 19 Jun 2004 08:12:37 -0700

PureBytes Links

Trading Reference Links

I'm posting this here because I don't know how to contact Joe Osaka, the
author of the Osaka plugin. If anyone does, please pass this along to him.
Osaka seems like a great tool, and a fix for this would be great.

Since I'm posting this publicly, I'd also like to make sure nobody thinks of
this as a bug in AmiBroker. It's clearly a bug in Osaka, an *uncertified*,
*third-party* *plugin* for AB, not a problem with AB itself.

-----

The Osaka release notes say that version 1.0.4 added the capacity for an
unlimited number of columns; previously there was a limit of 128. However,
it appears that loading a saved table with more than 128 columns crashes.

The code below should be explored against a smallish watchlist, say 20
symbols. It creates and saves a table while the first stock is being
processed, and instead of recreating it for subsequent stocks, loads it from
disk. The idea is that if lots of processing was required to create the
table (unlike this simple test), it'd only have to be done once for the
whole test run.

In my testing, if NumberOfTestColumns is more than 128, it's crash city. If
you comment out the osTabLoad (and the 'else' before it), there's no crash
with higher numbers of columns, but you can see in the exploration results
that the table has no columns after the first stock, since none were added.

If anyone gets different results than this, or knows of a later Osaka
release that fixes this problem, please let me know. I'm using Osaka 1.0.4,
AB 4.57.0 beta, Windows 2000.

Dave Merrill

----------------------

// CONFIG
ListNum = 30; // watchlist to examine; must be list under test
NumberOfTestColumns = 128; // more than 128 crashes

// FUNCTIONS
function fListLen(List) {
	i = 0;
	while(StrExtract(List, i) != "") i++;
	return i;
}

// init
TickerList = GetCategorySymbols(categoryWatchlist, ListNum);
CountTickers = fListLen(TickerList);
StockNum = Status("StockNum");
FirstStock = (StockNum == 0);

// init table, make col for ea bar in test
osInitialize();
table = osTabCreate();
if(FirstStock) {
	for(i = 1; i <= NumberOfTestColumns; i++) {
		osTabAddColumn("test" + i, 1, table);
	}
} else {
}

ColCount = osTabGetColumnCount(table);

Filter = Status("LastBarInTest");;
AddColumn(ColCount, "ColCount", 1.0);
AddColumn(StockNum, "StockNum", 1.0);
AddColumn(CountTickers, "CountTickers", 1.0);
AddColumn(table, "table", 1.0);

// clean up
osTabDelete(table);



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/