PureBytes Links
Trading Reference Links
|
Hello,
The code in READ ME was example that just DISPLAYS GROUP ID in the COMMENTARY window.
"GroupID : " + Stock.GroupID();
statement means concatenate string containing "GroupID : " to the result of Stock.GroupID().
Resulting is a STRING "GroupID: 5" that will be displayed in COMMENTARY window.
Commentary window works so that it automatically displays statements that evaluate to strings
in its output window.
This of course DOES NOT assign any value to GroupID variable because there is
NO GroupID variable. "GroupID : " is a STRING CONSTANT (literal), not variable.
If you wrote this
GroupID = Stock.GroupID();
(NOTE NO QUOTES !) then it will be variable, and assignment operator (=) can assign it.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "vlanschot" <ecbu@xxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, May 19, 2004 3:47 PM
Subject: [amibroker] Re: Q on OLE Automation
> I just figured it out: it seems that if you change the colon to an
> equal sign, you can access the property. Thus:
>
> AB = CreateObject("Broker.Application");
> Stocks=AB.Stocks();
> Stock=Stocks.Item("AKZO.AS");
> Groupnr = Stock.GroupID();
>
> works fine. Just so you know, this differs from the description in
> the "Changes for version 4.54.0", where the colon is used.
>
> PS
>
> --- In amibroker@xxxxxxxxxxxxxxx, "vlanschot" <ecbu@xxxx> wrote:
> > Hello,
> >
> > In the 4.54 version we can retrieve OLE properties directly. Below
> is
> > an example whereby I'd like to "lock" the GroupID of the
> > stock "AHLN.AS":
> >
> > AB = CreateObject("Broker.Application");
> > Stocks=AB.Stocks();
> > Stock=Stocks.Item("AHLN.AS");
> >
> > "GroupID : " + Stock.GroupID();
> >
> > Could anybody tell me how I can access this number subsequently? I
> > thought GroupID would now be the variable name, but I get an error.
> >
> > Thanks,
> >
> > PS
>
>
>
> 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 Links
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 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/
|