[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

formula for an indicator to display no. of whipsaws



PureBytes Links

Trading Reference Links

I'm currently looking at break-out systems where there is a huge propensity for whipsaws, by which in my little world I mean the number of times my break-out stops above and below the market both get hit on the same day.

To make it obvious on the screen, I want to have an indicator showing the cumulative number of days with whipsaws.

I got so far but am stuck since TS won't let me put system info formulae into a study:

vars: count(0);
if EntryDate(Date) = EntryDate(Date[1]) then
	count = count + 1;
Plot1(count, "whipsaws");


Is this the end of the road for my plans to conquer the markets, or is there a way of doing it properly?

Just in case the code looks dumb to you, I just want to point out I'm on TS4 :)