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

[EquisMetaStock Group] Re: Strange



PureBytes Links

Trading Reference Links

Pablo, look for something very strange somewhere between chair and 
keyboard - four conditions (or more) in an If() statement work fine:

==============
test indicator
==============
---8<----------------------------

{ Plots TRUE (1) if all conditions are met,
 plots FALSE (0) if not all conditions are met.}

{ User inputs }
x1:=Input("1st test number",0,1000,10);
x2:=Input("2nd test number",0,1000,20);
x3:=Input("3rd test number",0,1000,30);
x4:=Input("4th test number",0,1000,40);
x5:=Input("5th test number",0,1000,50);
x6:=Input("6th test number",0,1000,60);

{ Test multiple conditions }
test:=
  If(x1=10
 AND x2=20
 AND x3=30
 AND x4=40
 AND x5=50
 AND x6=60
,TRUE,FALSE);

{ Plot in own window }
test

---8<----------------------------


jose '-)
http://www.metastocktools.com




--- In equismetastock@xxxxxxxxxxxxxxx, Paolo <italoarg76@xxx> wrote:
>
> Hi!
>     I´ve seen something very strange coding for MS 9.1
> If I write a large conditional (IF) then the conditions are not
> evaluated!!
> It was the reason because I should to cut the following code.
> One IF with the 4 conditions does NOT work!!!!!
> 
> Pablo
> 
> ColA
> ====
> CMFctrl:=CMF(14)>Ref(CMF(14),-1)
> AND  Ref(CMF(14),-1)>Ref(CMF(14),-2);
> MOctrl:=Mo(C,12)>Ref(Mo(C,12),-1)
> AND Ref(Mo(C,12),-1)>Ref(Mo(C,12),-2);
> CMFctrl AND MOctrl //  It checks BOTH conditions at the same time.
> 
> Filter
> ======
> ColA<>0








 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/