NexusFi: Find Your Edge


Home Menu

 





WillTrend Indicator


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Afriend247 with 5 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 Lampert with 1 posts (0 thanks)
    4. looks_4 bobwest with 1 posts (0 thanks)
    1. trending_up 11,774 views
    2. thumb_up 1 thanks given
    3. group 5 followers
    1. forum 11 posts
    2. attach_file 3 attachments




 
Search this Thread
  #11 (permalink)
Afriend247
Los Angeles, California
 
Posts: 9 since Sep 2022
Thanks Given: 3
Thanks Received: 2

Agreed 100%. On trading view, if you change the values of the SuperTrend to the William's values (66,2.236) You get the same plot.
Shaban View Post
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);

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


Reply With Quote
  #12 (permalink)
Afriend247
Los Angeles, California
 
Posts: 9 since Sep 2022
Thanks Given: 3
Thanks Received: 2

Correction on this it should be HL2 not "(high-low)/2". Therefore:
upperBand = ((high+low)/2 + 2.236) * atr(66)
lowerBand = ((high+low)/2 - 2.236) * atr(66)


Afriend247 View Post
I know this is an old Post, but I have not been able to find an answer here or anywhere. And this post comes up first on my web search. I have the answer. Here it is:
upperBand = ((high-low)/2 + 2.236) * atr(66)
lowerBand = ((high-low)/2 - 2.236) * atr(66)

If your programming language does its math from left you right, you WON'T need the parenthesis.


Reply With Quote




Last Updated on October 17, 2022


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts