PureBytes Links
Trading Reference Links
|
hi
only the path is missing oAB.Import( 0, "QBs1H.txt", "QBs1H.format" );
the correct one is like oAB.Import( 0, "E:\\QBs1H.txt", "QBs1H.format" );
and maybe in format need one more line $ALLOWNEG 1
also donot forget the database setting >> base time interval 1 hour or
something
Panos
At 07:58 PM 05-10-2008 05-10-2008, you wrote:
>Thanks Panos Boufardeas.
>
>I dont success.
>
>Config :
>--------
>Windows XP
>AmiBroker 5.10
>
>How I proceed.
>AmiBroker is closed.
>ImportQuotes.js, QBs1H.format, and QBs1H.txt are in the same directory.
>I double click on ImportQuotes.js .
>A new AmiBroker database is created "ABDataBase", but it's empty.
>
>Where is my mistake ?
>
>Here my code.
>
>AFL code in ImportQuotes.js :
>----------------------------
>
>/*
>** AmiBroker/Win32 scripting
>**
>** File:ImportQuotes.js
>** Created:
>** Purpose:Import quotes from a text file into a AmiBroker DataBase
>** Language: JScript
>*/
>
>/* Create AmiBroker object */
>oAB = new ActiveXObject("Broker.Application");
>
>oAB.LoadDatabase("E:\\ABDataBase\\");
>oAB.Import( 0, "QBs1H.txt", "QBs1H.format" );
>oAB.RefreshAll();
>oAB.SaveDataBase();
>oAB.Quit();
>
>WScript.Echo("Create DataBase finished" );
>
>QBs1H.format :
>--------------
>
># Format definition file generated automatically
># by AmiBroker's ASCII Import Wizard
>$FORMAT Date_MDY, Time, Open, High, Low, Close, Volume
>$SKIPLINES 0
>$SEPARATOR ,
>$CONT 1
>$GROUP 255
>$AUTOADD 1
>$DEBUG 1
>
>QBs1H.txt :
>-----------
>01/08/2007,00:00,1.930250,1.930350,1.929300,1.929600,-60
>01/08/2007,01:00,1.929600,1.930100,1.926250,1.928050,-60
>01/08/2007,02:00,1.928050,1.929700,1.927700,1.927800,-60
>01/08/2007,03:00,1.927800,1.928350,1.927200,1.928250,-60
>01/08/2007,04:00,1.928250,1.929600,1.928250,1.929000,-60
>01/08/2007,05:00,1.929000,1.929250,1.928650,1.929250,-60
>01/08/2007,06:00,1.929250,1.930850,1.928700,1.930650,-60
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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
<*> 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:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto: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/
|