PureBytes Links
Trading Reference Links
|
Friends,
I coded the script. It works. It import the data. However, when I
invoke AmiBroker, all the windows are screwed-up. Their sizes are all
different. The securities that they all display is the first
security in the database. Any input ? (Also, I found that the
commented section that deals with LoadDatabase produces error [object
error]. Any idea how to fix this ? BTW, the database exists in the
folder, so its not as if the database is not present for LoadDatabase
to load.)
Script ===>
=====================================================================
WScript.Echo( "invoking");
Amibroker = new ActiveXObject("Broker.Application");
/****
WScript.Echo( "loading database");
try
{
Amibroker.LoadDatabase("C:\\AMI\\AmiFast");
}
catch ( e )
{
WScript.Echo( "error loading" + e );
}
****/
WScript.Echo( "importing");
try {
Amibroker.Import
(0,"C:\\AMI\\AMISYSTEMS\\VIX.CSV", "C:\\AMI\\AMISYSTEMS\\VIX.FORMAT");
}
catch ( e )
{
WScript.Echo( "error importing" );
}
WScript.Echo( "refreshing");
Amibroker.RefreshAll();
WScript.Echo( "saving");
Amibroker.SaveDatabase();
WScript.Echo( "done");
=====================================================================
Regards,
- Salil V Gangal
--- In amibroker@xxxxxxxxxxxxxxx, "salil_gangal" <salil_gangal@xxxx>
wrote:
> Tomasz,
>
> True !
>
>
> >>BTW: AmiBroker's OLE interface is the workhorse of
> many 3rd party tools released recently, unfortunatelly
> general public never really noticed / used the interface
> directly.<<
>
> (Guilty as charged ! *smile*)
>
> However not taking notice will change soon. As the requirements
> increase, so does the attention paid to the various native
facilities
> offered.
>
> Regards,
> - Salil V Gangal
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
<amibroker@xxxx>
> wrote:
> > Yes Salil, it is simple indeed, I told you :-))))
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "salil_gangal" <salil_gangal@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Saturday, August 02, 2003 1:37 AM
> > Subject: [amibroker] Re: Data import automation - Is this doable ?
> >
> >
> > > Tomasz,
> > >
> > > Excellent solution ! I guess this serves my requirement
exactly
> as I
> > > wanted. So it is as simple as ===>
> > >
> > > -----------
> > > try
> > > {
> > > AmiBroker.Import( 0, filename, "prnn.format" );
> > > }
> > > catch( e )
> > > {
> > > return false;
> > > }
> > > AmiBroker.RefreshAll();
> > > return true;
> > > -----------
> > >
> > > Regards,
> > > - Salil V Gangal
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
> <amibroker@xxxx>
> > > wrote:
> > > > Hello,
> > > >
> > > > Yes it IS doable. Check NEWSLETTERS
> > > > http://www.amibroker.com/newsletter
> > > >
> > > > especially
> > > > http://www.amibroker.com/newsletter/02-2001.html
> > > >
> > > > It describes how to write a simple (few lines) script
> > > > that allows to import automatically, using AMiBroker's
> > > > OLE interface.
> > > >
> > > > There is a single function "Import" that just imports ASCII
> files.
> > > >
> > > > BTW: AmiBroker's OLE interface is the workhorse of
> > > > many 3rd party tools released recently, unfortunatelly
> > > > general public never really noticed / used the interface
> directly.
> > > > (it is not complicated at all)
> > > >
> > > > Best regards,
> > > > Tomasz Janeczko
> > > > amibroker.com
> > > > ----- Original Message -----
> > > > From: "salil_gangal" <salil_gangal@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Friday, August 01, 2003 6:43 PM
> > > > Subject: [amibroker] Data import automation - Is this doable ?
> > > >
> > > >
> > > > > Friends,
> > > > >
> > > > > Here is the background.
> > > > >
> > > > > 1) I have a 'database' sourced from external source.
> > > > >
> > > > > 2) I need to import *just* 1 security based on an ASCII
file,
> > > > > which *does not* exist in the external source. The
format
> > > > > for record in the ASCII file is ===>
> > > > > mm/dd/yyyy,Open,High,Low,Close
> > > > >
> > > > > 3) The sequence of *manual* operation I perform goes
something
> > > like
> > > > > a) I update the ASCII file (in step 2)
> > > > > b) I invoke AmiBroker
> > > > > c) I click thru the menu 'File Import_ASCII'
> > > > > d) I type-in the name of the file (in step 2)
> > > > > e) I click 'Open' to start import
> > > > >
> > > > > The whole manual operation goes absolutely fine !
> > > > >
> > > > > Now what I want to do is to automate steps c), d) and e)
> above.
> > > > >
> > > > > Is this doable. Any inputs about how to do it ?
> > > > >
> > > > > Regards,
> > > > > - Salil V Gangal
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Send BUG REPORTS to bugs@xxxx
> > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > -----------------------------------------
> > > > > Post AmiQuote-related messages ONLY to:
> amiquote@xxxxxxxxxxxxxxx
> > > > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > > > --------------------------------------------
> > > > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > >
> > > > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/sO0ANB/LIdGAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|