PureBytes Links
Trading Reference Links
|
tintin92
Here is a VB6 example which fills a listbox with 100 MSFT quotes. You
should be able to adapt this to VB Script without too many changes.
Dim AB As Object
Dim qt As Object
Dim NumQuotes As Long
Dim i As Long
Dim NumQuotesRequired As Long
Dim aDate, aOpen, aHigh, aLow, aClose, aVolume, aOpenInt As Variant
Set AB = CreateObject("Broker.Application")
Set qt = AB.Stocks("MSFT").Quotations
'Note: If NumQuotesRequired is set to -1 then all available quotes are returned
NumQuotesRequired = 100
NumQuotes = qt.Retrieve(NumQuotesRequired, aDate, aOpen, aHigh, aLow, aClose, aVolume, aOpenInt)
List1.Clear
For i = 0 To NumQuotes - 1
List1.AddItem (aDate(i) & "," & aOpen(i) & "," & aHigh(i) & "," & aLow(i) & "," & aClose(i) & "," & aVolume(i))
Next
Regards,
William Peters
www.amitools.com
Wednesday, November 3, 2004, 10:50:42 AM, you wrote:
t> Hi,
t> I am looking for an example of code in VBScript or JScript with the method
t> Retrieve from the Quotations collection.
t> Thanks.
t> Tintin92
------------------------ 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
--------------------------------------------------------------------~->
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/
|