I forgot the code "Willtrend"...

Pimpsta

Junior member
Messages
11
Likes
0
Hello.
I wrote code of "Willtrend" in the textbook, but I deleated it by mistake:cry:
I remember somehow that it was resembled Volatility Stop.

Do you know the code?
If you know, please tell me the code:help:

Thank you.
 
What the athor said on this:

we take the average of the last 66 bars multiply that by 3.2 and add/subtract from the highest/lowest mid point seen so far in the move.

Can you restore the formula by this description?
 
Hello.
I wrote code of "Willtrend" in the textbook, but I deleated it by mistake:cry:
I remember somehow that it was resembled Volatility Stop.

Do you know the code?
If you know, please tell me the code:help:

Thank you.

Did you ever find the code for WillTrend?
 
The WillTrend indicator is described here, and it resembles a SuperTrend:





-----------------------------------------------------------------------------------------

{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);

----------------------------------------------------------------------------------------------e
 
Top