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

[amibroker] Re: Importing commodity contracts *.csv file to different Groups/Watchlists



PureBytes Links

Trading Reference Links

To elaborate on the issue of the Date being automatically included by the importer from the file name it looks like you would need to do the following:

1) Rename the CSV file to: 22-02-2006.csv

2) Convert the file to have the date field empty (,,) which will force the importer to try to read the date:

Symbol,Expiry Date,DateDMY,Open,High,Low,Close,Quantity
BRENTCRUDE,16/03/2006,,2620,2632,2603,2616.5,44000
BRENTCRUDE,12/04/2006,,2668,2685,2652,2674.5,2300
BRENTCRUDE,16/05/2006,,2705,2705,2658,2670.5,5300

3) Make the command line look like this (make sure the date format parameter matches your csv file name, which is DMY here):

$FORMAT,Ticker,AppendTicker,Date_DMY,Open,High,Low,Close,Volume
$SEPARATOR ,
$SKIPLINES 1
$AUTOADD 1
$CONT 1
$OVERWRITE 0
$DEBUG 1

Lesmond

--- In amibroker@xxxxxxxxxxxxxxx, "Lesmond V" <ebsn247lsm@xxx> wrote:
>
> You can use ASCii Wizard or better, Import Definition Files:
> 
> http://www.amibroker.com/guide/d_ascii.html
> 
> With $APPENDNAME command you could append Expiry Date to the Ticker.
> 
> Also, your data doesn't have the current date. I assume these are daily files (data for all symbols for one day). In that case you have two choices:
> 
> 1) Rename the file to let's say 22-02-2006.csv and AB will add the date automatically during the import. I've never tried this so can't confirm how it works with different date formats.
> 
> 2) Use Excel (or any other spreadsheet program) and add the Date field so that the file looks like this:
> 
> Symbol,Expiry Date,Date,Open,High,Low,Close,Quantity
> BRENTCRUDE,16/03/2006,22/02/2006,2620,2632,2603,2616.5,44000
> BRENTCRUDE,12/04/2006,22/02/2006,2668,2685,2652,2674.5,2300
> BRENTCRUDE,16/05/2006,22/02/2006,2705,2705,2658,2670.5,5300
> 
> 
> Lesmond
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "vlanschot" <ecbu@> wrote:
> >
> > Simple suggestion: get rid of the comma between the 1st and 2nd 
> > column (easy to do in XL/VB-macro), and then import via Wizard, 
> > whereby your Name()'s become
> > 
> > BRENTCRUDE16/03/2006
> > BRENTCRUDE12/04/2006
> > BRENTCRUDE16/05/2006
> > 
> > So different names, therefore different time series.
> > 
> > PS
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "ar64k" <ar64k@> wrote:
> > >
> > > I get daily *.csv files from my commodity exchange as given below.
> > > This file has same symbol but contracts with different expiry dates.
> > > Is there a way to import these files to AB, so as to get charts for
> > > each contracts. I'm looking at the possibility of importing these
> > > files to different Groups or Watchlists for each month. One group 
> > for
> > > each month.
> > > Any posssibility????
> > > 
> > > ***************************************************************
> > > 
> > > Symbol,Expiry Date,Open,High,Low,Close,Quantity
> > > BRENTCRUDE ,16/03/2006,2620,2632,2603,2616.5,44000
> > > BRENTCRUDE ,12/04/2006,2668,2685,2652,2674.5,2300
> > > BRENTCRUDE ,16/05/2006,2705,2705,2658,2670.5,5300
> > > CASTORDSA  ,20/02/2006,291.1,292.5,291.1,292,180
> > > CASTORDSA  ,20/03/2006,299.1,301.9,299.1,301.2,830
> > > CASTORDSA  ,20/04/2006,303.3,306.1,303.3,305.5,1730
> > > CASTORDSA  ,19/05/2006,306.9,308.6,306.5,308.1,570
> > > CHARJDDEL  ,20/02/2006,1875,1949,1875,1916,211680
> > > CHARJDDEL  ,20/03/2006,1721,1766,1716,1741,243550
> > > CHARJDDEL  ,20/04/2006,1703,1735,1699,1717,71910
> > > CHARJDDEL  ,19/05/2006,1734,1766,1731,1748,37070
> > > CHARJDDEL  ,20/06/2006,1772,1795,1772,1780,1070
> > > 
> > > *****************************************************************
> > > 
> > > Cheers,
> > > 
> > > Manu
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/