[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Stuck using OLE to import data



PureBytes Links

Trading Reference Links

Thanks Tomasz,


but i am still stuck, if anyone can help that would be great!


I created my file to import and I can import it with the wizard without a problem. Using the wizard I saved the format file as "Custom1.format" in the format folder. However using the following OLE I get a "COM method/function 'Import' call failed" message.


RefArrayName = ParamStr("Ref. Array name","DateRef");

RefArrayPath = "C:\\Program Files\\AmiBroker\\CustomData\\";

RefPathName        = RefArrayPath+RefArrayName+".txt";

AB = CreateObject("broker.application");

AB.Import(RefPathName, "Custom1.format");



what is wrong with the above?


many thanks,

herman



Wednesday, May 16, 2007, 3:54:11 PM, you wrote:


>

Hello,

 

1. Does not matter, will accept any extension

2. You need to create import definition that matches your data for details see:

http://www.amibroker.com/guide/d_ascii.html

The import definition file will be automatically created by last page option of Import wizard:

http://www.amibroker.com/guide/w_impwizard.html

 

3. Imported data will be in your currently loaded DB as other data 

 

4. No limit


Best regards,

Tomasz Janeczko

amibroker.com

----- Original Message ----- 

From: Herman 

To: _AmiBroker 

Sent: Wednesday, May 16, 2007 7:50 AM

Subject: [amibroker] Stuck using OLE to import data


I have a file: 


TestFile = "C:\\Program Files\\AmiBroker\\CustomData\\TestFile001.txt";


with the following format (this example uses dummy data):


Ticker,Date/Time,Open,High,Low,Close,Volume

TestFile001,01/05/2007,1070501,1070501,1070501,1070501,732797

.... and more dates here ...


that i want to import using OLE:


AB = CreateObject("broker.application");

AB.Import(TestFile, "importdef");


1) Should the imported file have an extension?

2) What do I substitute for the "importdef" to make this work?

3) Where will the imported data be located in my DB?

4) Is there a limit to the date-range in my file, for example, will AB accept future dates that can be plotted?


your help will be much appreciated!


herman

 

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___