Hank,
The idea is very similar to that of the Demark indicators.
Try this:
Condition:=If( C > Ref(C,-2),1, 0);
Count:= Cum(Condition) ;
If(count > Ref(count,-1) ,count,0) ;
Preston
--- In equismetastock@ yahoogroups. com, Henry Pang <hankpang@xx .> wrote:
>
> Dear All,
>
> I am trying to number the bar using Expert Advisor. The rule is very simple "Close must be higher than the Previous 2 days close" (C >Ref (C,-2)) and I wish to number them 1 by 1..... Unfortunately, I only get 1 for all the bar. Please help.. The attached file is S&P 500 for your reference.
>
> Thank you
>
> Cheers,
> Hank
>
>
> Yahoo!»´ä´£¨Ñºô¤W¦w¥þ§ð²¤¡A±Ð§A¦p¦ó¨¾½d¶Â«È!
½Ð«e©¹ http://hk.promo. yahoo.com/ security/ ¤F¸Ñ§ó¦h!
>