Larry Williams' WillTrend indicator, though, is not the one pointed out in the first post by: noumann, because this is the indicator (...it resembles a SuperTrend):
so the formula could be this:
-----------------------------------------------------------------------
{WillTrend - by Larry Williams}
Inputs:
Period(66),
ATRMultiplication(2.236),
MidPriceVar(10);
Variables:
upperBand(0), lowerBand(0),
atr(0), trail(0),
midPrice1(0), midPrice2(0), midPrice(0);
atr = AvgTrueRange(Period) * ATRMultiplication;
midPrice1=Lowest(low,MidPriceVar);
midPrice2= Highest(high,MidPriceVar);
midPrice= (midPrice1 + midPrice2)/2;
lowerBand= midPrice + atr;
upperBand= midPrice - atr;
trail = IFF(Close > trail[1] and Close[1] > trail[1], MaxList(trail[1], upperBand),
IFF(Close < trail[1] and Close[1] < trail[1], MinList(trail[1], lowerBand),
IFF(Close > trail[1], upperBand, lowerBand)));
Plot1(trail);
if (Close > trail) then
SetPlotColor(1, green)
else
SetPlotColor(1, red);
------------------------------------------------------------------------