[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: Anthony Faragasso <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: William Peters <williampeters@xxxxxxxxxxx>
  • Date: Wed, 3 Nov 2004 11:34:05 -0500

PureBytes Links

Trading Reference Links

Hi Anthony,

This is only a coding example to demonstrate how to use this function,
definately not meant to be run from IB but from an external program.


Regards,
William Peters
www.amitools.com


Wednesday, November 3, 2004, 11:23:35 AM, you wrote:


AF> William,

AF> Where is the list box located when this is run....

AF> Also, do we run this from IB...AA...etc.

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


AF>   tintin92

AF>   Here is a VB6 example which fills a listbox with 100 MSFT quotes. You
AF>   should be able to adapt this to VB Script without too many changes.

AF>   Dim AB As Object
AF>   Dim qt As Object
AF>   Dim NumQuotes As Long
AF>   Dim i As Long
AF>   Dim NumQuotesRequired As Long
AF>   Dim aDate, aOpen, aHigh, aLow, aClose, aVolume, aOpenInt As Variant

AF>   Set AB = CreateObject("Broker.Application")
AF>   Set qt = AB.Stocks("MSFT").Quotations

AF>   'Note: If NumQuotesRequired is set to -1 then all available quotes are returned
AF>   NumQuotesRequired = 100

AF>   NumQuotes = qt.Retrieve(NumQuotesRequired, aDate, aOpen,
AF> aHigh, aLow, aClose, aVolume, aOpenInt)

AF>   List1.Clear

AF>   For i = 0 To NumQuotes - 1
AF>   List1.AddItem (aDate(i) & "," & aOpen(i) & "," & aHigh(i) &
AF> "," & aLow(i) & "," & aClose(i) & "," & aVolume(i))
AF>   Next



AF>   Regards,
AF>   William Peters
AF>   www.amitools.com


AF>   Wednesday, November 3, 2004, 10:50:42 AM, you wrote:


AF>   t> Hi,

AF>   t> I am looking for an example of code in VBScript or JScript with the method
AF>   t> Retrieve from the Quotations collection.

AF>   t> Thanks.

AF>   t> Tintin92



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

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


AF>         Yahoo! Groups Sponsor 
AF>               ADVERTISEMENT
             
       
       


AF> ------------------------------------------------------------------------------
AF>   Yahoo! Groups Links

AF>     a.. To visit your group on the web, go to:
AF>     http://groups.yahoo.com/group/amibroker/
      
AF>     b.. To unsubscribe from this group, send an email to:
AF>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
      
AF>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



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




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

AF> Check group FAQ at:
AF> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
AF> Yahoo! Groups Links



 




------------------------ 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/