I am running the software to scan about 500 stocks and indices.
A scan for the Dow today gives you for example a positive scan for P&G.
For ts2000i:
{File

G_D.txt Index:10 Index Date:20040116 PL:73.08% PS:26.92% Trades:52 CL:3}
input: ptarget(5), stopl(5);
variables: profitprice(0), stopprice(0);
If h[2] > h[1] and h[1] > h[0] and h[0] > l[2] and l[2] > l[1] and l[1] > c[0] and c[0] > l[0] then begin
Buy Next Bar on the open;
If Marketposition = 0 then begin
profitprice = O of tomorrow * (1+ptarget/100);
stopprice = O of tomorrow * (1-stopl/100);
exitlong next bar at profitprice limit;
exitlong next bar at stopprice stop;
end;
end;
if marketposition= 1 then begin
profitprice= entryprice * (1 + ptarget/100);
stopprice= entryprice * (1 - stopl/100);
exitlong at profitprice limit;
exitlong at stopprice stop;
end;
The problem is that you can not detemine a key figure for witch amount for example the high 2 days ago must be greater than the high 1 day ago.
So (everything else unchanged) for example if the high 2 days ago is 100.49 and the high 1 day ago is 100.48 you get the buy signal as well as if the high is 99.
On the other side you get no buy signal if the high is 100.50.