Price Channel Breakout Strategy — Long & ShortThis strategy is a dual-direction Price Channel breakout system designed for high-volatility indices such as US30, NAS100, and XAUUSD.
It enters long when price breaks above the highest high of the past N bars, and enters short when price breaks below the lowest low.
A key feature is the use of fixed dollar-based take-profit and stop-loss, making the strategy adaptive across symbols with different tick values.
Core Logic
Long entry when price breaks the N-bar high
Short entry when price breaks the N-bar low
Dollar-based TP and SL (converted to ticks automatically)
Suitable for trending and breakout-friendly markets
Backtest Notes (US30 Example)
Sharpe Ratio: 2.7
Profit Factor: 2.111
Total Return (12-month backtest): +46.89%
Max Drawdown: 0.26%
Trades: 3,666
This strategy performs well in sustained volatility environments and is particularly effective for intraday momentum bursts on US30.
インジケーターとストラテジー
MACDiver — рабочая версия (fixed loops)MACDiver Indicator
A Pine Script indicator that identifies bullish and bearish divergences between price action and the MACD oscillator. It uses pivot highs/lows in both price and MACD series to detect potential reversal signals. When price makes higher highs (or lower lows) while MACD makes lower highs (or higher lows), the indicator marks these divergences with lines and labels on the chart, providing potential trading signals.
Manual Max Pain LevelsThis indicator lets you manually input Max Pain levels from Coinglass and plot them directly on your chart. Purple color chosen as a tribute to MartyParty.
Features
• Manual input for Long/Short Max Pain
• Clean horizontal levels with labels
• Fast, lightweight, chart-only tool
Copy the Max Pain prices from Coinglass and paste them into the inputs.
WSMR v3.9 — WhaleSplash → Mean Reversal
# WSMR v3.9 — WhaleSplash → Mean Reversal
*A Non-Repainting Impulse‑Reversal Engine for Systematic Futures Trading*
## Overview
WSMR v3.9 is a complete impulse → exhaustion → mean‑reversion framework designed for systematic intraday trading. It identifies high‑energy displacement events (“WhaleSplashes”), measures volatility structure, tracks VWAP deviation, and confirms reversals using RSI divergence, Z‑Score resets, SMA20 reclaim, and pivot-based structure.
All signals are non‑repainting and alerts fire on bar close.
---
## Core Components
### 1. WhaleSplash (Short Impulse Event)
Triggered when a candle meets displacement conditions:
- Large bar range vs ATR
- Minimum % move
- Volume expansion
- VWAP deviation (tick-based)
- Z‑Score oversold / RSI exhaustion
- Volatility-gated
### 2. Mean Reversal Long (MR)
Requires:
- RSI bullish divergence
- Z‑Score reset
- SMA20 reclaim
- Higher-low confirmation
### 3. First-Candle Confirmation (Optional)
- MR Confirm → first green after MR
- WS Confirm → first red after WS
- TTL window configurable
### 4. Asia Session Filter
Optional restriction to:
**23:00 → 09:00 UTC**
### 5. Volatility Monitor
Detects:
- Normal
- Wicky
- Spiky
- Extreme
### 6. WS Frequency Analytics
Rolling frequency calculation across:
- Bars / Days / Weeks / Months
---
## Status Panel (Top-Right)
Shows:
- Mode (Global / Asia-only)
- Timeframe + TTL
- WS frequency
- Volatility state
---
## Alerts
- WhaleSplash SHORT
- WhaleSplash LONG (MR)
- MR Confirm LONG
- WS Confirm SHORT
- Volatility Warning
---
## Notes
- Fully non‑repainting
- Stable bar-close logic
- Optimised for 1m–5m
- Works on futures, indices, metals, FX
Quarter + 50 BandsThe indicator does two main things:
Draws a red quarter-point grid (every 25 points by default).
Draws green and blue “bands” that sit 50 points below and above each big 100-point figure.
Think of it like:
Red = your normal 25-point quarters
Green = “sweet spot” 50 points below each 100-pt handle
Blue = “sweet spot” 50 points above each 100-pt handle
It fully customizable.
Minor Break of Structure (Minor BoS)This indicator extracts and isolates the Minor Break of Structure (BoS) logic from a full SMC framework and presents it as a clean, lightweight tool for structure-based price action traders.
Unlike traditional BOS indicators that rely on swing calculations with heavy filtering, this script uses original SMC-style minor structure logic to detect meaningful shifts in internal order flow.
A Minor BoS appears when price breaks above a minor swing high (bullish) or below a minor swing low (bearish), confirming a short-term continuation in trend direction.
Features:
Bullish Minor BoS detection
Bearish Minor BoS detection
Automatic line plotting with extend-right
Clear “Minor BoS” label with tiny footprint
Customizable line styles and colors
Lightweight & optimized for fast execution
Zero repainting on BoS confirmations
This tool is ideal for traders who want a simple, clean, and reliable structure-based signal without the noise of major structure, order blocks, liquidity sweeps, or external SMC modules.
Research-Backed Intraday MTF MAsResearch-Backed Intraday Multi-Timeframe Moving Averages
A precision-tuned intraday trading indicator that displays four key moving averages across two critical timeframes:
📊 What It Shows:
- 1-Hour MAs: 75-period SMA & EMA (institutional flow patterns)
- 10-Minute MAs: 200-period SMA & EMA (intraday trend structure)
🎯 Designed For:
- Day traders seeking multi-timeframe confluence
- Identifying strong trending vs. choppy market conditions
- Support/resistance level identification
- Momentum and trend alignment signals
✨ Key Features:
- Optimized periods based on market structure analysis
- Fully customizable colors, transparency, and line widths
- Toggle each MA on/off independently
- Clean, non-cluttered chart display
- Efficient tuple-based data requests
💡 Trading Signals:
- Price above all 4 MAs = Strong bullish alignment
- Price below all 4 MAs = Strong bearish alignment
- Mixed signals = Range-bound conditions, reduce risk
Perfect for scalpers, day traders, and swing traders who want institutional-grade moving averages without the noise.
50 EMA Rejection Strategy V4 (Correct Signal Logic)//@version=6
indicator("50 EMA Rejection Strategy V4 (Correct Signal Logic)", overlay=true, max_labels_count=500)
//================ INPUTS ================//
group50 = "EMA 50 Trio"
ema50HighLen = input.int(50,"EMA50 High",group=group50)
ema50CloseLen = input.int(50,"EMA50 Close",group=group50)
ema50LowLen = input.int(50,"EMA50 Low",group=group50)
groupBase = "Additional EMAs"
ema10Len = input.int(10,"EMA10")
ema200Len = input.int(200,"EMA200")
ema600Len = input.int(600,"EMA600")
ema2400Len = input.int(2400,"EMA2400")
useTrendFilter = input.bool(false,"Use Higher Time EMA Filter")
groupRR = "Risk Reward Settings"
RR1 = input.float(1.0,"TP1 RR",step=0.5)
RR2 = input.float(2.0,"TP2 RR",step=0.5)
//================ CALCULATIONS ================//
teril Harami Reversal Alerts BB Touch (Wick Filter Added) teril Harami Reversal Alerts BB Touch (Wick Filter Added)
teril Harami Reversal Alerts BB Touch (Wick Filter Added) teril Harami Reversal Alerts BB Touch (Wick Filter Added) teril Harami Reversal Alerts BB Touch (Wick Filter Added)
teril Harami Reversal Alerts BB Touch (Wick Filter Added)
Composite Market Momentum Indicator//@version=5
indicator("Composite Market Momentum Indicator", shorttitle="CMMI", overlay=false)
// Define Inputs
lenRSI = input.int(14, title="RSI Length")
lenMom = input.int(9, title="Momentum Length")
lenShortRSI = input.int(3, title="Short RSI Length")
lenShortRSISma = input.int(3, title="Short RSI SMA Length")
lenSMA1 = input.int(9, title="Composite SMA 1 Length")
lenSMA2 = input.int(34, title="Composite SMA 2 Length")
// Step 1: Create a 9-period momentum indicator of the 14-period RSI
rsiValue = ta.rsi(close, lenRSI)
momRSI = ta.mom(rsiValue, lenMom)
// Step 2: Create a 3-period RSI and a 3-period SMA of that RSI
shortRSI = ta.rsi(close, lenShortRSI)
shortRSISmoothed = ta.sma(shortRSI, lenShortRSISma)
// Step 3: Add Step 1 and Step 2 together to create the Composite Index
compositeIndex = momRSI + shortRSISmoothed
// Step 4: Create two simple moving averages of the Composite Index
sma1 = ta.sma(compositeIndex, lenSMA1)
sma2 = ta.sma(compositeIndex, lenSMA2)
// Step 5: Plot the composite index and its two simple moving averages
plot(compositeIndex, title="Composite Index", color=color.new(#f7cf05, 0), linewidth=2)
plot(sma1, title="SMA 13", color=color.new(#f32121, 0), linewidth=1, style=plot.style_line)
plot(sma2, title="SMA 33", color=color.new(#105eef, 0), linewidth=1, style=plot.style_line)
// Add horizontal lines for reference
hline(0, "Zero Line", color.new(color.gray, 50))
Position Size Tool [Riley]Automatically determine number of shares for an entry. Quantity based on a stop set at the low of day for long positions or a stop set at the high of the day for short positions. As well as inputs like account balance risk per trade. Also includes a user-defined maximum for percentage of daily dollar volume to consume with entry.
RSI Cross Below 30 – Red Background StripShows red bars on chart in instances where RSI drops below 30
Multi Timeframe Traffic LightsMonthly, Weekly, Daily, Hourly previous candle range vs current price. Inside = orange, above = green, below = red
Yesterday Low LineTraces a red dotted line on the low of yesterdays session for the present graph - and extends into the future
Displacement Pulse Markers - sudoThis indicator is designed to highlight sudden and meaningful bursts of price movement. These bursts are called displacement pulses. A pulse appears when price expands with force, closes near the extreme of its own bar, and breaks through a recent structural level. The indicator places small circles above or below the candle to signal these moments so that traders can quickly spot abnormal movement and potential shifts in market intent.
How it works
The indicator evaluates each bar for three conditions:
Range expansion relative to volatility
The bar must be larger than normal. It compares the bar range to ATR and requires that range to exceed a multiple of ATR. When this condition is met, the bar is considered a large or forceful bar.
Close location within the bar
The bar has to close near its own high or low. A close near the top suggests strong buying force. A close near the bottom suggests strong selling force. The user can adjust what percentage qualifies as near the top or bottom.
Break of recent structure
The bar must break a recent pivot level. For bullish pulses, the high of the bar must exceed the highest high of the past N bars. For bearish pulses, the low must break the lowest low of the past N bars. This confirms that the move did not merely expand but actually displaced prior structure.
When all conditions align
A bullish displacement pulse is marked with a small aqua circle below the bar.
A bearish displacement pulse is marked with a fuchsia circle above the bar.
The result is a clean on chart visualization of where price produced meaningful displacement.
How traders can use this
Spot abnormal momentum
Pulses can highlight areas where price behaves with more force than usual. These events often appear around news, liquidity sweeps, or algorithmic shifts.
Identify possible regime changes
A pulse that breaks structure while closing near the extreme may signal a transition from a ranging environment to a trending one. It does not predict direction but flags where displacement actually occurred.
Support narrative building
When combined with levels, zones, or other frameworks, pulses can confirm whether the market had enough strength to break through an area with conviction.
Filter trades or refine entries
Some traders may choose to trade in the direction of recent pulses during trending conditions. Others may only enter a trade after a pulse confirms that the market has shifted away from compression.
Track where the market is imbalanced
A pulse visually marks whether buyers or sellers were able to generate strong initiative movement. These points often become useful reference zones for continuation or rejection analysis.
Why this indicator is useful
It reduces complex logic into simple visual markers. Instead of scanning bar by bar for structural breaks, volatility expansions, and close strength, the indicator does this automatically and highlights only the bars that meet all criteria. This keeps the chart clean while still providing precision about where displacement actually occurred.
VWAP with StdDev + 0,25 channelsThis indicator displays the Volume Weighted Average Price (VWAP) together with standard deviation bands and additional ±0.25 offset bands. VWAP serves as the central reference line, while the deviation bands show how far price typically moves away from VWAP.
1 standard deviation (±1σ) covers roughly 68% of all price movements around VWAP.
2 standard deviations (±2σ) cover about 95% of price movements.
3 standard deviations (±3σ) cover approximately 99.7% of price movements.
Around VWAP and the first deviation level, extra ±0.25 offset bands are added to highlight tighter ranges. These shaded zones help traders identify areas of expected price concentration, potential support and resistance, and volatility boundaries.
Purpose: The tool provides a statistical framework for intraday trading. VWAP shows the average traded price weighted by volume, while the deviation bands indicate probability zones where price is most likely to remain.
Algoticks.in: MA Crossover Strategy (Sample)MA Crossover Strategy - User Guide
Overview
This is a Moving Average Crossover strategy that generates trading signals when a fast MA crosses a slow MA. It integrates with Algoticks.in API for automated trading on Delta Exchange.
Strategy Logic
Long Signal: When Fast MA crosses above Slow MA
Short Signal: When Fast MA crosses below Slow MA
Automatically closes opposite positions before entering new ones
Quick Setup
1. Add to TradingView
Open TradingView and go to the chart
Click "Pine Editor" at the bottom
Paste the script code
Click "Add to Chart"
2. Configure Strategy Parameters
Strategy Settings
Fast MA Length (default: 9): Shorter moving average period
Slow MA Length (default: 21): Longer moving average period
MA Type : Choose SMA (Simple) or EMA (Exponential)
General API Settings
Paper Trading : Enable for testing without real money
Signal Type : Choose "Trading Signal" (default) for tracking
Exchange : DELTA (Delta Exchange)
Segment :
futures - Perpetual contracts
options - Call/Put options
spot - Spot trading
Order Settings: Basic
Quantity : Number of contracts (e.g., 1, 0.5, 2)
Validity :
GTC - Good Till Cancelled
IOC - Immediate or Cancel
FOK - Fill or Kill
DAY - Day order
Product : cross_margin or isolated_margin
Order Settings: Entry Type
Choose how orders are executed:
Market Order : Immediate fill at best price
Limit Order : Fill at specified price or better
Stop Market : Triggers at stop price, then market order
Stop Limit : Triggers at stop price, then limit order
Entry Prices (for Limit/Stop orders)
Limit Price:
Price : The value to use
Type : Last Price / Mark Price / Index Price
Mode :
Absolute - Exact price (e.g., 65000)
Relative - Offset from entry price
% Checkbox : If checked, relative uses percentage; if unchecked, uses points
Example:
Absolute: 65000 → Order at exactly 65000
Relative 1% (checked): Entry ± 1% of entry price
Relative 100 (unchecked): Entry ± 100 points
Trigger Price: Same logic as Limit Price, used for Stop orders
Exit / Bracket Prices (SL/TP)
Stop Loss (SL):
Type : Price type to monitor (Mark Price recommended)
Mode : Absolute or Relative
% : Percentage or points
SL : Stop loss value (e.g., 2 for 2%)
Trig : Optional trigger price (creates Stop-Limit SL)
Take Profit (TP): Same structure as SL
Example:
Long entry at 65000, SL = 2% → Exit at 63700 (65000 - 2%)
Short entry at 65000, TP = 3% → Exit at 63050 (65000 - 3%)
3. Options Trading Setup (Only if Segment = Options)
Strike Selection Method
User Defined Mode:
Manually specify exact strike and option type
Best for: Trading specific levels
Required fields:
Strike Price : e.g., "65000"
Option Type : Call or Put
Dynamic Mode:
System calculates strike based on ATM price
Best for: Automated strategies
Required fields:
Algo Type : Options Buying or Selling
Strike Offset : 0 (ATM), +1 (above ATM), -1 (below ATM)
Strike Interval : Gap between strikes (e.g., BTC: 500, ETH: 50)
Expiry Date Formats:
T+0 - Today
T+1 - Tomorrow
current week - This Friday
next week - Next Friday
current month - Last Friday of month
131125 - Specific date (13 Nov 2025)
4. Create Alert for Automation
Right-click on chart → "Add Alert"
Condition : Select your strategy name
Alert Actions : Webhook URL
Webhook URL : Your Algoticks.in API endpoint
Message : Leave as {{strategy.order.alert_message}} (contains JSON)
Click "Create"
The alert will automatically send JSON payloads to your API when signals occur.
Example Configurations
Simple Futures Trading
Strategy: Fast MA = 9, Slow MA = 21, SMA
Segment: futures
Order Type: market_order
Quantity: 1
SL: 2% (Relative)
TP: 4% (Relative)
Options Buying (Dynamic)
Segment: options
Strike Selection: Dynamic
Algo Type: Options Buying Algo
Strike Offset: 0 (ATM)
Strike Interval: 500 (for BTC)
Expiry: current week
Order Type: market_order
Conservative Spot Trading
Segment: spot
Order Type: limit_order
Limit Price: 0.5% (Relative)
Quantity: 0.1
No SL/TP (manual management)
Important Notes
Paper Trading First : Always test with paper trading enabled before live trading
Order Tags : Automatically generated for tracking (max 18 chars)
Position Management : Strategy closes opposite positions automatically
Signal Confirmation : Uses barstate.isconfirmed to prevent repainting
JSON Payload : All settings are converted to JSON and sent via webhook
Troubleshooting
No signals : Check if MAs are crossing on your timeframe
Orders not executing : Verify webhook URL and API credentials
Wrong strikes : Double-check Strike Interval for your asset
SL/TP not working : Ensure values are non-zero and mode is correct
Support
For API setup and connector configuration, see CONNECTOR_SETUP_GUIDE.md or visit Algoticks.in documentation.
Per Bak Self-Organized CriticalityTL;DR: This indicator measures market fragility. It measures the system's vulnerability to cascade failures and phase transitions. I've added four independent stress vectors: tail risk, volatility regime, credit stress, and positioning extremes. This allows us to quantify how susceptible markets are to disproportionate moves from small shocks, similar to how a steep sandpile is primed for avalanches.
Avalanches, forest fires, earthquakes, pandemic outbreaks, and market crashes. What do they all have in common? They are not random.
These events follow power laws - stable systems that naturally evolve toward critical states where small triggers can unleash catastrophic cascades.
For example, if you are building a sandpile, there will be a point with a little bit additional sand will cause a landslide.
Markets build fragility grain by grain, like a sandpile approaching avalanche.
The Per Bak Self-Organized Criticality (SOC) indicator detects when the markets are a few grains away from collapse.
This indicator is highly inspired by the work of Per Bak related to the science of self-organized criticality .
As Bak said:
"The earthquake does not 'know how large it will become'. Thus, any precursor state of a large event is essentially identical to a precursor state of a small event."
For markets, this means:
We cannot predict individual crash size from initial conditions
We can predict statistical distribution of crashes
We can identify periods of increased systemic risk (proximity to critical state)
BTW, this is a forwarding looking indicator and doesn't reprint. :)
The Story of Per Bak
In 1987, Danish physicist Per Bak and his colleagues discovered an important pattern in nature: self-organized criticality.
Their sandpile experiment revealed something: drop grains of sand one by one onto a pile, and the system naturally evolves toward a critical state. Most grains cause nothing. Some trigger small slides. But occasionally a single grain triggers a massive avalanche.
The key insight is that we cannot predict which grain will trigger the avalanche, but you can measure when the pile has reached a critical state.
Why Markets Are the Ultimate SOC System?
Financial markets exhibit all the hallmarks of self-organized criticality:
Interconnected agents (traders, institutions, algorithms) with feedback loops
Non-linear interactions where small events can cascade through the system
Power-law distributions of returns (fat tails, not normal distributions)
Natural evolution toward fragility as leverage builds, correlations tighten, and positioning crowds
Phase transitions where calm markets suddenly shift to crisis regimes
Mathematical Foundation
Power Law Distributions
Traditional finance assumes returns follow a normal distribution. "Markets return 10% on average." But I disagree. Markets follow power laws:
P(x) ∝ x^(-α)
Where P(x) is the probability of an event of size x, and α is the power law exponent (typically 3-4 for financial markets).
What this means: Small moves happen constantly. Medium moves are less frequent. Catastrophic moves are rare but follow predictable probability distributions. The "fat tails" are features of critical systems.
Critical Slowing Down
As systems approach phase transitions, they exhibit critical slowing down—reduced ability to absorb shocks. Mathematically, this appears as:
τ ∝ |T - T_c|^(-ν)
Where τ is the relaxation time, T is the current state, T_c is the critical threshold, and ν is the critical exponent.
Translation: Near criticality, markets take longer to recover from perturbations. Fragility compounds.
Component Aggregation & Non-Linear Emergence
The Per Bak SOC our index aggregates four normalized components (each scaled 0-100) with tunable weights:
SOC = w₁·C_tail + w₂·C_vol + w₃·C_credit + w₄·C_position
Default weights (you can change this):
w₁ = 0.34 (Tail Risk via SKEW)
w₂ = 0.26 (Volatility Regime via VIX term structure)
w₃ = 0.18 (Credit Stress via HYG/LQD + TED spread)
w₄ = 0.22 (Positioning Extremes via Put/Call ratio)
Each component uses percentile ranking over a 252-day lookback combined with absolute thresholds to capture both relative regime shifts and extreme absolute levels.
The Four Pillars Explained
1. Tail Risk (SKEW Index)
Measures options market pricing of fat-tail events. High SKEW indicates elevated outlier probability.
C_tail = 0.7·percentrank(SKEW, 252) + 0.3·((SKEW - 115)/0.5)
2. Volatility Regime (VIX Term Structure)
Combines VIX level with term structure slope. Backwardation signals acute stress.
C_vol = 0.4·VIX_level + 0.35·VIX_slope + 0.25·VIX_ratio
3. Credit Stress (HYG/LQD + TED Spread)
Tracks high-yield deterioration versus investment-grade and interbank lending stress.
C_credit = 0.65·percentrank(LQD/HYG, 252) + 0.35·(TED/0.75)·100
4. Positioning Extremes (Put/Call Ratio)
Detects extreme hedging demand through percentile ranking and z-score analysis.
C_position = 0.6·percentrank(P/C, 252) + 0.4·zscore_normalized
What the Indicator Really Measures?
Not Volatility but Fragility
Markets Going Down ≠ Fragility Building (actually when markets go down, risk and fragility are released)
The 0-100 Scale & Regime Thresholds
The indicator outputs a 0-100 fragility score with four regimes:
🟢 Safe (0-39): System resilient, can absorb normal shocks
🟡 Building (40-54): Early fragility signs, watch for deterioration
🟠 Elevated (55-69): System vulnerable
🔴 Critical (70-100): Highly susceptible to cascade failures
Further Reading for Nerds
Bak, P., Tang, C., & Wiesenfeld, K. (1987). "Self-organized criticality: An explanation of 1/f noise." Physical Review Letters.
Bak, P. & Chen, K. (1991). "Self-organized criticality." Scientific American.
Bak, P. (1996). How Nature Works: The Science of Self-Organized Criticality. Copernicus.
Feedback is appreciated :)
Ultimate Squeeze & BreakoutTitle: Ultimate Squeeze & Breakout
Description: This professional volatility indicator utilizes the power of Bollinger Bands and Keltner Channels to identify high-probability consolidation zones and explosive breakouts. It is designed to help traders spot "The Squeeze"—a critical period of low volatility where the market builds potential energy before a significant directional move.
How It Works:
1. The Energy (The Squeeze): Using the classic TTM Squeeze logic, the indicator monitors the relationship between price volatility (Bollinger Bands) and average range (Keltner Channels).
Red Cloud: Volatility is compressed. The Bollinger Bands have contracted inside the Keltner Channels. The market is coiling like a spring. This is the Setup Phase.
2. The Breakout (The Release): When price expands and closes outside the bands, the energy is released.
Momentum Filter: A unique filter checks the slope of the 20-period Basis Line (SMA). Breakout colors only trigger if the momentum slope agrees with the breakout direction, helping to filter out weak "fakeouts."
Visual Guide:
☁️ Cloud Colors (Volatility State):
🟥 Red: Squeeze ON (Consolidation/No Trade).
🟣 Fuchsia: Bullish Momentum Breakout.
🔵 Blue: Bearish Momentum Breakout.
⬜ Gray/Green: Normal Trending (Neutral).
Features:
Smart Filters: Breakouts are validated by the underlying momentum slope.
Trend Coloring: Option to switch the neutral trending cloud between Gray and Green.
Precision Tuning: Decimal inputs allow for fine-tuning of Standard Deviation and ATR multipliers.
Alerts: Full alert support for Squeeze Start, Bullish Breakouts, and Bearish Breakouts.
Credits: This script is built upon the foundational TTM Squeeze concept popularized by John Carter, enhanced with dynamic coloring and momentum filtering.
RS Rating Multi-TimeframeRS Rating Multi-Timeframe (IBD-Style Relative Strength)
Short Description:
IBD-style Relative Strength Rating (1-99) comparing any stock's performance vs the S&P 500 across multiple timeframes.
Full Description:
Overview
This indicator calculates an IBD-style Relative Strength (RS) Rating that measures a stock's price performance relative to the S&P 500 over the past 12 months. The rating scale ranges from 1 (weakest) to 99 (strongest), telling you how a stock ranks against all other stocks in terms of relative performance.
How It Works
The RS Rating uses a weighted formula based on quarterly performance:
Last 63 days (1 quarter): 40% weight
Last 126 days (2 quarters): 20% weight
Last 189 days (3 quarters): 20% weight
Last 252 days (4 quarters): 20% weight
This weighting emphasizes recent performance while still accounting for longer-term strength.
Rating Interpretation
90-99 (Elite): Top 10% of all stocks - exceptional relative strength
80-89 (Excellent): Top 20% - strong leadership candidates
50-79 (Average): Middle of the pack
30-49 (Below Average): Underperforming the market
1-29 (Weak): Bottom 30% - avoid or consider shorting
Features
Multi-Timeframe: Works on any timeframe from 1-hour to weekly (always uses daily data for calculation)
Moving Average: Optional EMA or SMA of the RS Rating to smooth signals
Visual Zones: Color-coded zones for quick identification of strength/weakness
Signal Markers: Triangles appear when RS crosses key levels (80 and 30)
Info Table: Displays current RS Rating, change, MA value, and raw score
Alerts: Built-in alerts for key crossover events
Settings
Show Moving Average: Toggle MA line on/off
MA Length: Period for the moving average (default: 10)
MA Type: Choose between EMA or SMA
Benchmark Index: Change the comparison index (default: SP:SPX)
Show Rating Table: Toggle the info table on/off
How To Use
Buy candidates: Look for stocks with RS Rating above 80, ideally rising
Avoid: Stocks with RS Rating below 30 or falling rapidly
Confirmation: Use RS above its moving average as additional confirmation
Divergence: Watch for RS making new highs before price (bullish) or new lows before price (bearish)
Credits
RS Rating calculation methodology inspired by Investor's Business Daily (IBD) and adapted from Fred6724's RS Rating script. Percentile calibration based on analysis of ~6,600 US stocks.
Tags: relative strength, RS rating, IBD, momentum, CAN SLIM, benchmark, SPX, market leaders, stock ranking
Category: Relative Strength
Markov ProjectionThe idea here is to provide mobile S/R through Markov chaining. Definitely not a reversion to the mean trading system, or a trading system of any sort. More like an error bounded future price envelope that dramatically overshoots projected price in the direction it's moving in while just barely failing price bounding in the opposite direction. So in an uptrend, it'll overshoot the top while the bottom pokes out a bit and vice versa. Looks rather pretty. You'll have to adjust transparency settings. Happy hunting.
ZScore SemiConductoresZ-Score of Semiconductor Sector Volume
This custom Pine Script indicator applies a Z-Score calculation to the aggregated trading volume of leading semiconductor companies. The goal is to highlight statistical extremes in sector activity that may signal unusual market behavior.
🔧 How it works
- Fixed ticker list: NVDA, AVGO, TSM, AMD, ASML, MU, ARM, ON, TXN, QCOM, INTC.
- Aggregate volume: The script sums the trading volume of all tickers in the list for the selected timeframe.
- Z-Score calculation:
- Moving average and standard deviation are computed over a configurable window (default = 50 bars).
- Formula:
Z= (Current Volume - Mean) / Standard Deviation
Visualization:
- Z-Score plotted in green.
- Reference lines at 0, ±1σ, ±2σ.
- Labels (triangles) mark critical signals when Z > +2 or Z < -2.
📈 Why it matters
- Detects abnormal surges or drops in sector-wide volume.
- Highlights potential euphoria (+2σ) or panic (-2σ) moments.
- Useful as a filter for trading strategies or as a sector-level alert system.
⚠️ Disclaimer: This script is for educational purposes only and not financial advice






















