Hi Eugene,
For ease of use, and to make it less likely someone uses data that is not stabilized, all indicator's "FirstValidValue" should be the first stable value. This is more meaningful since it comes directly from the indicator's algorithm.
It seems misleading that:
CODE:
Please log in to see this code.
returns "39", instead of 39*2, or whatever algorithmically would be correct.
That way, if someone decides to use the bars immediately between 39 and the first "stable" value, we were at least warned.
This problem is compounded when using GetExternalSymbol, because the external symbol may have less data than the selected dataset member. So the calculation is GetExternalSymbols("SYMBOL",true).FirstActualBar + indicator.FirstStableBar + indicator's stability fudge factor.
Or consider adding an attribute for "FirstStableValue" or "BarsBeforeStable".
Regards,
--Mike