Hi again,

Ok, I think that I understand a bit more how it works.  The file.js will
open Amiquote, who will then save the files to a .adq file, which is Yahoo
daily.  But this file is only good for one day (until the next time I run
the script), so if for whatever reason I can't manuallu import the ASCII to
the database then I am in trouble.

Would it be possible with the same type of script to run Amiquote, to
download the quotes AND to save them to the database (current, or chosen
one) directly so that whatever happens the quotes will always be there when
I come back?

Thanks,

Louis

2008/5/22 Louis Préfontaine <[EMAIL PROTECTED]>:

> Ok I ran an exploration with phony parameter (C>1) and saved the result to
> a watchlist and then exported the watchlist to a .tsl file.
>
> Now I ran the script; it said "No tickers found in Amibroker" but then it
> began downloading the information as I wanted it to do.
>
> But then, my question is: how to take that information back to the Database
> I am using?  If I understand correctly (I did some research on the site) the
> .tls is simply a ticker list with no more information, so where is going the
> information and how to make sure that that information will go straight back
> to the database?
>
> Thanks,
>
> Louis
>
> 2008/5/22 Louis Préfontaine <[EMAIL PROTECTED]>:
>
> Hi Chris,
>>
>> Thanks for your help.
>>
>> The problem I have is that...  I am not sure how to use the .tls files!
>> In fact, I never used them; instead I would simply use the "Auto-updated
>> quotes" from the "Tools" menu in AB to automatically download the quotes
>> from Amibroker.   So, I see in the code that you posted that I need to have
>> the .tls files setted, and I am not sure how to do this.
>>
>> 1) How to take the tickers in my current database and put them in the
>> .tls;
>> 2) How to be sure that the next morning when I will open AB it will open
>> the good database and that the database will contain the new information
>> from the .tls file.
>>
>> I guess this must be a really simple thing, but I still didn't get it...
>> yet!
>>
>>
>> Thanks,
>>
>> Louis
>>
>> 2008/5/22 Chris DePuy <[EMAIL PROTECTED]>:
>>
>>>    You could try this.. (where big = your database name).  If you have
>>> questions about detailing this, then you might want to do a "site:
>>> www.amibroker.com AB.LoadDatabase" search and see what is on the ami
>>> site.
>>> Good luck
>>>
>>>
>>> /********************Amibroker open to database***********************/
>>> AB = new ActiveXObject("Broker.Application");
>>> AB.LoadDatabase("C:\\Program Files\\Amibroker\\Big");
>>> AB.Visible = true;
>>>
>>> /* retrieve automatic analysis object */
>>> AA = AB.Analysis;
>>>
>>>
>>> /********************Amiquote retrieve current***********************/
>>> AQ = new ActiveXObject("AmiQuote.Document");
>>> AQ.Open("C:\\Program files\\Amibroker\\amiquote\\Big.tls");
>>> AQ.GetSymbolsFromAmiBroker();
>>> FromDate = new Date(2006,7,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 = 1; // Yahoo Current
>>> 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
>>> }
>>>
>>> /********************Amiquote retrieve current
>>> (end)***********************/
>>>
>>>
>>>
>>> ----- Original Message -----
>>>  *From:* Louis Préfontaine <[EMAIL PROTECTED]>
>>> *To:* [email protected]
>>>  *Sent:* Thursday, May 22, 2008 8:33 AM
>>> *Subject:* Re: [amibroker] amiquote lack of control
>>>
>>>  Thanks,
>>>
>>> This is what I was looking for...
>>>
>>> Unfortunately, I know nothing  (nada, niet, rien) of this language.   I
>>> don't use any .tls folder; is it possible to build such script that would
>>> automatically look into AB and update the quotes in the selected database?
>>> Or would it be better to save my current databse in .tls?
>>>
>>> Thanks,
>>>
>>> Louis
>>>
>>> 2008/5/22 Chris DePuy <[EMAIL PROTECTED]>:
>>>
>>>>   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.
>>>>
>>>> 1)
>>>> http://www.google.com/search?hl=en&q=site%3Awww.amibroker.com+OLE+amiquote&btnG=Google+Search<http://www.google.com/search?hl=en&q=site%3Awww.amibroker...com+OLE+amiquote&btnG=Google+Search><http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=site%3Awww.amibroker.com+OLE+amiquote&spell=1>
>>>>
>>>> 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 <[EMAIL PROTECTED]>
>>>>   *To:* Tomasz Janeczko <[email protected]>
>>>> *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" <[EMAIL PROTECTED]<yukitaga%40tkh.att.ne.jp>
>>>> >
>>>> TJ> To: <[email protected] <amibroker%40yahoogroups.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
>>>> >>
>>>> >>
>>>> >>
>>>>
>>>>
>>>  
>>>
>>
>>
>

Reply via email to