Workarounds:
Call this function in place of FundamentalDataSeriesAnnual():
public DataSeries FDSeriesAnnual(string symbol, string item, int offset)
{
int bar = Bars.Count - 1;
DataSeries result = FundamentalDataSeriesAnnual(symbol, item, offset);
int fq = (int)GetFundamentalItem(bar, symbol, "fiscal quarter").Value;
while (fq == 4 && bar > 0)
{
result[bar] = FundamentalDataSeries(symbol, item, 4, false, offset * 4)[bar];
bar--;
fq = (int)GetFundamentalItem(bar, symbol, "fiscal quarter").Value;
}
return result;
}
You can also use the aggregate overload for FundamentalDataSeries to add the last rolling 4 quarters of a fundamental item:
string eps = "earnings per share";
//Replace this:
//PlotSeries(FundPane,FundamentalDataSeriesAnnual(eps, 0), Color.DeepPink, LineStyle.Solid, 2);
//With this:
PlotSeries(FundPane,FundamentalDataSeries(eps, 4, false, 0), Color.DeepPink, LineStyle.Solid, 2);