EricN
12th August 2006, 04:01 PM
In an exploration to do back testing I want to exclude securities that are being acquired or are merging. Typically, I see a large gap up and then an almost flatlined close range. To identify a large gap up only is not sufficient. I must detect the flatlined closing range as well. I coded a Column as follows:
Alert(If(L>Ref(H*1.15,-1),1,0) AND
If((Abs(Ref(C,+1)-Ref(C,+3)))<(C*.005),1,0) AND
If((Abs(Ref(C,+1)-Ref(C,+4)))<(C*.005),1,0),3000)
After the gap up I referenced very small closing differences. All this works fine, but when it comes to filtering there is a problem. Since it references future events, the last result in the column, of course, shows N/A. It appears that the filter only looks at the last line and I have been unable to force it 5 lines back.
Hope you can help. Thanks in advance.
Best regards,
Eric
Alert(If(L>Ref(H*1.15,-1),1,0) AND
If((Abs(Ref(C,+1)-Ref(C,+3)))<(C*.005),1,0) AND
If((Abs(Ref(C,+1)-Ref(C,+4)))<(C*.005),1,0),3000)
After the gap up I referenced very small closing differences. All this works fine, but when it comes to filtering there is a problem. Since it references future events, the last result in the column, of course, shows N/A. It appears that the filter only looks at the last line and I have been unable to force it 5 lines back.
Hope you can help. Thanks in advance.
Best regards,
Eric