PureBytes Links
Trading Reference Links
|
Progster -
I've seen this before, and it is best left to TJ to explain why. I've just used the IsNull() function and moved on.
if ( IsNull( StaticVarGet( "passcount" ) ) ) StaticVarSet( "passcount", 1 );
BTW, I went ahead and finished the article off. I know you get the idea, but it may be of help to others who run into similar problems. Sorry for the long URL - gotta fix that soon -
http://www.amibrokeru.com/FreeLibrary/FreeArticles/tabid/63/articleType/ArticleView/articleId/115/Indicator-Cache-ndash-Dealing-with-Lengthy-Indicator-Re-Calculations.aspx
-- Bruce
--- In amibroker@xxxxxxxxxxxxxxx, "progster01" <progster@xxx> wrote: > > > > > Jules and Bruce, > > Thank you both for your comments and suggestions. I'm sure I'll be able to achieve improvement by working in the indicated directions. > > I'll definitely look forward to your article, Bruce, whenever it is ready. > > Thinking of what's been said, I'd like to detect the first pass thru the code (vs. subsequent passes). > > This compiles, but doesn't work: > > if( StaticVarGet("PassCount") == Null ){ StaticVarSet( "PassCount", 1 ); } > else StaticVarSet( "PassCount", StaticVarGet("PassCount") + 1 ) ; > _TRACE( "PassCount: " + NumToStr( StaticVarGet("PassCount"), 1.0) ) ; > > ( _TRACE() reports: PassCount: {EMPTY} on every pass. ) > > I feel sure there must be some simple idiom for doing this. (Perhaps I'm having a block-head day!) Suggestions? > > - Progster >
__._,_.___
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
__,_._,___
|