function st=testtr(O,C,H,L,N)
ZH=2*(H-O).*(H-C);
ZL=2*(L-O).*(L-C);
T = ((C-O).^2);
n=length(O);
st=T./(.000001+ZH+ZL);
[x,i] = sort(st);
x(round(.95*length(x)))
i=i(n+1-i);
i=i(1:N);
pos = (C(i+1)-O(i+1));
y=cumsum(pos(C(i)>O(i)));
plot((1:length(y)),y,'r')
hold on
y=cumsum(pos(C(i)<O(i)));
plot((1:length(y)),y,'g')

