• LIMITED TIME ONLY: Take $40 off VIP with code: BTD40.

Williams ProGo For ThinkorSwim

anty

New member
VIP
Larry Williams has a professional vs public buying called ProGo. Would anyone be able to convert the TradeStation code below:
 
Last edited by a moderator:

horserider

Well-known member
VIP
@anty Here you go.

Code:
#Larry Williams Pro Go
#coded by DVRL, Optntdr13, daryanlenzatgmaildotcom from tradestation code
#Copyright Optntdr13, all rights reserved.
#V1:  02/19/2011
#
#
#


declare lower;
#hint Length: Number of periods to average the data.
Input Length = 14;
input movingAverageType = {default "Simple MA", "Exponential MA", "Wilders Smoothing", "Weighted MA", "Hull MA", "Adaptive MA", "Triangular MA", "Variable MA", "Dema MA", "Tema MA"};
input displace = 0;



def Pros = Close - Open;
def Public = Close[1] - Open;



plot X;                 
plot Y;
switch (movingAverageType)  {
case "Simple MA":
 X = Average(Pros[-displace],Length);
 Y = Average(Public[-displace],Length);
case "Exponential MA":
  X = ExpAverage(Pros[-displace], Length);
  Y = ExpAverage(Public[-displace],Length);
case "Wilders Smoothing":
  X = wildersSmoothing(Pros[-displace], Length);
  Y = WildersAverage(Public[-displace],Length);
case "Weighted MA":
 X = wma(Pros[-displace], Length);
 Y = wma(Public[-displace],Length);
case "Hull MA":
 X = hullMovingAvg(Pros[-displace], Length);
 Y = hullMovingAvg(Public[-displace],Length);
case "Adaptive MA":
 X = MovAvgAdaptive(Pros[-displace], Length);
 Y = MovAvgAdaptive(Public[-displace],Length);
case "Triangular MA":
 X = MovAvgTriangular(Pros[-displace], Length);
 Y = MovAvgTriangular(Public[-displace],Length);
case "Variable MA":
 X = VariableMA(Pros[-displace], Length);
 Y = VariableMA(Public[-displace],Length);
case "Dema MA":
 X = DEMA(Pros[-displace], Length);
 Y = DEMA(Public[-displace],Length);
case "Tema MA":
 X = Tema(Pros[-displace], Length);
 Y = Tema(Public[-displace],Length);
}

x.SetDefaultColor(CreateColor(188, 0, 240));
y.SetDefaultColor(CreateColor(29,239,255));
def ProsBuying = if x > y then x else y;
def ProsSelling = x < y;

addcloud(x, y, (color.GREEN), (color.RED));

plot zerobase = 0;
 

Similar threads

Top