Tried to do a search in the User's Guide for this, but can't quite
pinpoint an explanation:
What is the difference, if any, between 0 and Null when assigning
non-boolean variables? When should we use Null instead of plain old 0?
For example, all of the six variables below are real numbers, yet some
are initially set to Null and others to 0.
I copied this snippet from an example AFL that works properly:
// Set up variables for our entry values, as our stops will test
// against the initial entry prices
valueAtBuy = valueAtShort = Null;
profitLevel = profitLevel2 = Null;
// Number of open contracts
longContractCount = 0;
shortContractCount = 0;
for (i = start; i < BarCount; i++)
{