As we know, many data providers such as Norgate provide two different types of data: bar-by-bar data series (e.g., prices vs time) and single-point fundamental data available only at the most recent bar (for example the number of shares outstanding). We can display the value of this Norgate data item in Amibroker with the following code snippet:
#include_once "Formulas\Norgate Data\Norgate Data Functions.afl"
ShOut = NorgateFundamentals ("SharesOutstanding");
Plot (ShOut, "ShOut", colorBlack, styleDots, styleLeftAxisScale); // or similar.
What we see in Amibroker when we do this is one single value, repeated for each bar. Even though plotted in Amibroker on a chart vs time, we know this is not actually the number of shares outstanding vs time, because it is only single-point data; the most recent day’s data. Of course that is quite OK, as we do understand that it is not really a time series.
Now imagine that we make a note of the value today, and that between now and the next day, the company issues more shares or does a share buyback, either of which causes a change in the number of shares outstanding. Then, next time we run Amibroker with Norgate data source, we will again see only a single value of ShOut, but now it will be the NEW value. Unless we have actually made a note of the previous day’s OLD value of ShOut, we may not realize that it has changed.
But if we had noted and plotted the OLD value of ShOut as a fixed value, then we would be able to see the difference. This is what I would like to do, but I have not yet figured out an elegant way to do it, even though I expect that it is probably fairly easy in Amibroker (maybe VarSet / VarGet or similar ?)
“Shares Outstanding” here is just an example, and it could be anything else from Norgate’s (or other) single-point data. What I want to do is to see if the value has changed since the previous time that I looked in Amibroker. I understand that, in principle, it involves saving the value of a Norgate single-point data item as a fixed value with some different name, and then comparing that against what I get the next time when I call the same data from Norgate. (Obviously we would not be able to actually see this working until the data actually changes).
How I can determine and display if/when Norgate (or other fundamental data provider's) single-point, most recent fundamental data changed from one day to the next? Any assistance / comments gratefully received. Thanks in advanvce, from TonyM.