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

Re: [amibroker] amiquote lack of control



PureBytes Links

Trading Reference Links

Yuki had asked in "Re: [amibroker] amiquote lack of control"  now Louis has asked in "Is it possible to run Amiquote automatically".  Here is how to get Amiquote to run by itself from "outside" of Amibroker.
 
 
Amibroker and its related programs are easy to make work from other programs, like DOS boxes, or by double clicking in windows.
 
 
2) Now, here's some code to try (copy this into notepad).

AQ = new ActiveXObject("AmiQuote.Document");
AQ.Open("C:\\mysymbols.tls");

FromDate = new Date(1995,5,1,0,0,0);
/* year, month-1, day, hour, min, sec (required by JScript date constructor) */

ToDate = new Date; // current time

/* getVarDate is required to convert from JScript Date to OLE-automation date */
AQ.From = FromDate.getVarDate();
AQ.To = ToDate.getVarDate();

AQ.AutoImport = true; // import automatically
AQ.Source = 0; // Yahoo Historical

AQ.Download(); // starts download

// wait until download and import is finished
while( AQ.DownloadInProgress || AQ.ImportInProgress )
{
    WScript.sleep(5000); // wait 5 seconds before querying status again
}

WScript.echo("Download and import complete");

 
3) Keep in mind, that you have to use notepad to create this.  And call it, yuki.js and then save it.  Then, double click yuki.js and it'll run a bunch of stuff in amiquote automatically.
 
4) If you are interested, you can use "Scheduled Tasks" to run yuki.js at scheduled times (See ramvilas 's email from 5/22/08)
 
 
 
----- Original Message -----
From: Yuki Taga
Sent: Sunday, May 11, 2008 5:35 PM
Subject: Re: [amibroker] amiquote lack of control

Is there anything for "normal" people? I mean people who look at the
link you have provided and say, "Gee, that looks like it should be
useful, somehow, but what now?" People who think OLE is something you
shout in Spain, at a bullfight?

Yuki

Saturday, May 10, 2008, 5:29:13 AM, you wrote:

TJ> Hello,

TJ> Automation via "keyboard simulation" is not reliable.
TJ> Reliable way to automate is to use OLE interface
TJ> and that is proper way to automate AmiQuote

TJ> http://www.amibroker.com/guide/aqobjects.html

TJ> Best regards,
TJ> Tomasz Janeczko
TJ> amibroker.com
TJ> ----- Original Message -----
TJ> From: "Yuki Taga" <yukitaga@xxxxatt.ne.jp>
TJ> To: <amibroker@xxxxxxxxxps.com>
TJ> Sent: Friday, May 09, 2008 1:37 PM
TJ> Subject: [amibroker] amiquote lack of control

>>I use a keyboard automation program (Automate) to do a lot of routine
>> tasks, including tasks that must get done when I'm on vacation.
>> (When I'm on vacation, it means I don't even log into a computer for
>> *any* reason -- in fact, I don't even want to *see* a computer when
>> I'm on vacation.)
>>
>> I also keep a database of selected US indices and symbols (not
>> large), that I update with Yahoo (dead-on accuracy is not necessary).
>> But with Amiquote, I cannot toggle between 'Current' and
>> 'Historical', because there is no way to do this via the keyboard.
>>
>> Unfortunately, some Yahoo symbols have daily data, but no historical
>> data. I like to run 'Current' in the morning (my time), and
>> 'Historical' in the afternoon. Then I'm covered.
>>
>> I have asked on more than one occasion that keyboard control be added
>> to Amiquote, but it is apparently a very low priority. However, my
>> next paid Amibroker upgrade will be an equally low priority unless
>> there is a way to accomplish what I feel I need to do.
>>
>> Anyone?
>>
>> Yuki
>>
>>
>> ------------------------------------
>>
>> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>> http://www.amibroker.com/devlog/
>>
>> For other support material please check also:
>> http://www.amibroker.com/support.html
>> Yahoo! Groups Links
>>
>>
>>

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___