Adding clouds to OB and OS on Williams%R

P

poparhon

New member
Looking for some assistance in adding the overbought and oversold clouds to the W%R. On the overbought from the 0 to -20 and oversold from -80 to -100. On the same idea as the RSI Lagueere or TMO Thanks



Code:
# TD Ameritrade IP Company, Inc. (c) 2007-2019
#

declare lower;

input length = 10;
input overBought = -20;
input overSold = -80;

def hh = Highest(high, length);
def ll = Lowest(low, length);
def result = if hh == ll then -100 else (hh - close) / (hh - ll) * (-100);

plot WR = if result > 0 then 0 else result;
WR.SetDefaultColor(GetColor(1));

plot Over_Sold = overSold;
Over_Sold.SetDefaultColor(GetColor(8));

plot Over_Bought = overBought;
Over_Bought.SetDefaultColor(GetColor(8));

plot negative_fifty = -50;
plot negative_onehundred = -100;
plot zerobase = 0;
 
BenTen

BenTen

Administrative
Staff
VIP
Add the following snippet to the end of your script:

Code:
AddCloud(zerobase, Over_bought);
AddCloud(over_sold, negative_onehundred);

Use it as a baseline for your whichever indicator you hope to do the same for.
 
P

poparhon

New member
Thank You @BenTen for the help and quick response
 

Similar threads

Top