SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TA-Quotes Plus -- Ignore unavailable to you. Want to Upgrade?


To: bdog who wrote (6103)8/22/1998 10:20:00 PM
From: gonzongo  Read Replies (1) | Respond to of 11149
 
yes from one feeble programmer to another- nested if's work much faster because you eliminate data fast and don't have to ask all the other if questions:
example:
if close(0)> 10 then
eliminates all stocks < 10 from the rest of the subsequent if statements.

etc.
etc.

so avoid and and replace with more "if-then-endif"'s

g



To: bdog who wrote (6103)8/23/1998 2:21:00 PM
From: Bob Jagow  Read Replies (1) | Respond to of 11149
 
re nested ifs, bdog.
-as you probably recall, the reason for nesting is that qpr2 lacks short-circuit evaluation logic:
if cond1 and cond2 and cond3 evaluates all 3 even if cond1 is false.
-the big saving is in avoiding assignment to a complicated formula such as StocRSI by nesting it at the bottom.
-be sure to run benchmarks in duplicate; the repeat will often be much faster -- recent builds apparently implement a lot more caching.

Bob