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

RE: [amibroker] I am looking for an example of code in VBScript or JScript with the method Retrieve from the Quotations collection.


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: RE: [amibroker] I am looking for an example of code in VBScript or JScript with the method Retrieve from the Quotations collection.
  • From: "dingo" <dingo@xxxxxxxxxxx>
  • Date: Wed, 3 Nov 2004 12:16:31 -0500

PureBytes Links

Trading Reference Links

William:
 
The .Retrieve won't work in either of the script languages per TJ because
they pass arguments by value and not by reference which .Retrieve requires.
 
d 


  _____  

From: William Peters [mailto:williampeters@xxxxxxxxxxx] 
Sent: Wednesday, November 03, 2004 11:16 AM
To: tintin92
Subject: Re: [amibroker] I am looking for an example of code in VBScript or
JScript with the method Retrieve from the Quotations collection.


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



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

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 



Yahoo! Groups Sponsor	

ADVERTISEMENT
 
<http://us.ard.yahoo.com/SIG=129dfvad6/M=315388.5543473.6613715.3001176/D=gr
oups/S=1705632198:HM/EXP=1099585149/A=2372354/R=0/SIG=12id813k2/*https://www
.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click
here	
 
<http://us.adserver.yahoo.com/l?M=315388.5543473.6613715.3001176/D=groups/S=
:HM/A=2372354/rand=180603617> 	


  _____  

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
<mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe> 
  

*	Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/