PureBytes Links
Trading Reference Links
|
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
01/08/2007,07:00,1.930650,1.933100,1.930250,1.933000,-60
01/08/2007,08:00,1.933000,1.934350,1.931050,1.931100,-60
01/08/2007,09:00,1.931100,1.934750,1.930350,1.934000,-60
01/08/2007,10:00,1.934000,1.934650,1.932300,1.932400,-60
01/08/2007,11:00,1.932400,1.933500,1.931200,1.933050,-60
01/08/2007,12:00,1.933050,1.933850,1.932100,1.933600,-60
01/08/2007,13:00,1.933600,1.933750,1.932400,1.933450,-60
01/08/2007,14:00,1.933450,1.933600,1.928650,1.929050,-60
01/08/2007,15:00,1.929050,1.934600,1.928250,1.934100,-60
01/08/2007,16:00,1.934100,1.937350,1.934000,1.934650,-60
01/08/2007,17:00,1.934650,1.938650,1.934050,1.938400,-60
01/08/2007,18:00,1.938400,1.940500,1.937150,1.937750,-60
01/08/2007,19:00,1.937750,1.939350,1.937300,1.937300,-60
01/08/2007,20:00,1.937300,1.938700,1.936150,1.937800,-60
01/08/2007,21:00,1.937800,1.938400,1.937700,1.937800,-60
01/08/2007,22:00,1.937800,1.938150,1.937400,1.937800,-60
01/08/2007,23:15,1.938150,1.939250,1.938150,1.939100,-45
01/09/2007,00:00,1.939100,1.940200,1.938150,1.940200,-60
01/09/2007,01:00,1.940200,1.943450,1.940100,1.943450,-60
01/09/2007,02:00,1.943450,1.943800,1.941550,1.941700,-60
01/09/2007,03:00,1.941700,1.942250,1.941250,1.941700,-60
01/09/2007,04:00,1.941700,1.943550,1.941550,1.943250,-60
01/09/2007,05:00,1.943250,1.943300,1.942250,1.942600,-60
01/09/2007,06:00,1.942600,1.942900,1.942050,1.942450,-60
01/09/2007,07:00,1.942450,1.943500,1.941800,1.943200,-60
01/09/2007,08:00,1.943200,1.945600,1.942150,1.944250,-60
01/09/2007,09:00,1.944250,1.944300,1.941300,1.941850,-60
01/09/2007,10:00,1.941850,1.942550,1.941600,1.942400,-60
01/09/2007,11:00,1.942400,1.943000,1.941350,1.942950,-60
01/09/2007,12:00,1.942950,1.943650,1.941700,1.942350,-60
01/09/2007,13:00,1.942350,1.942600,1.940900,1.941600,-60
01/09/2007,14:00,1.941600,1.943550,1.941350,1.941850,-60
01/09/2007,15:00,1.941850,1.942400,1.939350,1.940450,-60
01/09/2007,16:00,1.940450,1.941650,1.938800,1.940550,-60
01/09/2007,17:00,1.940550,1.941300,1.938950,1.939800,-60
01/09/2007,18:00,1.939800,1.940300,1.939000,1.939700,-60
01/09/2007,19:00,1.939700,1.940750,1.939600,1.940300,-60
01/09/2007,20:00,1.940300,1.940600,1.939700,1.939800,-60
01/09/2007,21:00,1.939800,1.939900,1.939150,1.939300,-60
01/09/2007,22:00,1.939300,1.939900,1.939150,1.939800,-60
01/09/2007,23:15,1.939900,1.940050,1.938900,1.939000,-45
01/10/2007,00:00,1.939000,1.939800,1.938850,1.938950,-60
01/10/2007,01:00,1.938950,1.939000,1.935150,1.936000,-60
01/10/2007,02:00,1.936000,1.937250,1.934650,1.936650,-60
01/10/2007,03:00,1.936650,1.936750,1.934300,1.935650,-60
01/10/2007,04:00,1.935650,1.936500,1.935200,1.936350,-60
01/10/2007,05:00,1.936350,1.936650,1.936050,1.936500,-60
01/10/2007,06:00,1.936500,1.938500,1.936250,1.937600,-60
01/10/2007,07:00,1.937600,1.939350,1.935850,1.939350,-60
01/10/2007,08:00,1.939350,1.940850,1.937500,1.940400,-60
01/10/2007,09:00,1.940400,1.942250,1.939200,1.939350,-60
01/10/2007,10:00,1.939350,1.939950,1.936400,1.938000,-60
01/10/2007,11:00,1.938000,1.939350,1.937700,1.938300,-60
01/10/2007,12:00,1.938300,1.939600,1.937900,1.938650,-60
--- In amibroker@xxxxxxxxxxxxxxx, Panos Boufardeas <panosbouf@xxx> wrote:
>
> //var intradatabase="E:\\Ami-Data\\Interactive\\";
>
> AmiBroker = new ActiveXObject( "Broker.Application" );
> // open database
> //AmiBroker.LoadDatabase (intradatabase);
> WScript.echo(" import? " );
>
> if( ! AmiBroker.Import( 0,
"C:\\temp\\globalintra.txt","tellas.format" ));
> AmiBroker.RefreshAll();
>
> // AmiBroker.Visible(1);
>
> P.S you have to make or declare your own "tellas.format " file
> an easy way is import Wizard
>
> Panos
>
>
> >At 08:24 PM 04-10-2008 04-10-2008, you wrote:
> >
> > >Hello,
> > >
> > >I am looking for a JScript sample, to import quotes from a text file.
> > >
> > >Thank you,
> > >
> > >Pierre
>
------------------------------------
**** 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/
|