I'm interested in things that can be reduced to code. Particularly swing. I'm not sure I remember Krausz's strategy but think it goes something like this.
On a small level bar direction determines swing.
if H<H[1] and H[1]<H[2] then dir= -1 else if L>L[1] and L[1]>L[2] then dir=1;
There's lots of exceptions that make that buggy. Here's a fix for one.
if dir<>dir[1] then begin if dir>0 and H<H[1] and H[1]<H[2] then dir=dir[1] else if dir<0 and L>L[1] and L[1]>L[2] then dir=dir[1]; end;
Tracking swing extremes is the first step toward determining trend.
if dir<0 and L<myL then begin myL=L; myBar=currentBar; end else if dir>0 and H>myH then begin myH=H; myBar=currentBar; end;
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.