[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Difference between 0 and Null for variables?



PureBytes Links

Trading Reference Links

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++)
{

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___