PureBytes Links
Trading Reference Links
|
cond=Your condition
x=Sum(cond,4)>=1;
this will return True if cond has occurred in the last four days
including today. Is that what you wanted?
JS
--- In amibroker@xxxxxxxxxxxxxxx, "mrdavis9" <mrdavis9@xxxx> wrote:
> Below is coding that allows the Seq10e2up2e10 OR SeqR14toR14e15
conditions to have occurred upto three days before the RSIEMA2cross
occurs. Is there a lot more elegant and simple way to do this?
>
> An IsNotThere(Array) would do what I want. Is there one that I
missed that can be made to work. I still have not been able to
grasp doing loops. If looping is a good way to do this, I would
sure appreciate seeing the below IIF coding made into a looping
function. Then, by knowing what it is designed to do, I should be
able to finally understand how looping works. Ron D
>
> Day3a=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-3),1,0);
>
> Day3=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-3),1,0);
>
> Day2a=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-1),1,day3a);
>
> Day2=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-2),Day3,0);
>
> Day1a=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-1),Day2,Day2a);
>
> Day1=IIf(Ref(Seq10e2up2e10 OR SeqR14toR14e15,-1),Day2,0);
>
> Day0a=IIf(Seq10e2up2e10 OR SeqR14toR14e15,Day1,Day1a);
>
> Day0=IIf(RSIEMA2cross,Day0a,0);
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/
|