Larry Williams "Pro-Go" Indicator for ThinkorSwim

BenTen

BenTen

Administrative
Staff
VIP
This script is based on the Pro-Go indicator that Larry Williams came up with.

The formula is fairly simple.

Close - Open = Professionals
Previous' Close - Open = Novices

He then averages out with a simple moving average (length of 14).



Code:
# Larry Williams Pro-Go
# Assembled by BenTen at UseThinkScript.com
# Converted from https://www.tradingview.com/script/R9iKLUAp-Public-Pro-Action/

declare lower;

input averageLength = 14;
input paintbar = no;

def public = close[1] - open;
def pro =  close - open;

def avg_public = simpleMovingAvg(public, averageLength);
def avg_pro = simpleMovingAvg(pro, averageLength);
def res = avg_pro - avg_public;
def priceSMA = simpleMovingAvg(close, averageLength);

plot pu = avg_public;
plot pr = avg_pro;

pu.AssignValueColor(color.red);
pr.AssignValueColor(color.green);

def condition1 = pu > pr;

assignPriceColor(if paintbar and condition1 then color.red else if paintbar and !condition1 then color.green else color.current);

Credit: bharatTrader
 
B

barbaros

Active member
@BenTen thanks for sharing. Res and priceSMA don’t seem to be used. We’re they intended to be used?
 
BenTen

BenTen

Administrative
Staff
VIP
@barbaros Good point. I'm not sure either. I just converted it from the original code on TradingView.
 
B

barbaros

Active member
@barbaros Good point. I'm not sure either. I just converted it from the original code on TradingView.
Here is my attempt...

Python:
# Larry Williams Pro-Go
# Assembled by BenTen at UseThinkScript.com
# Updated by Barbaros 20201105
# Converted from https://www.tradingview.com/script/R9iKLUAp-Public-Pro-Action/

declare lower;

input averageLength = 14;
input advancedMode = yes;
input paintBars = yes;

def public = close[1] - open;
def pro =  close - open;

def avg_public = SimpleMovingAvg(public, averageLength);
def avg_pro = SimpleMovingAvg(pro, averageLength);
def res = avg_pro - avg_public;
def priceSMA = SimpleMovingAvg(close, averageLength);

plot public_val = if advancedMode then avg_public else Double.NaN;
public_val.setDefaultColor(color.red);

plot pro_val = if advancedMode then avg_pro else Double.NaN;
pro_val.setDefaultColor(color.green);

plot advanced_val = if !advancedMode then res else Double.NaN;
advanced_val.setPaintingStrategy(PaintingStrategy.HISTOGRAM);
advanced_val.assignValueColor(
    if close > priceSMA and res > 0 then color.green
    else if close < priceSMA and res < 0 then color.red
    else color.gray
);

AssignPriceColor(
    if paintBars and close > priceSMA and res > 0 then color.green
    else if paintBars and close < priceSMA and res < 0 then color.red
    else if paintBars then color.gray
    else color.CURRENT
);

Advanced:



Not so advanced:


 
M

mcdon030

Member
I love L Williams stuff. I have on my to do list to recreate the COT report for TOS since he constantly references it in his books
 

Similar threads

Top