PureBytes Links
Trading Reference Links
|
Before using any variable you can initialize it to NULL, you can do this as
the top of your code for all variables that need separate initialization.
then later you can check and know the variable is not initialized when its
value is NULL. I always initialize all my variables to either zero or NULL.
Null is nice for signals that will be plotted, as NULL doesn't plot. You can
check for NULL in various ways:
You have to remember that arrays can be partly initialized... to see if an
array contains any NULLs you can use: Cum(Array == NULL) > 0
best regards,
herman
-----Original Message-----
From: Ara Kaloustian [mailto:ara1@xxxxxxxxxx]
Sent: Monday, August 09, 2004 8:48 PM
To: AB-Main
Subject: [amibroker] Variables not initialized
When I use the line below I get an error that "Variable ... is not
initialized" ... which is correct
Null_Test = (IsNull(Last_BuyState));
Looking for a way to do same test for uninitialized variables, such as
Init_Test = IsNotInit(Last_BuyState));
"IsNotInit" function does not exist ... is there a workaround for this?
Would like to be able to do this:
if (IsNotInit(Last_BuyState)) {Last_BuyState = Null; } // or any other
value
This will allow me to initialize variables when first starting program
without having to make an assignments that repeats every cycle thru the code
Thanks
Ara
[Non-text portions of this message have been removed]
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Sponsor
ADVERTISEMENT
----------------------------------------------------------------------------
--
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
b.. To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|