Everyday 0002 _ MAC 1st Trading Hour WalkoverThis is the second strategy for my Everyday project.
Like I wrote the last time - my goal is to create a new strategy everyday
for the rest of 2016 and post it here on TradingView.
I'm a complete beginner so this is my way of learning about coding strategies.
I'll give myself between 15 minutes and 2 hours to complete each creation.
This is basically a repetition of the first strategy I wrote - a Moving Average Crossover,
but I added a tiny thing.
I read that "Statistics have proven that the daily high or low is established within the first hour of trading on more than 70% of the time."
(source: )
My first Moving Average Crossover strategy, tested on VOLVB daily, got stoped out by the volatility
and because of this missed one nice bull run and a very nice bear run.
So I added this single line: if time("60", "1000-1600") regarding when to take exits:
if time("60", "1000-1600")
strategy.exit("Close Long", "Long", profit=2000, loss=500)
strategy.exit("Close Short", "Short", profit=2000, loss=500)
Sweden is UTC+2 so I guess UTC 1000 equals 12.00 in Stockholm. Not sure if this is correct, actually.
Anyway, I hope this means the strategy will only take exits based on price action which occur in the afternoon, when there is a higher probability of a lower volatility.
When I ran the new modified strategy on the same VOLVB daily it didn't get stoped out so easily.
On the other hand I'll have to test this on various stocks .
Reading and learning about how to properly test strategies is on my todo list - all tips on youtube videos or blogs
to read on this topic is very welcome!
Like I said the last time, I'm posting these strategies hoping to learn from the community - so any feedback, advice, or corrections is very much welcome and appreciated!
/pbergden
Cerca negli script per "美股标普500"
ZLEMA Trend Index 2.0ZTI — ZLEMA Trend Index 2.0 (0–1000)
Overview
Price Mapped ZTI v2.0 - Enhanced Zero-Lag Trend Index.
This indicator is a significant upgrade to the original ZTI v1.0, featuring enhanced resolution from 0-100 to 0-1000 levels for dramatically improved price action accuracy. The Price Mapped ZTI uses direct price-to-level mapping to eliminate statistical noise and provide true proportional representation of market movements.
Key Innovation: Instead of statistical normalization, this version maps current price position within a user-defined lookback period directly to the ZTI scale, ensuring perfect correlation with actual price movements. I believe this is the best way to capture trends instead of directly on the charts using a plethora of indicators which introduces bad signals resulting in drawdowns. The RSI-like ZTI overbought and oversold lines filter valid trends by slicing through the current trading zone. Unlike RSI that can introduce false signals, the ZTI levels 1 to 1000 is faithfully mapped to the lowest to highest price in the current trading zone (lookback period in days) which can be changed in the settings. The ZTI line will never go off the beyond the ZTI levels in case of extreme trend continuation as the trading zone is constantly updated to reflect only the most recent bars based on lookback days.
Core Features
✅ 10x Higher Resolution - 0-1000 scale provides granular movement detection
✅ Adjustable Trading Zone - Customizable lookback period from 1-50 days
✅ Price-Proportional Mapping - Direct correlation between price position and ZTI level
✅ Zero Statistical Lag - No rolling averages or standard deviation calculations
✅ Multi-Strategy Adaptability - Single parameter adjustment for different trading styles
Trading Zone Optimization
📊 Lookback Period Strategies
Short-term (1-3 days):
Ultra-responsive to recent price action
Perfect for scalping and day trading
Tight range produces more sensitive signals
Medium-term (7-14 days):
Balanced view of recent trading range
Ideal for swing trading
Captures meaningful support/resistance levels
Long-term (21-30 days):
Broader market context
Excellent for position trading
Smooths out short-term market noise
⚡ Market Condition Adaptation
Volatile Markets: Use shorter lookback (3-5 days) for tighter ranges
Trending Markets: Use longer lookback (14-21 days) for broader context
Ranging Markets: Use medium lookback (7-10 days) for clear boundaries
🎯 Timeframe Optimization
1-minute charts: 1-2 day lookback
5-minute charts: 2-5 day lookback
Hourly charts: 7-14 day lookback
Daily charts: 21-50 day lookback
Trading Applications
Scalping Setup (2-day lookback):
Super tight range for quick reversals
ZTI 800+ = immediate short opportunity
ZTI 200- = immediate long opportunity
Swing Trading Setup (10-day lookback):
Meaningful swing levels captured
ZTI extremes = high-probability reversal zones
More stable signals, reduced whipsaws
Advanced Usage
🔧 Real-Time Adaptability
Trending days: Increase to 14+ days for broader perspective
Range-bound days: Decrease to 3 days for tighter signals
High volatility: Shorter lookback for responsiveness
Low volatility: Longer lookback to avoid false signals
💡 Multi-Timeframe Approach
Entry signals: Use 7-day ZTI on main timeframe
Trend confirmation: Use 21-day ZTI on higher timeframe
Exit timing: Use 3-day ZTI for precise exits
🌐 Session Optimization
Asian session: Shorter lookback (3-5 days) for range-bound conditions
London/NY session: Longer lookback (7-14 days) for trending conditions
How It Works
The indicator maps the current price position within the specified lookback period directly to a 0-1000 scale and plots it using ZLEMA (Zero Lag Exponential Moving Average) which has the least lag of the available popular moving averages:
Price at recent high = ZTI at 1000
Price at recent low = ZTI at 1
Price at mid-range = ZTI at 500
This creates perfect proportional representation where every price movement translates directly to corresponding ZTI movement, eliminating the false signals common in traditional oscillators.
This single, versatile indicator adapts to any market condition, timeframe, or trading style through one simple parameter adjustment, making it an essential tool for traders at every level.
Credits
ZLEMA techniques widely attributed to John Ehlers.
Disclaimer
This tool is for educational purposes only and is not financial advice. Backtest and forward‑test before live use, and always manage risk.
Please note that I set this as closed source to prevent source code cloning by others, repackaging and republishing which results in multiple confusing choices of the same indicator.
Student wyckoff rs symbol/moexRelative Strength Indicator
Student wyckoff rs symbol/market v.2
Description
The Relative Strength (RS) Indicator compares the price performance of the current financial instrument (e.g., a stock) against another instrument (e.g., an index or another stock). It is calculated by dividing the closing price of the first instrument by the closing price of the second, then multiplying by 100. This provides a percentage ratio that shows how one instrument outperforms or underperforms another. The indicator helps traders identify strong or weak assets, spot market leaders, or evaluate an asset’s performance relative to a benchmark.
Key Features
Relative Strength Calculation: Divides the closing price of the current instrument by the closing price of the second instrument and multiplies by 100 to express the ratio as a percentage.
Simple Moving Average (SMA): Applies a customizable Simple Moving Average (default period: 14) to smooth the data and highlight trends.
Visualization: Displays the Relative Strength as a blue line, the SMA as an orange line, and colors bars (blue for rising, red for falling) to indicate changes in relative strength.
Flexibility: Allows users to select the second instrument via an input field and adjust the SMA period.
Applications
Market Comparison: Assess whether a stock is outperforming an index (e.g., S&P 500 or MOEX) to identify strong assets for investment.
Sector Analysis: Compare stocks within a sector or against a sector ETF to pinpoint leaders.
Trend Analysis: Use the rise or fall of the RS line and its SMA to gauge the strength of an asset’s trend relative to another instrument.
Trade Timing: Bar coloring helps quickly identify changes in relative strength, aiding short-term trading decisions.
Interpretation
Rising RS: Indicates the first instrument is outperforming the second (e.g., a stock growing faster than an index).
Falling RS: Suggests the first instrument is underperforming.
SMA as a Trend Filter: If the RS line is above the SMA, it may signal strengthening performance; if below, weakening performance.
Settings
Instrument 2: Ticker of the second instrument (default: QQQ).
SMA Period: Period for the Simple Moving Average (default: 14).
Notes
The indicator works on any timeframe but requires accurate ticker input for the second instrument.
Ensure data for both instruments is available on the selected timeframe for precise analysis.
Student wyckoff relative strength Indicator cryptoRelative Strength Indicator crypto
Student wyckoff rs symbol USDT.D
Description
The Relative Strength (RS) Indicator compares the price performance of the current financial instrument (e.g., a stock) against another instrument (e.g., an index or another stock). It is calculated by dividing the closing price of the first instrument by the closing price of the second, then multiplying by 100. This provides a percentage ratio that shows how one instrument outperforms or underperforms another. The indicator helps traders identify strong or weak assets, spot market leaders, or evaluate an asset’s performance relative to a benchmark.
Key Features
Relative Strength Calculation: Divides the closing price of the current instrument by the closing price of the second instrument and multiplies by 100 to express the ratio as a percentage.
Simple Moving Average (SMA): Applies a customizable Simple Moving Average (default period: 14) to smooth the data and highlight trends.
Visualization: Displays the Relative Strength as a blue line, the SMA as an orange line, and colors bars (blue for rising, red for falling) to indicate changes in relative strength.
Flexibility: Allows users to select the second instrument via an input field and adjust the SMA period.
Applications
Market Comparison: Assess whether a stock is outperforming an index (e.g., S&P 500 or MOEX) to identify strong assets for investment.
Sector Analysis: Compare stocks within a sector or against a sector ETF to pinpoint leaders.
Trend Analysis: Use the rise or fall of the RS line and its SMA to gauge the strength of an asset’s trend relative to another instrument.
Trade Timing: Bar coloring helps quickly identify changes in relative strength, aiding short-term trading decisions.
Interpretation
Rising RS: Indicates the first instrument is outperforming the second (e.g., a stock growing faster than an index).
Falling RS: Suggests the first instrument is underperforming.
SMA as a Trend Filter: If the RS line is above the SMA, it may signal strengthening performance; if below, weakening performance.
Settings
Instrument 2: Ticker of the second instrument (default: QQQ).
SMA Period: Period for the Simple Moving Average (default: 14).
Notes
The indicator works on any timeframe but requires accurate ticker input for the second instrument.
Ensure data for both instruments is available on the selected timeframe for precise analysis.
[GrandAlgo] Moving Averages Cross LevelsMoving Averages Cross Levels
Many traders watch for moving average crossovers – such as the golden cross (50 MA crossing above 200 MA) or death cross – as signals of changing trends. However, once a crossover happens, the exact price level where it occurred often fades from view, even though that level can be an important reference point. Moving Averages Cross Levels is an indicator that keeps those crossover price levels visible on your chart, helping you track where momentum shifts occurred and how price behaves relative to those key levels.
This tool plots horizontal line segments at the price where each pair of selected moving averages crossed within a recent window of bars. Each level is labeled with the moving average lengths (for example, “21×50” for a 21/50 MA cross) and is color-coded – green for bullish crossovers (short-term MA crossing above long-term MA) and red for bearish crossunders (short-term crossing below). By visualizing these crossover levels, you can quickly identify past trend change points and use them as potential support/resistance or decision levels in your trading. Importantly, this indicator is non-repainting – once a crossover level is plotted, it remains fixed at the historical price where the cross occurred, allowing you to continually monitor that level going forward. (As with any moving average-based analysis, crossover signals are lagging, so use these levels in conjunction with other tools for confirmation.)
Key Features:
✅ Multiple Moving Averages: Track up to 7 different MAs (e.g. 5, 8, 21, 50, 64, 83, 200 by default) simultaneously. You can enable/disable each MA and set its length, allowing flexible combinations of short-term and long-term averages.
✅ Selectable MA Type: Each average can be calculated as a Simple (SMA), Exponential (EMA), Volume-Weighted (VWMA), or Smoothed (RMA) moving average, giving you flexibility to match your preferred method.
✅ Auto Crossover Detection: The script automatically detects all crosses between any enabled MA pairs, so you don’t have to specify pairs manually. Whether it’s a fast cross (5×8) or a long-term cross (50×200), every crossover within the lookback period will be identified and marked.
✅ Horizontal Level Markers: For each detected crossover, a horizontal line segment is drawn at the exact price where the crossover occurred. This makes it easy to glance at your chart and see precisely where two moving averages intersected in the recent past.
✅ Labeled and Color-Coded: Each crossover line is labeled with the two MA lengths that crossed (e.g. “50×200”) for clear identification. Colors indicate crossover direction – by default green for bullish (positive) crossovers and red for bearish (negative) crossovers – so you can tell at a glance which way the trend shifted. (You can customize these colors in the settings.)
✅ Adjustable Lookback: A “Crosses with X candles” input lets you control how far back the script looks for crossovers to plot. This prevents your chart from getting cluttered with too many old levels – for example, set X = 100 to show crossovers from roughly the last 100 bars. Older crossover lines beyond this lookback window will automatically clear off the chart.
✅ Optional MA Plots: You can toggle the display of each moving average line on the chart. This means you can either view just the crossover levels alone for a clean look, or also overlay the MA curves themselves for additional context (to see how price and MAs were moving around the crossover).
✅ No Repainting or Hindsight Bias: Once a crossover level is plotted, it stays at that fixed price. The indicator doesn’t move levels around after the fact – each line is a true historical event marker. This allows you to backtest visually: see how price acted after the crossover by observing if it retested or respected that level later.
How It Works:
1️⃣ Add to Chart & Configure – Simply add the indicator to your chart. In the settings, choose which moving averages you want to include and set their lengths. For example, you might enable 21, 50, 200 to focus on medium and long-term crosses (including the golden cross), or turn on shorter MAs like 5 and 8 for quick momentum shifts. Adjust the lookback (number of bars to scan for crosses) if needed.
2️⃣ Visualization – The script continuously checks the latest X bars for any points where one MA crossed above or below another. Whenever a crossover is found, it calculates the exact price level at which the two moving averages intersected. On the last bar of your chart, it will draw a horizontal line segment extending from the crossover bar to the current bar at that price level, and place a label to the right of the line with the MA lengths. Green lines/labels signify bullish crossovers (where the first MA crossed above the second), and red lines indicate bearish crossunders.
3️⃣ On Your Chart – You will see these labeled levels aligned with the price scale. For example, if a 50 MA crossed above a 200 MA (bullish) 50 bars ago at price $100, there will be a green “50×200” line at $100 extending to the present, showing you exactly where that golden cross happened. You might notice price pulling back near that level and bouncing, or if price falls back through it, it could signal a failed crossover. The indicator updates in real-time: if a new crossover happens on the latest bar, a new line and label will instantly appear, and if any old cross moves out of the lookback range, its line is removed to keep the chart focused.
4️⃣ Customization – You can fine-tune the appearance: toggle any MA’s visibility, change line colors or label styles, and modify the lookback length to suit different timeframes. For instance, on a 1-hour chart you might use a lookback of 500 bars to see a few weeks of cross history, whereas on a daily chart 100 bars (about 4–5 months) may be sufficient. Adjust these settings based on how many crossover levels you find useful to display.
Ideal for Traders Who:
Use MA Crossovers in Strategy: If your strategy involves moving average crossovers (for trend confirmation or entry/exit signals), this indicator provides an extra layer of insight by keeping the price of those crossover events in sight. For example, trend-followers can watch if price stays above a bullish crossover level as a sign of trend strength, or falls below it as a sign of weakness.
Identify Support/Resistance from MA Events: Crossover levels often coincide with pivot points in market sentiment. A crossover can act like a regime change – the level where it happened may turn into support or resistance. This tool helps you mark those potential S/R levels automatically. Rather than manually noting where a golden cross occurred, you’ll have it highlighted, which can be useful for setting stop-losses (e.g. below the crossover price in a bullish scenario) or profit targets.
Track Multiple Averages at Once: Instead of focusing on just one pair of moving averages, you might be interested in the interaction of several (short, medium, and long-term trends). This indicator caters to that by plotting all relevant crossovers among your chosen MAs. It’s great for multi-timeframe thinkers as well – e.g. you could apply it on a higher timeframe chart to mark major cross levels, then drill down to lower timeframes knowing those key prices.
Value Clean Visualization: There are no flashing signals or arrows – just simple lines and labels that enhance your chart’s storytelling. It’s ideal if you prefer to make trading decisions based on understanding price interaction with technical levels rather than following automatic trade calls. Moving Averages Cross Levels gives you information to act on, without imposing any bias or strategy – you interpret the crossover levels in the context of your own trading system.
Yelober - Market Internal direction+ Key levelsYelober – Market Internals + Key Levels is a focused intraday trading tool that helps you spot high-probability price direction by anchoring decisions to structure that matters: yesterday’s RTH High/Low, today’s pre-market High/Low, and a fast Value Area/POC from the prior session. Paired with a compact market internals dashboard (NYSE/NASDAQ UVOL vs. DVOL ratios, VOLD slopes, TICK/TICKQ momentum, and optional VIX trend), it gives you a real-time read on breadth so you can choose which direction to trade, when to enter (breaks, retests, or fades at PMH/PML/VAH/VAL/POC), and how to plan exits as internals confirm or deteriorate. On top of these intraday decision benefits, it also allows traders—in a very subtle but powerful way—to keep an eye on the VIX and immediately recognize significant spikes or sharp decreases that should be factored in before entering a trade, or used as a quick signal to modify an existing position. In short: clear levels for the chart, live internals for the context, and a smarter, rules-based path to execution.
# Yelober – Market Internals + Key Levels
*A TradingView indicator for session key levels + real‑time market internals (NYSE/NASDAQ TICK, UVOL/DVOL/VOLD, and VIX).*
**Script name in Pine:** `Yelober - Market Internal direction+ Key levels` (Pine v6)
---
## 1) What this indicator does
**Purpose:** Help intraday traders quickly find high‑probability reaction zones and read market internals momentum without switching charts. It overlays yesterday/today’s **automatic price levels** on your active chart and shows a **market breadth table** that summarizes NYSE/NASDAQ buying pressure and TICK direction, with an optional VIX trend read.
### Key features at a glance
* **Automatic Price Levels (overlay on chart)**
* Yesterday’s High/Low of Day (**yHoD**, **yLoD**)
* Extended Hours High/Low (**yEHH**, **yEHL**) across yesterday AH + today pre‑market
* Today’s Pre‑Market High/Low (**PMH**, **PML**)
* Yesterday’s **Value Area High/Low** (**VAH/VAL**) and **Point of Control (POC)** computed from a volume profile of yesterday’s **regular session**
* Smart de‑duplication:
* Shows **only the higher** of (yEHH vs PMH) and **only the lower** of (yEHL vs PML) to avoid redundant bands
* **Market Breadth Table (on‑chart table)**
* **NYSE ratio** = UVOL/DVOL (signed) with **VOLD slope** from session open
* **NASDAQ ratio** = UVOLQ/DVOLQ (signed) with **VOLDQ slope** from session open
* **TICK** and **TICKQ**: live cumulative ratio and short‑term slope
* **VIX** (optional): current value + slope over a configurable lookback/timeframe
* Color‑coded trends with sensible thresholds and optional normalization
---
## 2) How to use it (trader workflow)
1. **Mark your reaction zones**
* Watch **yHoD/yLoD**, **PMH/PML**, and **VAH/VAL/POC** for first touches, break/retest, and failure tests.
* Expect increased responsiveness when multiple levels cluster (e.g., PMH ≈ VAH ≈ daily pivot).
2. **Read the breadth panel for context**
* **NYSE/NASDAQ ratio** (>1 = more up‑volume than down‑volume; <−1 = down‑dominant). Strong green across both favors long setups; red favors short setups.
* **VOLD slopes** (NYSE & NASDAQ): positive and accelerating → broadening participation; negative → persistent pressure.
* **TICK/TICKQ**: cumulative ratio and **slope arrows** (↗ / ↘ / →). Use the slope to gauge **near‑term thrust or fade**.
* **VIX slope**: rising VIX (red) often coincides with risk‑off; falling VIX (green) with risk‑on.
3. **Confluence = higher confidence**
* Example: Price reclaims **PMH** while **NYSE/NASDAQ ratios** print green and **TICK slopes** point ↗ — consider break‑and‑go; if VIX slope is ↘, that adds risk‑on confidence.
* Example: Price rejects **VAH** while **VOLD slopes** roll negative and VIX ↗ — consider fade/reversal.
4. **Risk management**
* Place stops just beyond key levels tested; if breadth flips, tighten or exit.
> **Timeframes:** Works best on 1–15m charts for intraday. Value Area is computed from **yesterday’s RTH**; choose a smaller calculation timeframe (e.g., 5–15m) for stable profiles.
---
## 3) Inputs & settings (what each option controls)
### Global Style
* **Enable all automatic price levels**: master toggle for yHoD/yLoD, yEHH/yEHL, PMH/PML, VAH/VAL/POC.
* **Line style/width**: applies to all drawn levels.
* **Label size/style** and **label color linking**: use the same color as the line or override with a global label color.
* **Maximum bars lookback**: how far the script scans to build yesterday metrics (performance‑sensitive).
### Value Area / Volume Profile
* **Enable Value Area calculations** *(on by default)*: computes yesterday’s **POC**, **VAH**, **VAL** from a simplified intraday volume profile built from yesterday’s **regular session bars**.
* **Max Volume Profile Points** *(default 50)*: lower values = faster; higher = more precise.
* **Value Area Calculation Timeframe** *(default 15)*: the security timeframe used when collecting yesterday’s highs/lows/volumes.
### Individual Level Toggles & Colors
* **yHoD / yLoD** (yesterday high/low)
* **yEHH / yEHL** (yesterday AH + today pre‑market extremes)
* **PMH / PML** (today pre‑market extremes)
* **VAH / VAL / POC** (yesterday RTH value area + point of control)
### Market Breadth Panel
* **Show NYSE / NASDAQ / VIX**: choose which series to display in the table.
* **Table Position / Size / Background Color**: UI placement and legibility.
* **Slope Averaging Periods** *(default 5)*: number of recent TICK/TICKQ ratio points used in slope calculation.
* **Candles for Rate** *(default 10)* & **Normalize Rate**: VIX slope calculation as % change between `now` and `n` candles ago; normalize divides by `n`.
* **VIX Timeframe**: optionally compute VIX on a higher TF (e.g., 15, 30, 60) for a smoother regime read.
* **Volume Normalization** (NYSE & NASDAQ): display VOLD slopes scaled to `tens/thousands/millions/10th millions` for readable magnitudes; color thresholds adapt to your choice.
---
## 4) Data sources & definitions
* **UVOL/VOLD (NYSE)** and **UVOLQ/DVOLQ/VOLDQ (NASDAQ)** via `request.security()`
* **Ratio** = `UVOL/DVOL` (signed; negative when down‑volume dominates)
* **VOLD slope** ≈ `(VOLD_now − VOLD_open) / bars_since_open`, then normalized per your setting
* **TICK/TICKQ**: cumulative sum of prints this session with **positives vs negatives ratio**, plus a simple linear regression **slope** of the last `N` ratio values
* **VIX**: value and slope across a user‑selected timeframe and lookback
* **Sessions (EST/EDT)**
* **Regular:** 09:30–16:00
* **Pre‑Market:** 04:00–09:30
* **After Hours:** 16:00–20:00
* **Extended‑hours extremes** combine **yesterday AH** + **today PM**
> **Note:** All session checks are done with TradingView’s `time(…,"America/New_York")` context. If your broker’s RTH differs (e.g., futures), adjust expectations accordingly.
---
## 5) How the algorithms work (plain English)
### A) Key Levels
* **Yesterday’s RTH High/Low**: scans yesterday’s bars within 09:30–16:00 and records the extremes + bar indices.
* **Extended Hours**: scans yesterday AH and today PM to get **yEHH/yEHL**. Script shows **either yEHH or PMH** (whichever is **higher**) and **either yEHL or PML** (whichever is **lower**) to avoid duplicate bands stacked together.
* **Value Area & POC (RTH only)**
* Build a coarse volume profile with `Max Volume Profile Points` buckets across the price range formed by yesterday’s RTH bars.
* Distribute each bar’s volume uniformly across the buckets it spans (fast approximation to keep Pine within execution limits).
* **POC** = bucket with max volume. **VA** expands from POC outward until **70%** of cumulative volume is enclosed → yields **VAH/VAL**.
### B) Market Breadth Table
* **NYSE/NASDAQ Ratio**: signed UVOL/DVOL with basic coloring.
* **VOLD Slopes**: from session open to current, normalized to human‑readable units; colors flip green/red based on thresholds that map to your normalization setting (e.g., ±2M for NYSE, ±3.5×10M for NASDAQ).
* **TICK/TICKQ Slope**: linear regression over the last `N` ratio points → **↗ / → / ↘** with the rounded slope value.
* **VIX Slope**: % change between now and `n` candles ago (optionally divided by `n`). Red when rising beyond threshold; green when falling.
---
## 6) Recommended presets
* **Stocks (liquid, intraday)**
* Value Area **ON**, `Max Volume Points` = **40–60**, **Timeframe** = **5–15**
* Breadth: show **NYSE & NASDAQ & VIX**, `Slope periods` = **5–8**, `Candles for rate` = **10–20**, **Normalize VIX** = **ON**
* **Index futures / very high‑volume symbols**
* If you see Pine timeouts, set `Max Volume Points` = **20–40** or temporarily **disable Value Area**.
* Keep breadth panel **ON** (it’s light). Consider **VIX timeframe = 15/30** for regime clarity.
---
## 7) Tips, edge cases & performance
* **Performance:** The volume profile is capped (`maxBarsToProcess ≤ 500` and bucketed) to keep it responsive. If you experience slowdowns, reduce `Max Volume Points`, `Maximum bars lookback`, or disable Value Area.
* **Redundant lines:** The script **intentionally suppresses** PMH/PML when yEHH/yEHL are more extreme, and vice‑versa.
* **Label visibility:** Use `Label style = none` if you only want clean lines and read values from the right‑end labels.
* **Futures/RTH differences:** Value Area is from **yesterday’s RTH** only; for 24h instruments the RTH period may not reflect overnight structure.
* **Session transitions:** PMH/PML tracking stops as soon as RTH starts; values persist as static levels for the session.
---
## 8) Known limitations
* Uses public TradingView symbols: `UVOL`, `VOLD`, `UVOLQ`, `DVOLQ`, `VOLDQ`, `TICK`, `TICKQ`, `VIX`. If your data plan or region limits any symbol, the corresponding table rows may show `na`.
* The VA/POC approximation assumes uniform distribution of each bar’s volume across its high–low. That’s fast but not a tick‑level profile.
* Works best on US equities with standard NY session; alternative sessions may need code changes.
---
## 9) Troubleshooting
* **“Script is too slow / timed out”** → Lower `Max Volume Points`, lower `Maximum bars lookback`, or toggle **OFF** `Enable Value Area calculations` for that instrument.
* **Missing breadth values** → Ensure the symbols above load on your account; try reloading chart or switching timeframes once.
* **Overlapping labels** → Set `Label style = none` or reduce label size.
---
## 10) Version / license / contribution
* **Version:** Initial public release (Pine v6).
* **Author:** © yelober
* **License:** Free for community use and enhancement. Please keep author credit.
* **Contributing:** Open PRs/ideas: presets, alert conditions, multi‑day VA composites, optional mid‑value (`(VAH+VAL)/2`), session filter for futures, and alertable state machine for breadth regime transitions.
---
## 11) Quick start (TL;DR)
1. Add the indicator and **keep default settings**.
2. Trade **reactions** at yHoD/yLoD/PMH/PML/VAH/VAL/POC.
3. Use the **breadth table**: look for **green ratios + ↗ slopes** (risk‑on) or **red ratios + ↘ slopes** (risk‑off). Check **VIX** slope for confirmation.
4. Manage risk around levels; when breadth flips against you, tighten or exit.
---
### Changelog (public)
* **v1.0:** First community release with automatic RTH levels, VA/POC approximation, breadth dashboard (NYSE/NASDAQ/TICK/TICKQ/VIX) with normalization and adaptive color thresholds.
Futures Confluence Delta (FCD) - Histogram
The Futures Confluence Delta (FCD) Histogram is a powerful trend-following indicator tailored for scalping futures on 1-minute charts. Displayed in a bottom panel like RSI or volume, it visualizes cumulative volume delta to identify bullish or bearish market momentum. The histogram turns green for positive delta (buying pressure, suggesting a long trend) and red for negative delta (selling pressure, indicating a short trend), providing quick insight into market direction.
This indicator is ideal for futures traders seeking confluence with other tools, such as VWMA or order block strategies. It uses a simple yet effective delta calculation (buy volume for up candles, sell volume for down candles, smoothed with EMA) to highlight trend strength, making it perfect for fast-paced scalping environments.
Key Features:
Cumulative Delta Histogram: Tracks buying vs. selling pressure, smoothed with an EMA for clarity.
Color-Coded Trend Signals: Green for bullish (long) trends, red for bearish (short) trends.
Customizable Settings: Adjust the delta lookback period and enable/disable daily reset for flexibility.
Optimized for 1-minute charts on futures.
Alert Support: Set alerts for trend changes to stay ahead of market shifts.
How to Use:
Add the indicator to your 1-minute chart. Observe the histogram in the bottom panel:
Green bars (positive delta) suggest a bullish trend, favoring long entries.
Red bars (negative delta) indicate a bearish trend, favoring short entries.
Combine with other indicators (e.g., VWMA, order blocks, or FVGs) for confluence.
Set alerts for trend changes via the FCD Long Trend or FCD Short Trend conditions.
Adjust settings (delta lookback, daily reset) to match your trading style.
Settings:
Delta Lookback Period (default: 14): Controls the EMA smoothing of the delta. Lower values increase sensitivity; higher values smooth trends.
Reset Delta Daily (default: true): Resets cumulative delta at the start of each trading day for futures session alignment.
Long Color (default: green): Color for bullish delta.
Short Color (default: red): Color for bearish delta.
Notes:
Ensure sufficient historical data (500+ bars) for accurate delta calculations.
Test on NQ for higher volatility, as it may show stronger delta signals compared to GC or ES.
Check the Pine Logs pane (“More” > “Pine Logs”) for any NA data issues if the histogram doesn’t display.
Share your feedback or suggestions in the comments!
Extreme Zone Volume ProfileExtreme Zone Volume Profile (EZVP)
Originality & Innovation
The Extreme Zone Volume Profile (EZVP) revolutionizes traditional volume profile analysis by applying statistical zone classification to volume distribution. Unlike standard volume profiles that display raw volume data, EZVP segments the price range into statistically meaningful zones based on percentile thresholds, allowing traders to instantly identify where volume concentration suggests strong support/resistance versus areas of potential breakout.
Technical Methodology
Core Algorithm:
Distributes volume across user-defined bins (20-200) over a lookback period
Calculates volume-weighted price levels for each bin
Applies percentile-based zone classification to the price range (not volume ranking)
Zone B (extreme zones): Outer percentile tails representing potential rejection areas
Zone A (significant zones): Secondary percentile bands indicating strong interest levels
Center Zone: Bulk trading range where most price discovery occurs
Mathematical Foundation:
The script uses price-range percentiles rather than volume percentiles. If the total price range is divided into 100%, Zone B captures the extreme price tails (default 2.5% each end ≈ 2 standard deviations), Zone A captures the next significant bands (default 14% each ≈ 1 standard deviation), leaving the center for normal distribution trading.
Key Calculations:
POC (Point of Control): Price level with maximum volume accumulation
Volume-weighted mean price: Total volume × price / total volume
Median price: Geometric center of the price range
Rightward-projected bars: Volume bars extend forward from current time to avoid historical chart clutter
Trading Applications
Zone Interpretation:
Zone B (Red/Green): Extreme price levels where volume suggests strong rejection potential. Price reaching these zones often indicates overextension and possible reversal points.
Zone A (Orange/Teal): Significant support/resistance areas with substantial volume interest. These levels often act as intermediate targets or consolidation zones.
Center (Gray): Fair value area where most trading occurs. Price tends to return to this range during normal market conditions.
Strategic Usage:
Reversal Trading: Look for rejection signals when price enters Zone B areas
Breakout Confirmation: Volume expansion beyond Zone B boundaries suggests genuine breakouts
Support/Resistance: Zone A boundaries often provide reliable entry/exit levels
Mean Reversion: Price tends to gravitate toward the volume-weighted mean and POC lines
Unique Value Proposition
EZVP addresses three key limitations of traditional volume profiles:
Visual Clarity: Standard profiles can be cluttered and difficult to interpret quickly. EZVP's color-coded zones provide instant visual feedback about price significance.
Statistical Framework: Rather than relying on subjective interpretation of volume nodes, EZVP applies objective percentile-based classification, making support/resistance identification more systematic.
Forward-Looking Display: Rightward-projecting bars keep historical price action clean while maintaining current market structure visibility.
Configuration Guide
Lookback Period (10-1000): Controls the historical depth of volume calculation. Shorter periods for intraday scalping, longer for swing trading.
Number of Bins (20-200): Resolution of volume distribution. Higher values provide more granular analysis but may create noise on lower timeframes.
Zone Percentages:
Zone B: Extreme threshold (default 2.5% = ~2σ statistical significance)
Zone A: Significant threshold (default 14% = ~1σ statistical significance)
Visual Controls: Toggle individual elements (POC, median, mean, zone lines) to customize display complexity for your trading style.
Technical Requirements
Pine Script v6 compatible
Maximum bars back: 5000 (ensures sufficient historical data)
Maximum boxes: 500 (supports high-resolution bin counts)
Maximum lines: 50 (accommodates all zone and reference lines)
This indicator synthesizes volume profile theory with statistical zone analysis, providing a quantitative framework for identifying high-probability support/resistance levels based on volume distribution patterns rather than arbitrary price levels.
MTF CRT Setup Finder (Raids + BOS linked)//@version=6
indicator("MTF CRT Setup Finder (Raids + BOS linked)", overlay=true, max_lines_count=500)
// === INPUTS ===
lookback = input.int(5, "Swing Lookback Bars", minval=2)
// === Function: Detect swing highs/lows ===
swingHigh(src, lb) => ta.pivothigh(src, lb, lb)
swingLow(src, lb) => ta.pivotlow(src, lb, lb)
// === Function: Detect CRT with memory ===
f_crt(tf) =>
hi = request.security(syminfo.tickerid, tf, high)
lo = request.security(syminfo.tickerid, tf, low)
cl = request.security(syminfo.tickerid, tf, close)
sh = request.security(syminfo.tickerid, tf, swingHigh(high, lookback))
sl = request.security(syminfo.tickerid, tf, swingLow(low, lookback))
raidHigh = not na(sh) and hi > sh and cl < sh
raidLow = not na(sl) and lo < sl and cl > sl
// store last raid state
var bool hadRaidHigh = false
var bool hadRaidLow = false
if raidHigh
hadRaidHigh := true
if raidLow
hadRaidLow := true
bosDown = hadRaidHigh and cl < sl
bosUp = hadRaidLow and cl > sh
// reset after BOS
if bosDown
hadRaidHigh := false
if bosUp
hadRaidLow := false
// === Apply on H1 only first (test) ===
= f_crt("60")
// === Plot ===
plotshape(raidHigh, title="Raid High", style=shape.diamond, color=color.red, size=size.small, text="Raid High")
plotshape(raidLow, title="Raid Low", style=shape.diamond, color=color.green, size=size.small, text="Raid Low")
plotshape(bosDown, title="Bearish CRT", style=shape.triangledown, color=color.red, size=size.large, text="CRT↓")
plotshape(bosUp, title="Bullish CRT", style=shape.triangleup, color=color.green, size=size.large, text="CRT↑")
Student wyckoff rs symbol/market v.2 Relative Strength Indicator
Student wyckoff rs symbol/market v.2
Description
The Relative Strength (RS) Indicator compares the price performance of the current financial instrument (e.g., a stock) against another instrument (e.g., an index or another stock). It is calculated by dividing the closing price of the first instrument by the closing price of the second, then multiplying by 100. This provides a percentage ratio that shows how one instrument outperforms or underperforms another. The indicator helps traders identify strong or weak assets, spot market leaders, or evaluate an asset’s performance relative to a benchmark.
Key Features
Relative Strength Calculation: Divides the closing price of the current instrument by the closing price of the second instrument and multiplies by 100 to express the ratio as a percentage.
Simple Moving Average (SMA): Applies a customizable Simple Moving Average (default period: 14) to smooth the data and highlight trends.
Visualization: Displays the Relative Strength as a blue line, the SMA as an orange line, and colors bars (blue for rising, red for falling) to indicate changes in relative strength.
Flexibility: Allows users to select the second instrument via an input field and adjust the SMA period.
Applications
Market Comparison: Assess whether a stock is outperforming an index (e.g., S&P 500 or MOEX) to identify strong assets for investment.
Sector Analysis: Compare stocks within a sector or against a sector ETF to pinpoint leaders.
Trend Analysis: Use the rise or fall of the RS line and its SMA to gauge the strength of an asset’s trend relative to another instrument.
Trade Timing: Bar coloring helps quickly identify changes in relative strength, aiding short-term trading decisions.
Interpretation
Rising RS: Indicates the first instrument is outperforming the second (e.g., a stock growing faster than an index).
Falling RS: Suggests the first instrument is underperforming.
SMA as a Trend Filter: If the RS line is above the SMA, it may signal strengthening performance; if below, weakening performance.
Settings
Instrument 2: Ticker of the second instrument (default: QQQ).
SMA Period: Period for the Simple Moving Average (default: 14).
Notes
The indicator works on any timeframe but requires accurate ticker input for the second instrument.
Ensure data for both instruments is available on the selected timeframe for precise analysis.
Hammer, Engulfing & Star Candles aksh//@version=5
indicator("Hammer, Engulfing & Star Candles ", overlay=true, max_bars_back=500)
// ===== Inputs =====
showHammer = input.bool(true, "Show Hammer")
showShootingStar = input.bool(true, "Show Shooting Star")
showEngulfing = input.bool(true, "Show Bull/Bear Engulfing")
showMorningStar = input.bool(true, "Show Morning Star (3-candle)")
showEveningStar = input.bool(true, "Show Evening Star (3-candle)")
// Sensitivity / thresholds
wickToBodyMin = input.float(2.5, "Min Wick:Body (Hammer/Star)", minval=0.5, step=0.1)
maxOppWickToBody = input.float(0.7, "Max Opp Wick:Body (Hammer/Star)", minval=0.0, step=0.1)
closeInTopPct = input.float(0.35, "Hammer: close in top % of range", minval=0.0, maxval=1.0, step=0.05)
closeInBotPct = input.float(0.35, "Star: close in bottom % of range", minval=0.0, maxval=1.0, step=0.05)
minBodyFracRange = input.float(0.15, "Min body as % of range (avoid doji)", minval=0.0, maxval=1.0, step=0.01)
engulfRequireBodyPct = input.float(1.00, "Engulfing: body >= prev body x", minval=0.5, maxval=3.0, step=0.05)
engulfAllowWicks = input.bool(false, "Engulfing: allow wick engulf if bodies equal")
starMiddleBodyMaxPct = input.float(0.40, "Morning/Evening Star: middle body <= % of avg body", minval=0.05, maxval=1.0, step=0.05)
starCloseRetracePct = input.float(0.50, "Morning/Evening Star: final close retraces >= % of first body", minval=0.25, maxval=1.0, step=0.05)
// ===== Helpers =====
body(c,o) => math.abs(c - o)
upperWick(h,o,c) => h - math.max(o, c)
lowerWick(l,o,c) => math.min(o, c) - l
rng(h,l) => h - l
isBull(o,c) => c > o
isBear(o,c) => o > c
midpoint(h,l) => (h + l) * 0.5
b = body(close, open)
uw = upperWick(high, open, close)
lw = lowerWick(low, open, close)
rg = rng(high, low)
prev_o = open , prev_c = close , prev_h = high , prev_l = low
prev_b = body(prev_c, prev_o)
// avoid divide-by-zero
safe(val) => nz(val, 0.0000001)
// ===== Single-candle patterns =====
// Hammer: long lower wick, small/limited upper wick, decent body, close toward top of range
hammer = showHammer and rg > 0 and b/rg >= minBodyFracRange and
(lw / safe(b) >= wickToBodyMin) and (uw / safe(b) <= maxOppWickToBody) and
(close >= (low + (1.0 - closeInTopPct) * rg))
// Shooting Star: long upper wick, small/limited lower wick, close toward bottom
shootingStar = showShootingStar and rg > 0 and b/rg >= minBodyFracRange and
(uw / safe(b) >= wickToBodyMin) and (lw / safe(b) <= maxOppWickToBody) and
(close <= (low + closeInBotPct * rg))
// ===== Two-candle patterns: Engulfing =====
// Bullish engulfing: previous bearish, current bullish, current body engulfs previous body
bullEngulf = showEngulfing and isBear(prev_o, prev_c) and isBull(open, close) and
(open <= prev_c and close >= prev_o) and (b >= engulfRequireBodyPct * prev_b or (engulfAllowWicks and high >= prev_h and low <= prev_l))
// Bearish engulfing: previous bullish, current bearish, current body engulfs previous body
bearEngulf = showEngulfing and isBull(prev_o, prev_c) and isBear(open, close) and
(open >= prev_c and close <= prev_o) and (b >= engulfRequireBodyPct * prev_b or (engulfAllowWicks and high >= prev_h and low <= prev_l))
// ===== Three-candle patterns: Morning/Evening Star =====
// Morning Star: strong bearish candle, small middle candle (gap or small body), strong bullish close retracing into first body
o2 = open , c2 = close
b2 = body(c2, o2)
avgBody = ta.sma(body(close, open), 20)
smallMiddle = body(close , open ) <= starMiddleBodyMaxPct * nz(avgBody, prev_b)
firstBear = isBear(o2, c2)
lastBull = isBull(open, close)
retrBull = lastBull and (close >= (c2 + starCloseRetracePct * (o2 - c2)))
morningStar = showMorningStar and firstBear and smallMiddle and retrBull
// Evening Star: mirror
firstBull = isBull(o2, c2)
lastBear = isBear(open, close)
retrBear = lastBear and (close <= (c2 - starCloseRetracePct * (c2 - o2)))
eveningStar = showEveningStar and firstBull and smallMiddle and retrBear
// ===== Plotting =====
plotshape(hammer, title="Hammer", style=shape.labelup, location=location.belowbar, text="🔨\nHammer", size=size.tiny, color=color.new(color.lime, 0), textcolor=color.black)
plotshape(shootingStar, title="Shooting Star", style=shape.labeldown, location=location.abovebar, text="⭐\nStar", size=size.tiny, color=color.new(color.orange, 0), textcolor=color.black)
plotshape(bullEngulf, title="Bull Engulfing", style=shape.labelup, location=location.belowbar, text="🟢\nEngulf", size=size.tiny, color=color.new(color.teal, 0), textcolor=color.black)
plotshape(bearEngulf, title="Bear Engulfing", style=shape.labeldown, location=location.abovebar, text="🔴\nEngulf", size=size.tiny, color=color.new(color.red, 0), textcolor=color.white)
plotshape(morningStar, title="Morning Star", style=shape.labelup, location=location.belowbar, text="🌅\nMorning", size=size.tiny, color=color.new(color.aqua, 0), textcolor=color.black)
plotshape(eveningStar, title="Evening Star", style=shape.labeldown, location=location.abovebar, text="🌆\nEvening", size=size.tiny, color=color.new(color.purple, 0), textcolor=color.white)
// Optional: color bars when patterns occur
barcolor(hammer ? color.new(color.lime, 60) : na)
barcolor(shootingStar ? color.new(color.orange, 60) : na)
barcolor(bullEngulf ? color.new(color.teal, 70) : na)
barcolor(bearEngulf ? color.new(color.red, 70) : na)
barcolor(morningStar ? color.new(color.aqua, 70) : na)
barcolor(eveningStar ? color.new(color.purple, 70) : na)
// ===== Alerts =====
alertcondition(hammer, "Hammer", "Hammer detected")
alertcondition(shootingStar, "Shooting Star", "Shooting Star detected")
alertcondition(bullEngulf, "Bullish Engulfing","Bullish Engulfing detected")
alertcondition(bearEngulf, "Bearish Engulfing","Bearish Engulfing detected")
alertcondition(morningStar, "Morning Star", "Morning Star detected (3-candle)")
alertcondition(eveningStar, "Evening Star", "Evening Star detected (3-candle)")
// ===== Hints (toggle in the Style tab if labels feel too crowded) =====
// You can adjust thresholds to match your market/timeframe.
// Common tweaks: increase wickToBodyMin for stricter hammers/stars; increase minBodyFracRange to avoid doji;
// require stronger retrace in star patterns by raising starCloseRetracePct.
Relative Strength with CNX500This indicator compares the relative strength of the stock with respect to a wider benchmark index Nifty 500
Student Wyckoff RS Symbol/MarketRelative Strength Indicator STUDENT WYCKOFF RS SYMBOL/MARKET
Description
The Relative Strength (RS) Indicator compares the price performance of the current financial instrument (e.g., a stock) against another instrument (e.g., an index or another stock). It is calculated by dividing the closing price of the first instrument by the closing price of the second, then multiplying by 100. This provides a percentage ratio that shows how one instrument outperforms or underperforms another. The indicator helps traders identify strong or weak assets, spot market leaders, or evaluate an asset’s performance relative to a benchmark.
Key Features
Relative Strength Calculation: Divides the closing price of the current instrument by the closing price of the second instrument and multiplies by 100 to express the ratio as a percentage.
Simple Moving Average (SMA): Applies a customizable Simple Moving Average (default period: 14) to smooth the data and highlight trends.
Visualization: Displays the Relative Strength as a blue line, the SMA as an orange line, and colors bars (blue for rising, red for falling) to indicate changes in relative strength.
Flexibility: Allows users to select the second instrument via an input field and adjust the SMA period.
Applications
Market Comparison: Assess whether a stock is outperforming an index (e.g., S&P 500 or MOEX) to identify strong assets for investment.
Sector Analysis: Compare stocks within a sector or against a sector ETF to pinpoint leaders.
Trend Analysis: Use the rise or fall of the RS line and its SMA to gauge the strength of an asset’s trend relative to another instrument.
Trade Timing: Bar coloring helps quickly identify changes in relative strength, aiding short-term trading decisions.
Interpretation
Rising RS: Indicates the first instrument is outperforming the second (e.g., a stock growing faster than an index).
Falling RS: Suggests the first instrument is underperforming.
SMA as a Trend Filter: If the RS line is above the SMA, it may signal strengthening performance; if below, weakening performance.
Settings
Instrument 2: Ticker of the second instrument (default: QQQ).
SMA Period: Period for the Simple Moving Average (default: 14).
Notes
The indicator works on any timeframe but requires accurate ticker input for the second instrument.
Ensure data for both instruments is available on the selected timeframe for precise analysis.
[blackcat] L1 Volume-Weighted RSIOVERVIEW
This script implements a Volume-Weighted RSI (VW-RSI) indicator that enhances traditional RSI calculations by incorporating volume data, providing more accurate momentum signals. The indicator plots a yellow VW-RSI line with customizable overbought/oversold levels and visual background coloring. It automatically generates BUY/SELL labels based on sophisticated crossover conditions, making it a powerful tool for identifying potential trend reversals and market entry/exit points. The script uses Wilder's Moving Average for smoothing and supports various price sources for flexible analysis.
FEATURES
📊 Volume-Weighted RSI Calculation: Incorporates trading volume into RSI calculations for more accurate momentum signals
🔧 Customizable Parameters: Adjustable RSI length (1-100), overbought/oversold levels, and price source selection
🎯 Visual Signals: Automatic BUY/SELL labels appear when specific crossover conditions are met
🎨 Visual Enhancements: Color-coded background (red for overbought, green for oversold) and reference lines
📈 Multiple Timeframe Support: Works across different timeframes with a max bars back setting of 5000
🔄 Sophisticated Logic: Combines multiple crossover conditions for reliable signal generation
HOW TO USE
Add to Chart: Add the indicator to your TradingView chart by searching for "L1-VW-RSI"
Configure Settings: Adjust the input parameters in the settings panel:
Price Source: Select your preferred price calculation (hl2 by default)
RSI Length: Set the lookback period (default: 34)
Overbought Level: Set the overbought threshold (default: 70)
Oversold Level: Set the oversold threshold (default: 30)
Interpret Signals:
Watch for BUY labels when the VW-RSI crosses above oversold levels
Watch for SELL labels when the VW-RSI crosses below overbought levels
Confirm with Volume: Pay attention to volume spikes when signals appear for confirmation
LIMITATIONS
The indicator may produce false signals in sideways or low-volume markets
Signals are based on historical price and volume data only
The script has a maximum of 500 labels to prevent performance issues
Wilder's Moving Average calculation may lag significantly during high volatility periods
The crossover logic combines multiple conditions which may occasionally conflict
NOTES
This script is designed for educational and analytical purposes only. Always use proper risk management when trading.
The default RSI length of 34 is optimized for most trading scenarios but can be adjusted based on your trading style.
For best results, combine this indicator with other technical analysis tools and price action confirmation.
The volume-weighted approach provides more reliable signals in high-volume environments.
EMA Percentile Rank [SS]Hello!
Excited to release my EMA percentile Rank indicator!
What this indicator does
Plots an EMA and colors it by short-term trend.
When price crosses the EMA (up or down) and remains on that side for three subsequent bars, the cross is “confirmed.”
At the moment of the most recent cross, it anchors a reference price to the crossover point to ensure static price targets.
It measures the historical distance between price and the EMA over a lookback window, separately for bars above and below the EMA.
It computes percentile distances (25%, 50%, 85%, 95%, 99%) and draws target bands above/below the anchor.
Essentially what this indicator does, is it converts the raw “distance from EMA” behavior into probabilistic bands and historical hit rates you can use for targets, stop placement, or mean-reversion/continuation decisions.
Indicator Inputs
EMA length: Default is 21 but you can use any EMA you prefer.
Lookback: Default window is 500, this is length that the percentiles are calculated. You can increase or decrease it according to your preference and performance.
Show Accumulation Table: This allows you to see the table that shows the hits/price accumulation of each of the percentile ranges. UCL means upper confidence and LCL means lower confidence (so upper and lower targets).
About Percentiles
A percentile is a way of expressing the position of a value within a dataset relative to all the other values.
It tells you what percentage of the data points fall at or below that value.
For example:
The 25th percentile means 25% of the values are less than or equal to it.
The 50th percentile (also called the median) means half the values are below it and half are above.
The 99th percentile means only 1% of the values are higher.
Percentiles are useful because they turn raw measurements into context — showing how “extreme” or “typical” a value is compared to historical behavior.
In the EMA Percentile Rank indicator, this concept is applied to the distance between price and the EMA. By calculating percentile distances, the script can mark levels that have historically been reached often (low percentiles) or rarely (high percentiles), helping traders gauge whether current price action is stretched or within normal bounds.
Use Cases
The EMA Percentile Rank indicator is best suited for traders who want to quantify how far price has historically moved away from its EMA and use that context to guide decision-making.
One strong use case is target setting after trend shifts: when a confirmed crossover occurs, the percentile bands (25%, 50%, 85%, 95%, 99%) provide statistically grounded levels for scaling out profits or placing stops, based on how often price has historically reached those distances. This makes it valuable for traders who prefer data-driven risk/reward planning instead of arbitrary point targets. Another use case is identifying stretched conditions — if price rapidly tags the 95% or 99% band after a cross, that’s an unusually large move relative to history, which could signal exhaustion and prompt mean-reversion trades or protective actions.
Conversely, if the accumulation table shows price frequently resides in upper bands after bullish crosses, traders may anticipate continuation and hold positions longer . The indicator is also effective as a trend filter when combined with its EMA color-coding : only taking trades in the trend’s direction and using the bands as dynamic profit zones.
Additionally, it can support multi-timeframe confluence (if you align your chart to the timeframes of interest), where higher-timeframe trend direction aligns with lower-timeframe percentile behavior for higher-probability setups. Swing traders can use it to frame pullbacks — entering near lower percentile bands during an uptrend — while intraday traders might use it to fade extremes or ride breakouts past the median band. Because the anchor price resets only on EMA crosses, the indicator preserves a consistent reference for ongoing trades, which is especially helpful for managing swing positions through noise .
Overall, its strength lies in transforming raw EMA distance data into actionable, probability-weighted levels that adapt to the instrument’s own volatility and tendencies .
Summary
This indicator transforms a simple EMA into a distribution-aware framework: it learns how far price tends to travel relative to the EMA on either side, and turns those excursions into percentile bands and historical hit rates anchored to the most recent cross. That makes it a flexible tool for targets, stops, and regime filtering, and a transparent way to reason about “how stretched is stretched?”—with context from your chosen market and timeframe.
I hope you all enjoy!
And as always, safe trades!
Arena TP Manager//@version=5
indicator("Arena TP Manager", overlay=true, max_labels_count=500)
// === INPUTS ===
entryPrice = input.float(0.0, "Entry Price", step=0.1)
stopLossPerc = input.float(5.0, "Stop Loss %", step=0.1)
tp1Perc = input.float(10.0, "TP1 %", step=0.1)
tp2Perc = input.float(20.0, "TP2 %", step=0.1)
tp3Perc = input.float(30.0, "TP3 %", step=0.1)
// === CALCULATIONS ===
stopLoss = entryPrice * (1 - stopLossPerc/100)
tp1 = entryPrice * (1 + tp1Perc/100)
tp2 = entryPrice * (1 + tp2Perc/100)
tp3 = entryPrice * (1 + tp3Perc/100)
// === PLOTTING ===
plot(entryPrice > 0 ? entryPrice : na, title="Entry", color=color.yellow, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? stopLoss : na, title="Stop Loss", color=color.red, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp1 : na, title="TP1", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp2 : na, title="TP2", color=color.green, linewidth=2, style=plot.style_linebr)
plot(entryPrice > 0 ? tp3 : na, title="TP3", color=color.green, linewidth=2, style=plot.style_linebr)
// === LABELS ===
if (entryPrice > 0)
label.new(bar_index, entryPrice, "ENTRY: " + str.tostring(entryPrice), style=label.style_label_up, color=color.yellow, textcolor=color.black)
label.new(bar_index, stopLoss, "SL: " + str.tostring(stopLoss), style=label.style_label_down, color=color.red, textcolor=color.white)
label.new(bar_index, tp1, "TP1: " + str.tostring(tp1), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp2, "TP2: " + str.tostring(tp2), style=label.style_label_up, color=color.green, textcolor=color.white)
label.new(bar_index, tp3, "TP3: " + str.tostring(tp3), style=label.style_label_up, color=color.green, textcolor=color.white)
ICT Advanced Multi-Timeframe StrategyICT Advanced Multi-Timeframe Trading System
📊 Overview
This comprehensive Pine Script indicator implements the complete Inner Circle Trader (ICT) methodology for professional day trading and swing trading. Combining Fair Value Gaps, Order Blocks, Break of Structure analysis, and multi-timeframe trend confirmation with ADX, this tool provides institutional-grade market analysis for serious traders.
🎯 Key Features
Fair Value Gaps (FVG)
3-Candle Pattern Detection: Automatically identifies bullish and bearish Fair Value Gaps
Mitigation Tracking: Monitors when gaps get filled and changes visual appearance
ATR Filtering: Optional filter to eliminate noise using Average True Range
Visual Boxes: Color-coded FVG zones with customizable transparency and styles
Midline Support: Optional midlines for precise entry timing
Order Blocks (Institutional Zones)
Algorithmic Detection: Identifies institutional buying and selling zones
Visual Representation: Clear boxes marking significant price levels
Customizable Styling: Full control over colors, borders, and transparency
Multi-Timeframe Awareness: Works across all timeframes
Break of Structure (BOS)
Trend Change Detection: Identifies when market structure shifts
Change of Character (CHoCH): Detects momentum changes
Visual Labels: Clear BOS arrows with customizable appearance
Swing Analysis: Uses pivot points for accurate structure identification
Multi-Timeframe Analysis
ADX Trend Confirmation: Current timeframe + higher timeframe ADX analysis
Signal Alignment: Only fires signals when multiple timeframes agree
Weekly & 4HR Context: Previous candle boxes for higher timeframe structure
Dynamic Updates: Boxes automatically update as new candles form
Premium/Discount Zones
Institutional Price Levels: Identifies where smart money operates
Equilibrium Line: Central balance point for market structure
Color-Coded Zones: Visual representation of premium (sell) and discount (buy) areas
Range Analysis: Shows current price position relative to key levels
Central Pivot Range (CPR) Analysis
Range Classification: Identifies NARROW, NORMAL, or BROAD market conditions
Volatility Context: Helps adapt trading strategy to current market state
Visual Indicators: Color-coded range display with customizable thresholds
Percentage-Based: Universal application across all markets and timeframes
Previous Candle Boxes
4HR Candle Box: Yellow dotted box showing previous 4-hour candle range
Weekly Candle Box: Green dotted box displaying previous weekly candle range
Dynamic Updates: Automatically repositions as new candles complete
Reference Levels: Key support/resistance from higher timeframes
⚙️ Customization Options
Complete Visual Control
Colors: Individual color settings for every visual element
Transparency: Adjustable transparency for all boxes and fills
Line Styles: Solid, dashed, or dotted options for borders and lines
Line Widths: Customizable thickness for all visual elements
Label Sizes: Tiny to Large sizing options for all text elements
Information Table
Comprehensive Metrics: Real-time display of all key indicators
Positioning: 6 different table positions to suit your layout
Transparency Control: Adjustable background and header transparency
Color Customization: Full control over table appearance
Toggle Display: Show/hide table as needed
Alert System
FVG Alerts: New Fair Value Gap formations
Order Block Alerts: Institutional zone creation
BOS Alerts: Structure breaks and trend changes
Multi-Timeframe Signals: Strong buy/sell confirmations
Zone Alerts: Entry into premium/discount areas
📈 How to Use
For Day Traders
Enable Kill Zones: Focus on London (3-4 AM), NY AM (10-11 AM), NY PM (2-3 PM)
Watch FVG Formation: Look for gaps during high-impact news or market opens
Confirm with ADX: Ensure trend strength >25 on both current and higher timeframes
Trade Premium/Discount: Buy in discount zones, sell in premium zones
Use CPR Analysis: Adapt strategy based on range conditions
For Swing Traders
Focus on Higher Timeframes: Use 4HR and Weekly candle boxes for context
Order Block Priority: Trade from significant institutional zones
Structure Breaks: Enter positions after confirmed BOS signals
Multi-Timeframe Alignment: Wait for all timeframes to agree
Signal Interpretation
🔥 BUY Signals: Bullish FVG + ADX uptrend + discount zone + kill zone active
🔥 SELL Signals: Bearish FVG + ADX downtrend + premium zone + kill zone active
BOS Labels: Trend change confirmations for position adjustments
CPR Status: Market volatility context for strategy adaptation
🎓 Educational Value
This indicator serves as a comprehensive educational tool for learning ICT concepts:
Visual Learning: See ICT theory applied in real-time
Pattern Recognition: Develop skills in identifying institutional behavior
Risk Management: Understand proper entry and exit zones
Market Structure: Learn to read price action like institutions
⚡ Technical Specifications
Pine Script v6: Latest version for optimal performance
Multi-Timeframe: Seamlessly integrates multiple timeframe analysis
Resource Efficient: Optimized for maximum visual elements without lag
Universal Application: Works on all markets (Forex, Indices, Crypto, Stocks)
Real-Time Updates: Dynamic calculations and visual updates
📊 Performance Features
Maximum Elements: Supports 500 boxes, lines, and labels simultaneously
Memory Management: Automatic cleanup of old elements
Efficient Calculations: Optimized algorithms for smooth performance
Scalable Design: Works equally well on 1-minute to daily charts
🎯 Ideal For
ICT methodology students and practitioners
Day traders seeking institutional market insights
Swing traders needing multi-timeframe context
Professional traders requiring comprehensive market analysis
Anyone looking to understand smart money behavior
Disclaimer: This indicator is for educational purposes. Past performance does not guarantee future results. Always practice proper risk management and never risk more than you can afford to lose.
Support: For questions about ICT methodology, refer to Michael J. Huddleston's educational content. This indicator implements his concepts for practical trading application.
% of stocks in spx above 200 ma— Simplified (30/70 levels)S5TH Breadth Suite — Simplified (30/70 Levels)
This indicator tracks the S&P 500 % of stocks above their 200-day moving average (S5TH), plotted on a 0–100 scale.
• Line Plot: Blue line shows the breadth percentage.
• Key Levels:
• 70 → Overbought zone
• 50 → Neutral midpoint
• 30 → Oversold zone
• Background Shading:
• Red tint = Oversold (<30)
• Green tint = Overbought (>70)
• Signals & Alerts:
• Circles mark midline crossovers.
• Arrows show exits from extreme zones (oversold/overbought).
• Alerts can be set for each condition.
✅ Clean design — no moving averages.
✅ Helps spot breadth extremes, reversals, and trend shifts.
✅ Works on any timeframe (default is chart TF).
Prev RTH FibsThis study captures the previous day’s Regular Trading Hours (RTH) range (default 09:30–16:00 America/New_York), then projects it onto the current session. It draws HIGH, LOW, and an optional 50% midpoint, plus a configurable set of inside fib-style percentages measured from the HIGH downward. Every level extends a short distance to the right of the current price and shows a clean numeric label (no box) on the right edge.
Key features
Prev-day RTH range tracked automatically; plotted each new session.
Inside levels (from HIGH ↓): 11%, 25%, 29.5%, 38.2%, 45%, 55%, 62% (OTE), 70.5%, 75%, 78.6%, 85% (toggle any on/off).
Clean right-side labels: numbers only, resizable (Tiny → Huge) with transparent background.
Line styling: HIGH/LOW and 50% are solid; inside levels can be Solid/Dashed/Dotted with independent color/width.
Smart right padding: lines/labels extend a few bars past the latest candle, so annotations stay beside price without violating TradingView’s “>500 bars in future” rule.
Works on any symbol/timeframe; RTH window and timezone are adjustable.
Inputs you control
Session: RTH session string and timezone.
Right-side padding (bars) and number size.
Visibility & style for HIGH, LOW, and 50%.
Which inside levels to show, plus their style/color/width.
HorizonSigma Pro [CHE]HorizonSigma Pro
Disclaimer
Not every timeframe will yield good results . Very short charts are dominated by microstructure noise, spreads, and slippage; signals can flip and the tradable edge shrinks after costs. Very high timeframes adapt more slowly, provide fewer samples, and can lag regime shifts. When you change timeframe, you also change the ratios between horizon, lookbacks, and correlation windows—what works on M5 won’t automatically hold on H1 or D1. Liquidity, session effects (overnight gaps, news bursts), and volatility do not scale linearly with time. Always validate per symbol and timeframe, then retune horizon, z-length, correlation window, and either the neutral band or the z-threshold. On fast charts, “components” mode adapts quicker; on slower charts, “super” reduces noise. Keep prior-shift and calibration enabled, monitor Hit Rate with its confidence interval and the Brier score, and execute only on confirmed (closed-bar) values.
For example, what do “UP 61%” and “DOWN 21%” mean?
“UP 61%” is the model’s estimated probability that the close will be higher after your selected horizon—directional probability, not a price target or profit guarantee. “DOWN 21%” still reports the probability of up; here it’s 21%, which implies 79% for down (a short bias). The label switches to “DOWN” because the probability falls below your short threshold. With a neutral-band policy, for example ±7%, signals are: Long above 57%, Short below 43%, Neutral in between. In z-score mode, fixed z-cutoffs drive the call instead of percentages. The arrow length on the chart is an ATR-scaled projection to visualize reach; treat it as guidance, not a promise.
Part 1 — Scientific description
Objective.
The indicator estimates the probability that price will be higher after a user-defined horizon (a chosen number of bars) and emits long, short, or neutral decisions under explicit thresholds. It combines multi‑feature, z‑normalized inputs, adaptive correlation‑based weighting, a prior‑shifted sigmoid mapping, optional rolling probability calibration, and repaint‑safe confirmation. It also visualizes an ATR‑scaled forward projection and prints a compact statistics panel.
Data and labeling.
For each bar, the target label is whether price increased over the past chosen horizon. Learning is deliberately backward‑looking to avoid look‑ahead: features are associated with outcomes that are only known after that horizon has elapsed.
Feature engineering.
The feature set includes momentum, RSI, stochastic %K, MACD histogram slope, a normalized EMA(20/50) trend spread, ATR as a share of price, Bollinger Band width, and volume normalized by its moving average. All features are standardized over rolling windows. A compressed “super‑feature” is available that aggregates core trend and momentum components while penalizing excessive width (volatility). Users can switch between a “components” mode (weighted sum of individual features) and a “super” mode (single compressed driver).
Weighting and learning.
Weights are the rolling correlations between features (evaluated one horizon ago) and realized directional outcomes, smoothed by an EMA and optionally clamped to a bounded range to stabilize outliers. This produces an adaptive, regime‑aware weighting without explicit machine‑learning libraries.
Scoring and probability mapping.
The raw score is either the weighted component sum or the weighted super‑feature. The score is standardized again and passed through a sigmoid whose steepness is user‑controlled. A “prior shift” moves the sigmoid’s midpoint to the current base rate of up moves, estimated over the evaluation window, so that probabilities remain well‑calibrated when markets drift bullish or bearish. Probabilities and standardized scores are EMA‑smoothed for stability.
Decision policy.
Two modes are supported:
- Neutral band: go long if the probability is above one half plus a user‑set band; go short if it is below one half minus that band; otherwise stay neutral.
- Z‑score thresholds: use symmetric positive/negative cutoffs on the standardized score to trigger long/short.
Repaint protection.
All values used for decisions can be locked to confirmed (closed) bars. Intrabar updates are available as a preview, but confirmed values drive evaluation and stats.
Calibration.
An optional rolling linear calibration maps past confirmed probabilities to realized outcomes over the evaluation window. The mapping is clipped to the unit interval and can be injected back into the decision logic if desired. This improves reliability (probabilities that “mean what they say”) without necessarily improving raw separability.
Evaluation metrics.
The table reports: hit rate on signaled bars; a Wilson confidence interval for that hit rate at a chosen confidence level; Brier score as a measure of probability accuracy; counts of long/short trades; average realized return by side; profit factor; net return; and exposure (signal density). All are computed on rolling windows consistent with the learning scheme.
Visualization.
On the chart, an arrowed projection shows the predicted direction from the current bar to the chosen horizon, with magnitude scaled by ATR (optionally scaled by the square‑root of the horizon). Labels display either the decision probability or the standardized score. Neutral states can display a configurable icon for immediate recognition.
Computational properties.
The design relies on rolling means, standard deviations, correlations, and EMAs. Per‑bar cost is constant with respect to history length, and memory is constant per tracked series. Graphical objects are updated in place to obey platform limits.
Assumptions and limitations.
The method is correlation‑based and will adapt after regime changes, not before them. Calibration improves probability reliability but not necessarily ranking power. Intrabar previews are non‑binding and should not be evaluated as historical performance.
Part 2 — Trader‑facing description
What it does.
This tool tells you how likely price is to be higher after your chosen number of bars and converts that into Long / Short / Neutral calls. It learns, in real time, which components—momentum, trend, volatility, breadth, and volume—matter now, adjusts their weights, and shows you a probability line plus a forward arrow scaled by volatility.
How to set it up.
1) Choose your horizon. Intraday scalps: 5–10 bars. Swings: 10–30 bars. The default of 14 bars is a balanced starting point.
2) Pick a feature mode.
- components: granular and fast to adapt when leadership rotates between signals.
- super: cleaner single driver; less noise, slightly slower to react.
3) Decide how signals are triggered.
- Neutral band (probability based): intuitive and easy to tune. Widen the band for fewer, higher‑quality trades; tighten to catch more moves.
- Z‑score thresholds: consistent numeric cutoffs that ignore base‑rate drift.
4) Keep reliability helpers on. Leave prior shift and calibration enabled to stabilize probabilities across bullish/bearish regimes.
5) Smoothing. A short EMA on the probability or score reduces whipsaws while preserving turns.
6) Overlay. The arrow shows the call and a volatility‑scaled reach for the next horizon. Treat it as guidance, not a promise.
Reading the stats table.
- Hit Rate with a confidence interval: your recent accuracy with an uncertainty range; trust the range, not only the point.
- Brier Score: lower is better; it checks whether a stated “70%” really behaves like 70% over time.
- Profit Factor, Net Return, Exposure: quick triage of tradability and signal density.
- Average Return by Side: sanity‑check that the long and short calls each pull their weight.
Typical adjustments.
- Too many trades? Increase the neutral band or raise the z‑threshold.
- Missing the move? Tighten the band, or switch to components mode to react faster.
- Choppy timeframe? Lengthen the z‑score and correlation windows; keep calibration on.
- Volatility regime change? Revisit the ATR multiplier and enable square‑root scaling of horizon.
Execution and risk.
- Size positions by volatility (ATR‑based sizing works well).
- Enter on confirmed values; use intrabar previews only as early signals.
- Combine with your market structure (levels, liquidity zones). This model is statistical, not clairvoyant.
What it is not.
Not a black‑box machine‑learning model. It is transparent, correlation‑weighted technical analysis with strong attention to probability reliability and repaint safety.
Suggested defaults (robust starting point).
- Horizon 14; components mode; weight EMA 10; correlation window 500; z‑length 200.
- Neutral band around seven percentage points, or z‑threshold around one‑third of a standard deviation.
- Prior shift ON, Calibration ON, Use calibrated for decisions OFF to start.
- ATR multiplier 1.0; square‑root horizon scaling ON; EMA smoothing 3.
- Confidence setting equivalent to about 95%.
Disclaimer
No indicator guarantees profits. HorizonSigma Pro is a decision aid; always combine with solid risk management and your own judgment. Backtest, forward test, and size responsibly.
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Enhance your trading precision and confidence 🚀
Best regards
Chervolino
Major & Modern Wars TimelineDescription:
This indicator overlays vertical lines and labels on your chart to mark the start and end dates of major global wars and modern conflicts.
Features:
Displays start (red line + label) and end (green line + label) for each war.
Covers 20th century wars (World War I, World War II, Korean War, Vietnam War, Gulf War, Afghanistan, Iraq).
Includes modern conflicts: Syrian Civil War, Ukraine War, and Israel–Hamas War.
For ongoing conflicts, the end date is set to 2025 for timeline visualization.
Customizable: label position (above/below bar), line width.
Works on any chart timeframe, overlaying events on financial data.
Use case:
Useful for historical market analysis (e.g., gold, oil, S&P 500), helping traders and researchers see how wars and conflicts align with market movements.
Major & Modern Wars TimelineDescription:
This indicator overlays vertical lines and labels on your chart to mark the start and end dates of major global wars and modern conflicts.
Features:
Displays start (red line + label) and end (green line + label) for each war.
Covers 20th century wars (World War I, World War II, Korean War, Vietnam War, Gulf War, Afghanistan, Iraq).
Includes modern conflicts: Syrian Civil War, Ukraine War, and Israel–Hamas War.
For ongoing conflicts, the end date is set to 2025 for timeline visualization.
Customizable: label position (above/below bar), line width.
Works on any chart timeframe, overlaying events on financial data.
Use case:
Useful for historical market analysis (e.g., gold, oil, S&P 500), helping traders and researchers see how wars and conflicts align with market movements.
Index Position Size Calculator for [US30 / US100 / SP500]What it does
This tool helps you size positions consistently for index trades on US30 (Dow Jones), NAS100 (Nasdaq-100), and SP500 (S&P 500). Enter your account balance, risk %, and your planned Entry / Stop-Loss / Target and the script calculates:
• Position Size (rounded to your lot/contract step)
• Risk-to-Reward (R/R)
• Potential P/L in USD based on your inputs
• Visual Entry / SL / TP lines with green/red zones and concise labels
Supported contract styles
Choose a preset for common products (e.g., CFD $1/pt, YM/NQ/ES futures, MYM/MNQ/MES micros) or override the economics yourself. You remain in control of the two key levers:
• $/point — how many dollars you gain/lose per 1 index point per contract/lot
• Point size — how many price units equal 1 index point on your chart (often 1.0, but some brokers use 0.1 or 0.5)
Inputs
• Account Balance ($) and Risk % per trade
• Index: US30 / NAS100 / SP500
• Contract: CFD / Futures (YM, NQ, ES) / Micros (MYM, MNQ, MES)
• $/point: auto from Contract or manual override
• Point size: auto from Index or manual override
• Position size step: rounding (e.g., 1 for futures, 0.01 for CFDs)
• Entry / SL / TP: typed values (snapped to tick), with on-chart zones and labels
• Display toggles for lines and labels
How the math works
• StopPoints = |Entry − SL| ÷ PointSize
• ProfitPoints = |TP − Entry| ÷ PointSize
• Position Size = (AccountBalance × Risk%) ÷ (StopPoints × $/point)
• R/R = ProfitPoints ÷ StopPoints
• Potential P/L = PositionSize × Points × $/point
How to use (quick start)
1. Select Index and Contract.
2. Confirm $/point and Point size match your broker’s specs.
3. Enter Entry / SL / TP for the trade idea.
4. Read the Position Size, R/R, and Potential P/L in the info box.
5. Adjust for fees, spreads, and slippage as needed.
Notes & limitations
• Broker symbols can vary. Always verify $/point and Point size for your instrument before risking capital.
• The script does not place orders and does not generate trade signals; it’s a sizing/visualization tool.
• Results can differ across brokers due to pricing, spreads, minimum lot sizes, and execution rules.
• Use on the intended indices; you’ll see a reminder if you load it elsewhere.
Changelog highlights
• Pine v6, constant-safe inputs, tick-snapping, global fills (no local-scope errors).
• Robust label handling and optional minimal chart markers.
Disclaimer
This script is provided for educational purposes only and does not constitute financial advice or a recommendation to buy or sell any security or derivative. Trading involves risk, including the possible loss of principal. Always do your own research, verify contract specifications with your broker, and consider testing in a demo environment before trading live.