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

[amibroker] Re: Poplulating ALIAS field with ticker names in Information Tab



PureBytes Links

Trading Reference Links

For a starter you can try this.

1) Look at the code below.

// Show First N Characters Of The Ticker

Filter = 1;

c_1 = StrLen(Name());

// show last N characters (one-based)
c_2 = StrRight(Name(), 8);

// show all characters less N (one-based)
c_3 = StrLeft(Name(), c_1 - 8);

AddColumn    (c_1, "Ticker Length");
AddTextColumn(c_2, "Last Chars");
AddTextColumn(c_3, "First Chars, Alias");

2) Modify the above code to keep only the columns that you need, for example Ticker, Date and your new Alias column.

3) In Automatic Analysis set the Date Range to Last N Days = 1 and run Exploration, then click Export to save the results to a CSV file.

4) Use ASCii Importer to import data from the CSV file back to AB. Make sure that you have at least two fields included in Import Definition File: Ticker and Alias.

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

Lester


--- In amibroker@xxxxxxxxxxxxxxx, "Allan" <allanbradl@xxx> wrote:
>
> Hi Guys ! Iam looking for a way to write all the  ticker names from   
> my database in to the "Alias" field in Information tab (I understand it 
> means to assighn Alias to the ticker ) Iam  using  IB format , 
> TICKERNAME-STK-NXY or TICKERNAME-STK-TSE etc. so in this case I would 
> want to take "TICKERNAME" of all the symbols and write it as an Alias 
> without "-STK-TSE" part.  Would appreciate any help.
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.24/668 - Release Date: 2/4/2007 1:30 AM