BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > BullScript
  New Posts New Posts RSS Feed: Welles Wilder Volatility Stop
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Welles Wilder Volatility Stop

 Post Reply Post Reply
Author
Message / View First Unread Post
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Topic: Welles Wilder Volatility Stop
    Posted: 22 Feb 2018 at 4:54pm

{ Wilder Volatility Stop Trail }
[Target=price]
Mult:=Input("ATR Multiplier",3,1);
Nb:=if(Mult<3,7,Int(Mult*2+1));
Long :=Ref(HHV(C,Nb),-1) - (Ref(ATR(Nb),-1)*Mult);
Short:=Ref(LLV(C,Nb),-1) + (Ref(ATR(Nb),-1)*Mult);
trail:=
If(C>PREV and Ref(C,-1)>PREV, Max(PREV,Long),
If(C<PREV and Ref(C,-1)<PREV, Min(PREV,Short),
If(C>PREV, Long, Short)));
Trail;
[linestyle=pricecolor]
[color=rgb(0,174,0)] if(C>=Trail,1,0);
[color=rgb(255,85,85)] if(C<Trail,1,0);

Back to Top
meldeans View Drop Down
Newbie
Newbie


Joined: 13 Feb 2009
Posts: 8
Post Options Post Options   Quote meldeans Quote  Post ReplyReply Direct Link To This Post Posted: 26 Nov 2020 at 3:24pm
Hi Maximo,  I know this post is old now but i am new to it.  I understand this stop is 3 x ATR but i don't know what ATR period length is.  Is it 7 periods or some other number???  I don't understand the code.

Thanks
Dean
 
Back to Top
maximo View Drop Down
BullCharts Guru
BullCharts Guru
Avatar

Joined: 02 Sep 2006
Location: Australia
Posts: 232
Post Options Post Options   Quote maximo Quote  Post ReplyReply Direct Link To This Post Posted: 04 Dec 2020 at 2:10am
If the stop setting is < 'less than' 3, the minimum lookback bars used in calculation is 7 bars.   This is also the smallest number of bars for 3x ATR.   Higher ATR values will calculate with more bars than 7.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz