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.
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.
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: