PureBytes Links
Trading Reference Links
|
Hello,
1. Why would you need to click "retrieve" button every time before backtest?
(That only gets symbols, which do not change that often).
2.
AQ = new ActiveXObject("AmiQuote.Document");
AQ.GetSymbolsFromAmiBroker();
AQ.AutoImport = false; // no automatic import
AQ.Source = 1; // Yahoo Current
AQ.Download(); // starts download
while( AQ.DownloadInProgress || AQ.ImportInProgress )
{
WScript.sleep(5000); // wait 5 seconds while AmiQuote is downloading
}
AQ.Import(); // starts download
while( AQ.ImportInProgress )
{
WScript.sleep(5000); // wait 5 seconds while AmiQuote is importing
}
WScript.echo("Download and import complete");
Best regards,
Tomasz Janeczko
amibroker.com
On 2010-01-15 21:44, bistrader wrote:
> Tomasz,
>
> Ok and thanks, but I could not figure out how to do the following via OLE.
> 1. I can get AB open, but could not figure out how to go to Database setting, configure and retreive first which I need to do prior to doing a backtest.
>
> 2. I can get AB open and then AQ open, but can not figure out how to tell AQ to get tickers from AB and then download Current only without using key stocks.
>
> Bert
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, Tomasz Janeczko<groups@xxx> wrote:
>
>> Hello,
>>
>> "Light blue" means that window does not have input focus.
>> I can not help you with your AutoIt scripts. Sending virtual keystrokes is
>> not really good method for automation, because you don't know where
>> the input focus is (a single click, tab, alt tab can change the focus).
>>
>> Instead you should be using OLE Automation interface
>> http://www.amibroker.com/guide/objects.html
>>
>> That is way more reliable than virtual keystrokes.
>>
>> Best regards,
>> Tomasz Janeczko
>> amibroker.com
>>
>> On 2010-01-15 20:24, bistrader wrote:
>>
>>> I have been using AB 5.2 and recently installed 5.296. Twice to make sure as I was having the following problems.
>>>
>>> I can not AB 5.296 to respond to key strokes!!
>>>
>>> AB 5.296 is NOT response to key strokes and this causes the problem. Here is what I do.
>>> 1. Click on the AB icon to open AB and it opens.
>>> 2. Hold down the function key and hit F for File or anything else and AB does not respond. Notice that most upper left corner of screen with "AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]" in it is light Blue.
>>> 3. Click on center of screen and notice that upper left corner of screen with "AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]" in it turns to Dark Blue. Now, AB responds to key strokes like Function Key with F for File.
>>>
>>> I need to figure out how to work around this problem as I use AutoIt a lot to run AB. None of my AutoIt programs key strokes will work in AB 5.296 (they did in 5.20, my last version on my PC) just like they do not work as explained above. Here is a simple example of an AutoIt.
>>>
>>> I can not get AutoIt to work with AB 5.296 give that AB 5.296 will NOT respond to key strokes UNTIL one clicks on the center of the screen after AB opens.
>>>
>>> Run("C:\AmiBroker\broker.exe")
>>>
>>> ; NEXT LINE DOES NOT WORK ANYMORE
>>> ;WinWaitActive("AmiBroker")
>>> ; NEITHER DOES NEXT LINE
>>> ;WinWaitActive("AmiBroker - [RUT-I - Russell 2000 Composite Index Daily]")
>>>
>>> ; Sleep for 20 seconds to let be sure open
>>> Sleep(20000)
>>>
>>> ; Change to TC2000 database - File menu -> Open, T, Enter
>>> Send("!f")
>>> Sleep(2000)
>>> Send("D")
>>> Sleep(2000)
>>> Send("T")
>>> Sleep(2000)
>>> Send("{ENTER}")
>>> Sleep(30000)
>>>
>>> ; Save AmiBroker
>>> Send("!f") ; ALT f
>>> Sleep(3000)
>>> Send("S") ; S for Save
>>>
>>> ; Exit AmiBroker
>>> Sleep(2000)
>>> Send("!f") ; ALT f
>>> Sleep(2000)
>>> Send("X") ; X for Exit
>>>
>>> ; DONE
>>>
>>> AmiBroker opens with the code above BUT AmiBroker does NOT respond to ANY of the key strokes. Help appreciated.
>>>
>>> ...
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> **** IMPORTANT PLEASE READ ****
>>> This group is for the discussion between users only.
>>> This is *NOT* technical support channel.
>>>
>>> TO GET TECHNICAL SUPPORT send an e-mail directly to
>>> SUPPORT {at} amibroker.com
>>>
>>> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
>>> http://www.amibroker.com/feedback/
>>> (submissions sent via other channels won't be considered)
>>>
>>> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
>>> http://www.amibroker.com/devlog/
>>>
>>> Yahoo! Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
>
>
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
amibroker-digest@xxxxxxxxxxxxxxx
amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|