Which field to store String Type Ticker Level Data?

Hi,

I want to store string type - Ticker level data like :

  1. status - Active, suspended, inactive
  2. State of Operation
  3. subsidiary names
    And couple of more such fields. All are String. I am already strong Sector and Industry in their respective fields.

I know I can convert String to Numeric ( Codify) but, I want to know are there any placeholder fields which can hold strings?

The fundamental data fields https://www.amibroker.com/guide/h_fundamental.html can only hold Numerics.

Any guidance on that?

How about using Notepad, which allows you to store symbol specific notes? Menu > Window / Notepad

Notes can be programatically retreived using NoteGet(). If you structured the notes in a uniform way, you could parse the note to get the info you want using string functions such as StrFind(), StrMid() etc.

4 Likes

Thankyou for giving me a different perspective. I foresee lot of possibilities with this.

Can we set text in Notepad for each ticker using ASCII import? Thing is, my strings come from a Mysql Table. So, I can write a code in PHP the prepares my ASCII file, which I want to import in notepad field.

So, which Amibroker Notepad field can I import my text into?

You can write a routine that uses Fopen() to open the file, FGets() in a loop to pull the data from the file, and NoteSet() to store it in the notepad.

1 Like

Thank you @HelixTrader

If your data comes from sql then you might consider looking at ODBC plugin http://www.amibroker.com/odbc.html

It has two options… AFL and Data plugin.

I have only tested it with MS Access via ODBC AFL plugin to access non quotation data as in your case.

Thanks @fxshrat

I did use ODBC plugin. But for it I get error “MYSQL connection gone away” every couple of minutes.

You may need to configure (increase timeouts) in your mySQL and/or its ODBC driver.