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

[amibroker] Re: JScripts - some debugging help needed



PureBytes Links

Trading Reference Links

Dimitris,

Yes, I see the count as the one returned by Stocks().Count method in 
the AB ActiveX object. I verified it by running similar code outside 
AA, from command line. The actual count I get in my case is 34,622 
(with QP3). At the same time, if I run an explore against "All 
Stocks/Last 1 bar", I get 26,819 entries in the result. That means 
that around 8K symbols without any data (either on that last bar or 
completely empty, I don't know) exist in the DB.

What count do you get when you run it?

Jitu

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Jitu,
> What is your mycount ?
> Because it does not count the database stocks.
> [Try to Plot(mycount,"",1,1); to see what I mean.]
> Dimitris Tsokakis
> > > -----Original Message-----
> > > From: jtelang [mailto:jtelang@x...]
> > > Sent: Wednesday December 31, 2003 12:14 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: JScripts - some debugging help needed
> > > 
> > > 
> > > William/Dingo,
> > > 
> > > Following line is a suspect -
> > > 
> > > >   oStocks = oAB.Stocks();
> > > 
> > > In AFL world, what are you expecting oStocks to be -- an AFL 
> array, 
> > a 
> > > constant, a string or a JScript array of objects? I could be 
> wrong, 
> > > but I don't think you can treat such return values in pure AFL 
> > world 
> > > as if you were dealing with a JScript world. I'd think a more 
> > > appropriate way to do it would be as follows, which does seem 
to 
> > > work -
> > > 
> > > // ------------
> > > EnableScript("JScript");
> > > oAB = CreateStaticObject("Broker.Application");
> > > 
> > > // NOTE FOLLOWING TWO LINES
> > > oStocks = oAB.Stocks();
> > > dummyResults = oStocks.DummyFunction();
> > > 
> > > myVersion = oAB.Version();
> > > myCount = 0;
> > > <%
> > > ab = new ActiveXObject( "Broker.Application" );
> > > AFL("myCount") = ab.Stocks().Count;
> > > %>
> > > Filter=1;
> > > AddColumn(myCount, "Count");
> > > AddTextColumn(myVersion,"Version");
> > > // --------------
> > > 
> > > Also, note the two lines where marked. It seems on return 
values 
> > like 
> > > oStocks, AB doesn't complain if it can't find the called 
method. 
> > > Actually I think that's going too far. AB doesn't probably even 
> > know 
> > > what type it is unless it can convert the original return value 
> > > (oStocks) into an array, a constant or a string. But that's 
just 
> a 
> > > guess. 
> > > 
> > > Hope this helps.
> > > 
> > > Jitu


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/