Earnings Date Helper - Object reference not set to an instance of an object
Author: Christos
Creation Date: 11/20/2012 7:49 AM
profile picture

Christos

#1

I am trying to access the next earnings date by making use of the code in WL wiki. I have installed community.components and I simply copy and paste the code. Although it compiles successfully I get the following error:

Runtime error: Object reference not set to an instance of an object.
atWealthLab.Strategies.EarningsDateDemo.Execute()
at WealthLab.WealthScript.GetFundamentalItem (Int32 bar, String symbol, String itemName)

Can you provide some explanation/solution?
profile picture

Eugene

#2
Simply copying and pasting won't work: the premise behind the example code is that your fundamental data does contain the "earnings per share" item. Which is not true for a Wealth-Lab Developer user, because this one is only available to the Wealth-Lab Pro customers.

So, to make it work you just need to make sure your fundamental data is up to date, and then type in an existing item, exactly. The full list of fundamental items made available by the installed data providers could be found in Wealth-Lab's Preferences dialog > Chart annotations, and on the Fundamentals list (strike Ctrl-F11).

Here's a cheat sheet:

* MSN Static provider version 2012.12 and up (free): "[msn] eps"
* Morningstar fundamental provider (free): "[ms] Earnings Per Share"
* YCharts (paid data vendor): "[yc] Earnings Per Share"
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).