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 : Metastock 6.0 for Window -- Ignore unavailable to you. Want to Upgrade?


To: bdog who wrote (3071)5/21/1999 12:26:00 PM
From: Paul Beattie  Read Replies (2) | Respond to of 4056
 
bdog,
I'm pretty sure MSWIN will handle nested ifs, but I've always found them non-intuitive, because if() is used for conditional assignment, not flow control. Also, it's easy to go crazy over matching parentheses.

What I do is identify Condition 1, 2, 3, 4 as a non-overlapping partition of all outcomes. Then use:

Result:=
if(Condition1, expression1, 0)+
if(Condition2, expression2, 0)+
if(Condition3, expression3, 0)+
if(Condition4, expression4, 0);

Paul

This approach works well in system testing. Use opt1 as an "index" to select from several exit conditions. This lets you compare different exit strategy variants for a system with one entry rule (or vice versa).