PureBytes Links
Trading Reference Links
|
Hello,
Retrieve() method allows to retrieve all quotations to OLE SAFEARRAY
passed by reference.
JScript supports only passing variables by value, hence it is not possible
to use Retrive from JScript.
Also regular JScript arrays are not OLE compatible and you can not create
OLE-compatible array in JScript (JScript provides only the way to convert
OLE array created by other program to JScript array).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/ctrans_54ac.asp
AFAIK JScript .NET added full support for safearrays but I don't know if
Microsoft has added ability to pass parameters by reference.
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "tintin92" <tintin922002@xxxxxxxx>
To: "amibroker-ole OLE" <amibroker-ole@xxxxxxxxxxxxxxx>; <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, March 07, 2005 11:16 AM
Subject: [amibroker] I try to use Retvrieve from JScript, but I dont success.
>
> Hello,
>
> I try to use Retvrieve from JScript, but I dont success.
> Here what I have did so far.
>
> Thanks
>
> Tintin92
>
> // JavaScript Document
>
> var oAB = new ActiveXObject("Broker.Application");
>
> var oStocks = oAB.Stocks;
>
> WScript.Echo("Script ready to start" );
>
> oStock = oStocks( 0 );
> WScript.Echo("Ticker : " + oStock.Ticker);
> var oQuotations = oStock.Quotations;
>
> for( i = 0; i < oQuotations.Count; i++ )
> {
> oQuotation = oQuotations(i);
> WScript.Echo("oQuotation.Close : " + oQuotation.Close);
> }
>
> var aDate = new Array();
> var aOpen = new Array();
> var aHigh = new Array();
> var aLow= new Array();
> var aClose= new Array();
> var aVolume = new Array();
> var aOpenInt = new Array();
>
> var QuotationsQty = oQuotations.Retrive(-1, aDate, aOpen, aHigh, aLow,
> aClose, aVolume, aOpenInt);
>
> for( i = 0; i < QuotationsQty; i++ )
> {
> WScript.Echo("Retrive Close : " + aClose(i))
> ;
> }
>
> WScript.Echo("Script finished" );
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|