P3 Squeeze indicator For ThinkOrSwim


I found this in the thinkScript lounge. Anyone knows how this works?

# Combined Signal P3 Squeeze
# Mobius
# Chat Room 09.01.2020

# Mobius
# V01.03.2014

declare lower;

input c = close;
input AvgType = AverageType.Simple;
input nFast = 8;
input nSlow = 13;
input nSmooth = 5;

def h = high;
def l = low;
plot PPO = ((MovingAverage(AverageType = AvgType, c, nFast) -
             MovingAverage(AverageType = AvgType, c, nSlow)) /
             MovingAverage(AverageType = AvgType, c, nSlow));
plot smooth = MovingAverage(AverageType = AvgType, PPO, nSmooth);
     PPO.AssignValueColor(if PPO > smooth
                          then Color.Green
                          else Color.Red);
     smooth.AssignValueColor(if PPO > smooth
                             then Color.Green
                             else Color.Red);
addCloud(PPO, smooth, Color.Green, Color.Red);
# Scale Algorithm
script Scale {
    input c = close;
    input data = close;
    def Min = lowestAll(data);
    def Max = highestAll(data);
    def hh = HighestAll(c);
    def ll = LowestAll(c);
    plot Range = (((Max - Min) * (c - ll)) /  (hh - ll)) + Min;
# Scaled DMI+ DMI-
input length = 14;
input averageType = AverageType.WILDERS;

def hiDiff = h - h[1];
def loDiff = l[1] - l;
def plusDM = if hiDiff > loDiff and hiDiff > 0 then hiDiff else 0;
def minusDM =  if loDiff > hiDiff and loDiff > 0 then loDiff else 0;
def ATR = MovingAverage(averageType, TrueRange(h, c, l), length);
def Di_plus =  MovingAverage(averageType, plusDM, length) / ATR;
def Di_minus =  MovingAverage(averageType, minusDM, length) / ATR;
plot DIplus = Scale(c = Di_plus, data = PPO);
plot DIminus = Scale(c = Di_minus, data = PPO);
addCloud(DIplus, DIminus, Color.Cyan, Color.Yellow);
# End Code # Combined Signal P3 Squeeze

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

11:05 FrankB3: Stock:::: althought I never test any thing, just watch alot. To me looks like it predicts turnning points 85% - 90% of the time. What I think is important is the concept. So over the years I have used, and still a work in progress, have developled many different P3 squeezes, only with the help of the good folks in here. There is about 50 some seminars on u-tube about P3 Squeeze,,,
I have been trading the p3 squeeze and I was looking around in here if anyone else uses it or has any good recommendations on Indicators that go along with it or custom scripts appreciate everything

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
267 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.