AGAIG Chart Labels for SPX, NDX, RUT For ThinkOrSwim

csricksdds

Trader Educator
VIP
AGAIG Chart Labels for SPX, NDX, RUT

Creating labels that work on SPX, NDX and RUT are difficult to produce. Here are some labels that work which you might like to add to your cash settled option charts. These also work on regular charts in general.

YfGS06G.png


WHAT EACH LABEL TELLS YOU

Trend
— Shows the overall trend with Bullish Green, Bearish Red, and Chop Yellow. This is your primary trend direction indicator.

Sum — The summation index. Scores all six key indicators (+1 bull, -1 bear, 0 neutral) and adds them for a single -6 to +6 read. +3 or better is Bull (green), -3 or worse is Bear (red), in between is Neutral (yellow). This is your at-a-glance confluence indicator.

Flow — A price-action money flow proxy. Measures where price closes within each bar's high/low range and sums it over 14 bars. Above 30 suggests buying pressure (green), below -30 suggests selling pressure (red).

Bias — A 14-bar candle sentiment score. Counts bullish vs bearish closes over the last 14 bars and normalizes to a -100/+100 scale. Above 30 is long bias (green), below -30 is short bias (red).

CMO — Chande Momentum Oscillator, manually calculated to avoid TOS subgraph conflicts. Ranges -100 to +100. Above 50 is overbought (red), below -50 is oversold (green), middle is neutral yellow.

RSI — Classic 14-period momentum. Above 50 is bullish territory, below 50 bearish. Feeds into the summation score.

Intra Day — Shows the average trading range of the last 10 bars (intraday movement).

AGAIG Cash Settled Options Label Indicator Link: http://tos.mx/!ZrctUPto
Code:
#Charlt LabelLocation Indicators for SPX, NDX, RUT (Cash Settled Options)

declare upper;

# --- INPUTS ---
input MA_Fast = 8;
input MA_Mid  = 21;
input MA_Slow = 50;
input LabelSize = fontsize.small;
input LabelLocation = location.bottom_left;


# --- DEFS ---
def rsiVal    = RSI(length = 14);
def vixVal    = if IsNaN(close("$VIX")) then 0 else close("$VIX");
def pchg      = Round((close - close[1]) / close[1] * 100, 2);
def efA       = ExpAverage(close, MA_Fast);
def emA       = ExpAverage(close, MA_Mid);
def esA       = ExpAverage(close, MA_Slow);
def maBull    = efA > emA and emA > esA;
def maBear    = efA < emA and emA < esA;
def trueRange = TrueRange(high, close, low);
def IntraDayatr14     = Average(trueRange, 14);
def change    = close - close[1];
def up14      = Average(if change > 0 then change else 0, 14);
def dn14      = Average(if change < 0 then AbsValue(change) else 0, 14);
def cmoVal    = if (up14 + dn14) > 0 then 100 * (up14 - dn14) / (up14 + dn14) else 0;
def bullBars  = Sum(if close > close[1] then 1 else 0, 14);
def bearBars  = Sum(if close < close[1] then 1 else 0, 14);
def sentiment = if (bullBars + bearBars) > 0 then 100 * (bullBars - bearBars) / (bullBars + bearBars) else 0;
def barFlow   = (close - low) - (high - close);
def flowSum   = Sum(barFlow, 14);
def flowRange = Sum(high - low, 14);
def mflow     = if flowRange > 0 then 100 * flowSum / flowRange else 0;
def s1        = if rsiVal > 50 then 1 else -1;
def s2        = if cmoVal > 0 then 1 else -1;
def s3        = if mflow > 0 then 1 else -1;
def s4        = if sentiment > 0 then 1 else -1;
def s5        = if maBull then 1 else if maBear then -1 else 0;
def s6        = if vixVal < 15 then 1 else if vixVal > 20 then -1 else 0;
def sumIdx    = s1 + s2 + s3 + s4 + s5 + s6;

# --- LABELS ---
AddLabel(yes, "Trend: " +
    (if maBull then "Bull" else if maBear then "Bear" else "Neutral"),
    if maBull then Color.GREEN
    else if maBear then Color.RED
    else Color.Yellow, LabelLocation, LabelSize);
 
AddLabel(yes, "Sum: " + (if sumIdx >= 0 then "+" else "") + sumIdx +
    if sumIdx >= 3 then " [Bull]"
    else if sumIdx <= -3 then " [Bear]"
    else " [Neutral]",
    if sumIdx >= 3 then Color.GREEN
    else if sumIdx <= -3 then Color.RED
    else Color.Yellow, LabelLocation, LabelSize);

AddLabel(yes, "Flow: " + Round(mflow, 1),
    if mflow >= 30 then Color.GREEN
    else if mflow <= -30 then Color.RED
    else Color.Yellow, LabelLocation, LabelSize);
AddLabel(yes, "Bias: " + Round(sentiment, 1),
    if sentiment >= 30 then Color.GREEN
    else if sentiment <= -30 then Color.RED
    else Color.Yellow, LabelLocation, LabelSize);
AddLabel(yes, "CMO: " + Round(cmoVal, 1),
    if cmoVal >= 50 then Color.RED
    else if cmoVal <= -50 then Color.GREEN
    else Color.Yellow, LabelLocation, LabelSize);
AddLabel(yes, "RSI: " + Round(rsiVal, 1), Color.YELLOW, LabelLocation, LabelSize);
AddLabel(yes, "IntraDay(10) ATR: " + Round(IntraDayatr14, 1), Color.CYAN, LabelLocation, LabelSize);
 
Last edited by a moderator:

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
1190 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