Interim report date in Amibroker

I have a excel file containing the date for each company:s interim report.

Is it a way to in some way show this date´s in Amibroker. I don´t want to
hold a stock over this interim report date.

Best regards,

Leif Axelson

@AsaLeffe, one way to achieve your goal is to control Excel from Amibroker and directly read its data to be displayed as needed.

Read the rest of this post only if you are familiar with Excel functions and want to experiment a little with its automation features.

I assume your spreadsheet has tickers in one column and earning dates in the next.

I suggest creating a new cell with a =VLOOKUP function that you will use (setting it from AB to the current Name()) to "search" for the next interim report date.

Wrap the VLOOKUP in a =IFNA conditional to handle errors (i.e search key/ticker not found).

The valid result in Excel should be a positive number; there is a function extracted from the AFL library (courtesy of Paul D.) to convert it to an Amibroker date named XLSerialDaysToDateNum. (I used it this unrelated past example).

Alternatively, you can apply additional Excel functions (like =TEXT) to convert it to a formatted string to read and use in your formula.

For an example of AB interaction with Excel (via a short embedded VBScript) see this past thread by @fxshrat .

If you need further guidance feel free to ask.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.