LWPI Auction Control Index For ThinkOrSwim

BillW

Member
VIP
mod note:
This is not a buy/sell indicator.
This study provides something more simple and more important

Who controls the auction?​

Not based on one candle but the last several candles. Normalized by volatility
Most traders focus on patterns, indicators, oscillators, and crossovers while ignoring the actual battle between buyers and sellers. The LWPI forces you to think about that battle.

This can highlight situations where:
» Your indicators are bullish, but buyers are not controlling the auction very well.​
» The market may continue higher, but buying pressure is deteriorating.​
» Your indicators are bearish, but sellers are beginning to lose control.​
» Price is still moving in one direction while participation is quietly shifting in the other.​





It plots in reverse: downward values appear upward, and upward values appear downward.
In my view, it isn’t particularly useful as a stand‑alone indicator.
That said this is used as part of my algo.
S5f7T0m.png


ATR Normalization Is the Secret Sauce​

By normalizing the calculation with ATR, the LWPI measures buying and selling pressure relative to the market's current volatility.

A Behavioral Measurement, Not a Pattern Measurement​

Most indicators measure where price is.
The LWPI attempts to measure how traders are behaving.
It is not looking for chart patterns or signal combinations.
It is evaluating whether buyers or sellers have been consistently winning the auction over the recent bars.

Why It Helps New Traders​

One of the biggest mistakes traders can make is chasing price.
A strong move higher creates the fear of missing out. A sharp decline creates panic.

The LWPI helps counter that behavior by showing when buying or selling pressure may already be mature.
» It does not tell you to buy.​
» It does not tell you to sell.​
» It simply provides context about who has been controlling the auction and whether that control appears to be strengthening or weakening.​


Code:
# Larry Commercial Proxy Index (LWPI)
# Thinkorswim Conversion
# Original © Gehtsoft USA LLC / Mario Jemic

declare lower;

input Length = 8;

#-----------------------------------------
# Raw = Open - Close
#-----------------------------------------
def Raw = open - close;

#-----------------------------------------
# SMA of Raw
#-----------------------------------------
def MA = Average(Raw, Length);

#-----------------------------------------
# ATR (TOS native)
#-----------------------------------------
def ATR = ATR(Length);

#-----------------------------------------
# LWPI Calculation
# LWPI = 50 * MA / ATR + 50
#-----------------------------------------
def LWPI =
    if ATR != 0 then
        50 * (MA / ATR) + 50
    else 0;

#-----------------------------------------
# Plot
#-----------------------------------------
plot pLWPI = LWPI;
pLWPI.SetDefaultColor(Color.YELLOW);
pLWPI.SetLineWeight(2);

# Level at 50
plot Level50 = 50;
Level50.SetDefaultColor(Color.RED);
Level50.SetStyle(Curve.POINTS);
Level50.SetLineWeight(2);
 
Last edited by a moderator:
@BillW :

I like the concept, so I thought I'd offer a little "window dressing"...

202607151620_Auction_Control_Index_.png


Code:
# filename: LWPI_Auction_Control_Index
# source: https://usethinkscript.com/threads/lwpi-auction-control-index-for-thinkorswim.22564/post-163575

# Larry Commercial Proxy Index (LWPI)
# Thinkorswim Conversion
# Original © Gehtsoft USA LLC / Mario Jemic

declare lower;

input Length = 8;

#-----------------------------------------
# Raw = Open - Close
#-----------------------------------------
def Raw = open - close;

#-----------------------------------------
# SMA of Raw
#-----------------------------------------
def MA = Average(Raw, Length);

#-----------------------------------------
# ATR (TOS native)
#-----------------------------------------
def ATR = ATR(Length);

#-----------------------------------------
# LWPI Calculation
# LWPI = 50 * MA / ATR + 50
#-----------------------------------------
def LWPI =
    if ATR != 0 then
        50 * (MA / ATR) + 50
    else 0;

#-----------------------------------------
# Plot
#-----------------------------------------
plot pLWPI = LWPI;
pLWPI.SetDefaultColor(Color.YELLOW);
pLWPI.SetLineWeight(2);

def ma_length = 5;
plot AvgLWPI = ExpAverage(pLWPI, ma_length);
AvgLWPI.SetDefaultColor(CreateColor(0,102,204));
AvgLWPI.SetLineWeight(2);
AvgLWPI.hide();

pLWPI.AssignValueColor(if pLWPI > AvgLWPI then Color.RED else if pLWPI < AvgLWPI then Color.GREEN else Color.YELLOW);

# Level at 50
plot Level50 = 50;
Level50.SetDefaultColor(Color.GRAY);
Level50.SetStyle(Curve.SHORT_DASH);
Level50.SetLineWeight(2);

AssignPriceColor(if pLWPI > AvgLWPI then Color.RED else if pLWPI < AvgLWPI then Color.GREEN else Color.YELLOW);

Thanks for sharing...

Good Luck and Good Trading,

A Fellow "Cobbler"
 

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

Thread starter Similar threads Forum Replies Date
C Repaints Failed Auction Indicator for ThinkorSwim Custom 2
samer800 MWho is in Control For ThinkOrSwim Custom 12

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
2072 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.
Back
Top