Skip to content
Dave Mabe
Close menu

Null Values in Trade-Ideas

By Dave Mabe

Yesterday, I shared how to exclude stocks that reported earnings yesterday after the close or today before the open using Trade-Ideas.

But if you look closely at the Earnings Date filter in Trade-Ideas, you'll notice that if the most recent earnings date and the closest upcoming date are both relatively far away, the value will be blank.

And when it's blank, it won't appear when you use a value in either the minimum or maximum value for the filter.

Luckily, there's a nice solution for this: using a null-coalescing operator in a custom formula.

From the Tools menu in Trade-Ideas, go to Formula Editor.

Add a new Custom Formula with the following code:

[EarningD] ?? -100

EarningD is the internal code for the Earnings Date filter.

And the double question mark ?? is the null-coalescing operator, which is a fancy way of saying that, when null, the value will be -100 instead of being blank.

Then apply the filter described in yesterday's post to your new filter.

This will allow stocks with null values for the Earnings Date to appear in your alert windows and top lists.

-Dave

P.S. When you're ready to take your trading to the next level, MabeKit is the key. Here's what one RealTest trader said about it: "The MabeKit Column Library is absolutely essential for using RealTest. It has a dual purpose: it immediately provides columns whose predictive value the Cruncher can identify, and it also serves as inspiration for adding new columns. Practically speaking, without the column library, I probably wouldn’t be using RealTest." Get Instant Access to MabeKit