Open Interest:CME e-o-d vs CFTC e-o-wCFTC only publishes total OI on fridays, related to last Tuesday.
But what happened since last Tuesday?
CME Vol & Open Interest data is recorded&exported daily by quandl.com to tradingview
via the che CHRIS/CME datasets
www.quandl.com
Eg. Nat Gas next outstanding cntract n. 20, field n. 7(OI)
@quandl.com:
www.quandl.com
is exported @tradingview:
www.tradingview.com
Every outstanding contract's OI & vol is exported (black column), but not the total (yellow line):
tiny.cc
This script sums up all the existing outstanding contract's OI for the future (the black column), so one can have an idea of the total OI for the day (Yellow line).
As numer of outstanding contracts varies from future to future,Eg:
E-mini (ES) has 4 contracts, Gold(GC) 16 cntrcts, NatGas(NG) has 43, WTI(CL) has 38 etc
the scrips tries to guess how many exist for it and sums them up, to have the total OI for tha day
Number ofoutstanding contracts exported by quandl.com to tradingview is taken from
s3.amazonaws.com
There are 2 params you can enter on the script:
* override the ticket symbol on the chart ,if script cannot guessit or you need a different one
* enter the "preliminary" OI that is published by CME early the next day, butb not yet exported by quandl to tradingview
This script is Open so anyone can copy and modifyit for its use.
Please post comments and ideas if you find it useful
I try to keep a log of my work here:
Search in scripts for "tradingview+筹码结构"
Zindarra Multi Alerts Advanced (8 Symbols, 8 Levels) by RRBZindarra Multi Alerts Advanced by RRB by RagingRocketBull 2018
Version 1.0
This indicator lets you configure multiple alert levels for several assets. Zindarra Multi Alerts Advanced supports 8 symbols with 8 custom alert levels.
You can have an M:M relationship betweeen symbols and levels, for example:
- 4 symbols each boxed by 2 alerts above/below the price
- 3 symbols with 1 alert each
- 2 symbols, 1st with 2 alerts, 2nd - with 6 alerts
- 1 symbol with 8 alerts etc
There are several versions: Simple, Pro, Advanced and Ultimate. This is the Advanced version. The Differences are listed below.
- Simple: 10 Alert Levels, 1 plot mode, alert type: cross, no colors/triggered alerts
- Pro: 9 Alert Levels, 2 plot modes: plot/price line, alert type: cross, +change/swap colors, +hide/disable triggered alerts, 2 penetration modes (close, high/low), trigger on confirmed close
- Advanced: 8 Symbols/Tickers, 8 Alert Levels, +alert types: cross up/cross down, no color change. Display sources as lines/candles, normalize, scale/shift independently
- Ultimate: 5 Symbols/Tickers, 8 Alert Levels, +alert types: volume/price %/abs change, volume/ema/time cross
Features:
- 8 custom symbols, symbols:levels = M:M
- 8 custom alert levels with labels. For each alert there must be a corresponding non-empty symbol (can be a duplicate)
- alert types: cross/cross up/cross down
- normalize symbols (and alert levels) to 100% to compare,
- scale and shift each symbol (and alert levels) to position on a chart independently
- 1 alert levels plot mode: plot
- 2 symbol types: line/candles
- colorize symbol candles
- high/low or close level penetration modes
- show/hide levels/labels
- keep or auto disable triggered alerts
- trigger alerts only after a confirmed close
You will see all symbols on a single chart at the same time with their corresponding alert levels. From this chart you can manage all alerts configured for multiple assets.
Although TradingView has 2 percentage scale modes (Percent, Indexed to 100), somehow they still fail to be usefull when comparing multiple assets.
This indicator lets you normalize all symbols to 100% making a direct single scale comparison between assets with vastly different price levels possible.
All alert levels will be normalized as well.
TradingView does not let you move the plots attached to left scale. When scaled they all remain stuck in the center and can't be moved vertically or relative to each other.
This indicator lets you position all symbols independently using individual scale and shift settings. For example, you can:
- split your screen in 3 horiz areas and have a symbol in each of them without overlapping or
- have several partially overlapping assets with different scale each or
- have all assets fully overlapping and normalized to the same 100% scale
You have to manually create an alert in Manage Alerts Panel and configure it to use with this indicator.
Free accounts are limited to only 1 alert slot and this indicator will take it (any existing alerts must be disabled/stopped).
Once the alert is configured, the indicator can be removed from chart to free a slot for another indicator, but you won't see the alert levels.
Usage:
1. attach indicator to a chart
2. define alert levels in UI settings
3. in TradingView's Manage Alerts panel on the right:
- for free accounts: disable/stop all existing alerts, you are limited to 1 alert slot only. Otherwise you won't be able to save.
- create a new Alert:
- select 'Multi Alerts' indicator name in the Condition dropdown box, leave Level 1 and Multi Alerts Cross as default options
- select 'Once Per Bar' or 'Once Per Minute' instead of 'Only Once' to trigger the alert multiple times
5. click Save. Your 9 alerts are enabled now.
Change Settings:
1. change levels/settings in UI. Any changes will also reset already triggered levels visibility.
2. in Manage Alerts panel:
- open/edit the alert you created
- select new instance of 'Multi Alerts' indicator name in the Condition dropdown box (appears at the bottom)
- check the Condition dropdown again - a single instance should remain selected.
3. click Save. Your alert settings are updated.
Notes on using alerts:
- attaching this indicator to a chart and configuring alert levels will not automatically enable the alerts - you have to manually create/configure a new alert in the Alerts Panel
- removing this indicator from chart will not disable the alerts, you have to manually disable the alert you created in the Alerts Panel
- your alert in the Alerts Panel uses another instance (copy) of indicator/settings. Any changes won't affect the alert. You have to manually update the alert every time you change any settings in the indicator.
- recompiling and attaching your own version of indicator will require creating a new Alert (delete the old one).
- alerts are designed to work in realtime. In replay mode you will see triggered alert levels hiding/changing colors but there will be no system alert messages. It's best to test the indicator in realtime on M1 (1 min) chart
- you will only see 1 system alert per bar/60 sec when multiple alert levels are crossed with a single bar or across several symbols at the same time. However all of these levels will hide in the indicator as expected.
- you can only see the alert levels when the indicator is attached to chart, they are not shown by the system alert.
- For source=high/low a directional level penetration is used automatically (crossunder/low and crossover/high). For source=close a standard bidirectional cross is used unless another alert type is specified.
- normalization breaks/distorts alert levels and symbol price - this is normal and is expected. To view the real price of alert levels uncheck normalize - the first 8 outputs are alert levels. Unnormalized levels are straight lines.
- you will see alerts from all symbols in the system alert message box of the current symbol - a bit confusing, but there's no workaround, you can't have a customized alert message for each symbol/level
- many tickers as arguments can stretch/break TradingView's Create New Alert dialog but it's still possible to push all required buttons and Save.
- duplicate symbols will be displayed by default. You can manually hide duplicates using show/hide flags.
- empty tickers (and corresponding alerts) are essentially disabled
1. uses plot*, cross*, barssince, highest, security, alertcondition
The Always Winning Holy Grail Strategy - Not (by ChartArt)How to win all the time if 1+1 = 2
The most upvoted strategies on Tradingview are those which seemingly work 100%, but they actually don't at all because they are repainting and would not work in live trading reality. They are using the multi-time-frame strategy testing bug and thereby trade during the backtest on close prices before the bar has closed in reality.
Top list of these cheating repainting strategies:
1569 upvotes ANN Strategy
877 upvotes Vdub FX SniperVX3 Strategy
481 upvotes Get Trend Strategy
I guess there are much more strategies among the top upvoted strategies on Tradingview which cheat with a multi-time-frame close price, but three examples are enough. The ANN Strategy uses the daily close price as multi-time-frame and cheats with that. The Vdub FX SniperVX3 Strategy uses the half-day (720 minute) close price to cheat and the Get Trend Strategy uses the 160 minute bar close for repaint cheating (at least here the author of this strategy explains that his strategy is only demo and would not work, which might be the reason why it has 1000 less upvotes than the ANN Strategy. I already wrote months ago a comment underneat these strategies to explain this issue but it hasn't stopped these strategies from getting more and more upvotes and staying in the top list.
I thought this way of cheating is lame, so I invented a new way to cheat my way to seemingly reach 100% profitable trades all the time by going long if 1+1 is equal to 2. Welcome to super wide stop losses. Simply use a extreme unrealistic large stop loss and take profit after a realistic amount of pips and according to Tradingview's current backtest module you win 100% all the time. Yay! :)
My recommendation for the Tradingview team is to add a function to let the user define a stop out and margin call level and maybe set a realistic setting as default, like 100%.
Please don't trade with this strategy!
Acc/Dist. Cloud with Fractal Deviation Bands by @XeL_ArjonaACCUMULATION / DISTRIBUTION CLOUD with MORPHIC DEVIATION BANDS
Ver. 2.0.beta.23:08:2015
by Ricardo M. Arjona @XeL_Arjona
DISCLAIMER
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm by Vadim Gimelfarb published at Stocks & Commodities V. 21:10 (68-72).
Custom Weighting Coefficient for Exponential Moving Average (nEMA) adaptation work by @XeL_Arjona with contribution help from @RicardoSantos at TradingView @pinescript chat room.
Morphic Numbers (PHI & Plastic) Pine Script adaptation from it's algebraic generation formulas by @XeL_Arjona
Fractal Deviation Bands idea by @XeL_Arjona
CHANGE LOG:
ACCUMULATION / DISTRIBUTION CLOUD: I decided to change it's name from the Buy to Sell Pressure. The code is essentially the same as older versions and they are the center core (VORTEX?) of all derived New stuff which are:
MORPHIC NUMBERS: The "Golden Ratio" expressed by the result of the constant "PHI" and the newer and same in characteristics "Plastic Number" expressed as "PN". For more information about this regard take a look at: HERE!
CUSTOM(K) EXPONENTIAL MOVING AVERAGE: Some code has cleaned from last version to include as custom function the nEMA , which use an additional input (K) to customise the way the "exponentially" is weighted from the custom array. For the purpose of this indicator, I implement a volatility algorithm using the Average True Range of last 9 periods multiplied by the morphic number used in the fractal study. (Golden Ratio as default) The result is very similar in response to classic EMA but tend to accelerate or decelerate much more responsive with wider bars presented in trending average.
FRACTAL DEVIATION BANDS: The main idea is based on the so useful Standard Deviation process to create Bands in favor of a multiplier (As John Bollinger used in it's own bands) from a custom array, in which for this case is the "Volume Pressure Moving Average" as the main Vortex for the "Fractallitly", so then apply as many "Child bands" using the older one as the new calculation array using the same morphic constant as multiplier (Like Fibonacci but with other approach rather than %ratios). Results are AWSOME! Market tend to accelerate or decelerate their Trend in favor of a Fractal approach. This bands try to catch them, so please experiment and feedback me your own observations.
EXTERNAL TICKER FOR VOLUME DATA: I Added a way to input volume data for this kind of study from external tickers. This is just a quicky-hack given that currently TradingView is not adding Volume to their Indexes so; maybe this is temporary by now. It seems that this part of the code is conflicting with intraday timeframes, so You are advised.
This CODE is versioned as BETA FOR TESTING PROPOSES. By now TradingView Admins are changing lot's of things internally, so maybe this could conflict with correct rendering of this study with special tickers or timeframes. I will try to code by itself just the core parts of this study in order to use them at discretion in other areas. ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingView accounts at: @XeL_Arjona
US recessionsDisplays US recessions from 1900 - 2014 listed here: www.nber.org
Unix timestamp generated using this service: unixtimestamp.50x.eu For beginn/end of recession always taken the 15th day of the particular calendar month.
Tradingview has a bug by using unix timestamp: I had to add "000.0" to each generated timestamp to display the date in the tradingview correctly. Once the bug will get corrected, this cript will no more work!
The bug is described here: getsatisfaction.com
Unfortunately tradingview does not allow to display any (forecasted) recession into the future and or with later dates then 1900! This is disappointing.
NOTE: I can not code at all. PLEASE modify this script as much as you like. Particular would be helpful, if:
- there is only one background colour to edit
- there are tickboxes, where you can deselect the particular recession with titles of such recessions
- perhaps electively be able to display the title of the particular recession directly on its background within the chart
Volume Trend AnalysisStudy Material for Volume Trend Analysis Dashboard
1. Introduction
This script is a complete volume-based technical analysis dashboard designed in TradingView, created under the guidelines of TradingView and aiTrendview. It combines multiple indicators—Volume, RSI, Supertrend, Buy/Sell Pressure, and Momentum—into a single visual dashboard.
The purpose is education and market observation, not guaranteed profits. Students using this tool should focus on understanding patterns, signals, and probabilities rather than treating them as fixed rules.
________________________________________
2. Core Components and Indicators
🔹 Volume Analysis
• Volume shows the number of shares/contracts traded in a specific period.
• The script compares today’s volume with historical averages (e.g., 20-day average).
• This helps identify whether trading activity is higher or lower than usual.
• Learning use: A student can track if high volume confirms a price breakout or if low volume suggests weak conviction.
• Combination:
o High price rise + High volume → Strong bullish move.
o Price rise + Low volume → Weak rally, may fail.
o Price fall + High volume → Strong selling pressure.
o Price fall + Low volume → Weak decline, may reverse.
________________________________________
🔹 RSI (Relative Strength Index)
• RSI measures momentum (0–100 scale).
• Above 70 = Overbought (possible selling zone).
• Below 30 = Oversold (possible buying zone).
• Around 50 = Neutral, sideways market.
• Learning use: Combine with volume—RSI near extremes with high volume often marks turning points.
• Combination:
o RSI < 30 + High buy pressure volume = Strong bounce probability.
o RSI > 70 + High sell pressure volume = Risk of reversal downward.
________________________________________
🔹 Supertrend
• Supertrend uses volatility (ATR) to show support/resistance bands.
• Price above = Bullish trend.
• Price below = Bearish trend.
• Learning use: New students can treat it as a dynamic stop-loss and trailing tool.
• Combination:
o Price > Supertrend + RSI > 50 + High buy volume = Safe bullish trend.
o Price < Supertrend + RSI < 50 + High sell volume = Safe bearish trend.
________________________________________
🔹 Buy/Sell Pressure
• The indicator splits volume into buying vs. selling portions based on price action.
• Shows % of buying volume vs. selling volume.
• Learning use: Students can visualize whether bulls or bears are dominating.
• Combination:
o Buying > 65% → Bulls stronger.
o Selling > 65% → Bears stronger.
o Balanced → Market indecisive (range-bound).
________________________________________
🔹 Momentum & Signal Status
• Momentum combines RSI and Supertrend to classify market as Bullish, Bearish, or Neutral.
• Buy/Sell signals are triggered on crossovers of price with Supertrend along with RSI conditions.
• Learning use: Beginners should not blindly trade these signals but track how often they succeed/fail under different market conditions.
• Combination:
o Bullish Momentum + Buy Signal + High Volume = Strong entry setup.
o Bearish Momentum + Sell Signal + High Volume = Strong short setup.
________________________________________
🔹 Volume Pace
• Compares current intraday volume with expected average progress.
• Above pace = Traders active earlier than usual.
• Below pace = Weak interest in current session.
• Learning use: Beginners can track whether moves are backed by real activity or just price manipulation.
• Combination:
o Above pace + Bullish signals = Reliable rally.
o Below pace + Bullish signals = Weak rally, avoid.
________________________________________
3. How to Use the Dashboard
• The dashboard consolidates all indicators into a simple table: Signals, Momentum, Position, Profit, Volume, Pressure, Levels, and Status.
• It helps beginners see different aspects of market condition at one glance.
• Instead of jumping between multiple charts, everything is available in one panel.
• Students can use this to practice observation, backtest signals, and record outcomes.
________________________________________
4. Educational Guidelines
1. Paper Trade First: Always test on virtual trading accounts before real money.
2. Record Outcomes: Note how each signal works in trending vs. sideways markets.
3. Combine with Chart Reading: This is not standalone—students must learn candlestick patterns, support/resistance, and fundamentals.
4. Avoid Overtrading: Just because a dashboard flashes “BUY” doesn’t mean to enter blindly.
5. Adapt Timeframes: Learn the difference between intraday vs. daily signals. Shorter timeframes = more noise.
________________________________________
5. Common Beginner Mistakes
• Blind Trading: Treating BUY/SELL signals as automatic entry/exit without analysis.
• Ignoring Volume: Not checking whether signals are backed by strong or weak volume.
• Overconfidence: Assuming 100% accuracy—no indicator is perfect.
• Misusing Alerts: Alerts help monitoring but don’t guarantee profitability.
________________________________________
6. Disclaimer
This indicator is created strictly for educational and learning purposes under TradingView and aiTrendview guidelines.
• It is not financial advice and should not be treated as a guaranteed profit-making tool.
• Past performance does not guarantee future results.
• Misuse of this indicator for blind speculation can result in financial loss.
• Always use it with proper risk management and independent judgment.
• For real trading decisions, consult a certified financial advisor.
________________________________________
✅ By studying this dashboard, students gain exposure to:
• How multiple indicators interact.
• How volume confirms or rejects price moves.
• How to build discipline by observing signals, not chasing them.
This makes the tool a training ground for market observation rather than a shortcut to quick profits.
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.
Algo + Trendlines :: Medium PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
Very important: sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
Usual colored line = 3+ "collision" points (= confirmed)
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos: www.reddit.com
Algo + Trendlines :: Long PeriodThis indicator helps me to avoid overlooking Trendlines / Algolines. So far it doesn't search explicitly for Algolines (I don't consider volume at all), but it's definitely now already not horribly bad.
These are meant to be used on logarithmic charts btw! The lines would be displayed wrong on linear charts.
The biggest challenge is that there are some technical restrictions in TradingView, f. e. a script stops executing if a for-loop would take longer than 0.5 sec.
So in order to circumvent this and still be able to consider as many candles from the past as possible, I've created multiple versions for different purposes that I use like this:
Algo + Trendlines :: Medium Period : This script looks for "temporary highs / lows" (meaning the bar before and after has lower highs / lows) on the daily chart, connects them and shows the 5 ones that are the closest to the current price (=most relevant). This one is good to find trendlines more thoroughly, but only up to 4 years ago.
Algo + Trendlines :: Long Period : This version looks instead at the weekly charts for "temporary highs / lows" and finds out which days caused these highs / lows and connects them, Taking data from the weekly chart means fewer data points to check whether a trendline is broken, which allows to detect trendlines from up to 12 years ago! Therefore it misses some trendlines. Personally I prefer this one with "Only Confirmed" set to true to really show only the most relevant lines. This means at least 3 candle highs / lows touched the line. These are more likely stronger resistance / support lines compared to those that have been touched only twice.
Very important: sometimes you might see dotted lines that suddenly stop after a few months (after 100 bars to be precise). This indicates you need to zoom further out for TradingView to be able to load the full line. Unfortunately TradingView doesn't render lines if the starting point was too long ago, so this is my workaround. This is also the script's biggest advantage: showing you lines that you might have missed otherwise since the starting bars were outside of the screen, and required you to scroll f. e back to 2015..
One more thing to know:
Weak colored line = only 2 "collision" points with candle highs/lows (= not confirmed)
Usual colored line = 3+ "collision" points (= confirmed)
Make sure to move this indicator above the ticker in the Object Tree, so that it is drawn on top of the ticker's candles!
More infos: www.reddit.com
Volume Heat ZoneVolume Zones Indicator
This Pine Script creates a volume-based zone analysis tool for TradingView.
Function:
Divides the price range (high to low) into 20 levels over a 100-candle lookback period
Measures volume activity at each price level
Draws boxes at levels with above-average volume (1.5x threshold)
Key Settings:
Lookback Period (100): Number of candles analyzed
Price Levels (20): Price range subdivisions
Volume Threshold (1.5): Minimum volume multiplier for zones
Candle Offset (1): Excludes current candle from analysis
Projection Bars (10): Extends boxes 10 bars into the future
How it works:
The indicator identifies price levels where significant trading volume occurred historically, highlighting potential support/resistance zones. Boxes are redrawn on each confirmed candle, showing dynamic volume concentration areas that traders can use for entry/exit decisions.
Crypto Perp Calc v1Advanced Perpetual Position Calculator for TradingView
Description
A comprehensive position sizing and risk management tool designed specifically for perpetual futures trading. This indicator eliminates the confusion of calculating leveraged positions by providing real-time position metrics directly on your chart.
Key Features:
Interactive Price Selection: Click directly on chart to set entry, stop loss, and take profit levels
Accurate Lot Size Calculation: Instantly calculates the exact position size needed for your margin and leverage
Multiple Entry Support: DCA into positions with up to 3 entry points with customizable allocation
Multiple Take Profit Levels: Scale out of positions with up to 3 TP targets
Comprehensive Risk Metrics: Shows dollar P&L, account risk percentage, and liquidation price
Visual Risk/Reward: Color-coded boxes and lines display your trade setup clearly
Real-time Info Table: All critical position data in one organized panel
Perfect for traders using perpetual futures who need precise position sizing with leverage.
---------
How to Use
Quick Start (3 Clicks)
1. Add the indicator to your chart
2. Click three times when prompted:
First click: Set your entry price
Second click: Set your stop loss
Third click: Set your take profit
3. Read the TOTAL LOTS value from the info table (highlighted in yellow)
4. Use this lot size in your exchange when placing the trade
Detailed Setup
Step 1: Configure Your Account
Enter your account balance (total USDT in account)
Set your margin amount (how much USDT to risk on this trade)
Choose your leverage (1x to 125x)
Select Long or Short position
Step 2: Set Price Levels
Main levels use interactive clicking (Entry, SL, TP)
For multiple entries or TPs, use the settings panel to manually input prices and percentages
Step 3: Read the Results
The info table shows:
TOTAL LOTS - The position size to enter on your exchange
Margin Used - Your actual capital at risk
Notional - Total position value (margin × leverage)
Max Risk - Dollar amount you'll lose at stop loss
Total Profit - Dollar amount you'll gain at take profit
R:R Ratio - Risk to reward ratio
Account Risk - Percentage of account at risk
Liquidation - Price where position gets liquidated
Step 4: Advanced Features (Optional)
Multiple Entries (DCA):
Enable "Use Multiple Entries"
Set up to 3 entry prices
Allocate percentage for each (must total 100%)
See individual lot sizes for each entry
Multiple Take Profits:
Enable "Use Multiple TPs"
Set up to 3 TP levels
Allocate percentage to close at each level (must total 100%)
View profit at each target
Visual Elements
Blue lines/labels: Entry points
Red lines/labels: Stop loss
Green lines/labels: Take profit targets
Colored boxes: Visual risk (red) and reward (green) zones
Info table: Can be positioned anywhere on screen
Alerts
Set price alerts for:
Entry zones reached
Stop loss approached
Take profit levels hit
Works with TradingView's alert system
Tips for Best Results
Always verify the lot size matches your intended risk
Check the liquidation price stays far from your stop loss
Monitor the account risk percentage (recommended: keep under 2-3%)
Use the warning indicators if risk exceeds margin
For quick trades, use single entry/TP; for complex strategies, use multiple levels
Example Workflow
Find your trade setup using your analysis
Add this indicator and click to set levels
Check risk metrics in the table
Copy the TOTAL LOTS value
Enter this exact position size on your exchange
Set alerts for key levels if desired
This tool bridges the gap between TradingView charting and exchange execution, ensuring your position sizing is always accurate when trading with leverage.
Disclaimer, this was coded with help of AI, double check calculations if they are off.
BTC/USD 3分バイナリー予測【完全修正版v7.2】## BTC/USD 3-Minute Binary Prediction Indicator v7.2 Documentation
### Overview
This indicator predicts whether BTCUSD price will move ±$25 or more within 3 minutes using a 5-layer filter system and pattern recognition. Designed for 30-second timeframe analysis with statistical tracking.
### ⚠️ Critical Warnings
- **This is a prediction tool, NOT a profit guarantee**
- **30-second timeframe ONLY** (Will not function correctly on other timeframes)
- **BTCUSD pair ONLY**
- **Past performance does not guarantee future results**
- **Test thoroughly in demo before live trading**
- **You can lose your entire investment**
### Core Components
#### 1. Five-Layer Filter System
```
Layer 1: Trend Alignment (25 points) - EMA configuration analysis
Layer 2: Indicator Confluence (25 points) - RSI + MACD confirmation
Layer 3: Volume Analysis (20 points) - Abnormal volume detection
Layer 4: Key Levels (15 points) - Support/Resistance proximity
Layer 5: Momentum (15 points) - Price acceleration measurement
```
#### 2. Pattern Recognition Engine
- Double Top/Bottom formations
- Triangle patterns (Symmetrical, Ascending, Descending)
- Channel patterns
- Candlestick patterns (Engulfing, Hammer, Hanging Man)
#### 3. Performance Tracking
- Overall win rate
- Hourly performance
- Daily performance
- Real-time statistics
### Input Parameters
#### Basic Settings
- `Range Width ($)`: Target price movement (Default: $50 = ±$25)
- `Minimum Confidence (%)`: Required confidence for entry (Default: 75%)
- `Max Daily Trades`: Overtrading prevention (Default: 5)
#### Filter Settings
- `Trend Filter`: EMA alignment validation
- `Volume Confirmation`: Volume spike detection
- `S/R Filter`: Key level analysis
- `Momentum Alignment`: Directional strength confirmation
#### Display Settings
- `Minimal Mode`: Reduced visual elements for experienced users
- `Pattern Display`: Visual pattern overlays
- `EMA Lines`: Moving average visualization
### Usage Instructions
#### Setup Process
1. Open BTCUSD chart on TradingView
2. **Set timeframe to 30 seconds** (CRITICAL)
3. Add indicator to chart
4. Adjust parameters if needed
#### Reading Signals
**Decision Panel (Left Side)**
- `HIGH`: Predicts +$25 move in 3 minutes
- `LOW`: Predicts -$25 move in 3 minutes
- `WAIT`: Conditions building, no entry yet
- `STAY`: No trade opportunity
**F-Score Interpretation**
- 65+ points: Direction suggestion (light color)
- 80+ points: Strong signal (solid color)
- Entry ready: Exclamation mark (!)
**Statistics Panel (Right Side)**
- Win rate: Percentage of successful predictions
- 1H Stats: Last hour performance
- Daily Stats: Today's results
#### Entry Execution
1. Wait for `HIGH!` or `LOW!` in decision panel
2. Large arrow appears on chart (▲ for HIGH, ▼ for LOW)
3. Enter at **next candle open**
4. Result evaluated after 3 minutes (6 candles)
### Algorithm Logic
#### Early Entry System (v7.2 Feature)
The indicator uses predictive analysis starting at F-Score 65 instead of waiting for 80:
- Faster signal generation
- Reduced opportunity loss
- Slightly lower win rate trade-off
#### Confidence Calculation
```
Base confidence: 50%
+ Filter score bonus
+ Pattern recognition bonus
+ Volatility adjustment
- Risk factors
= Final confidence (50-95%)
```
### Technical Specifications
#### Multi-Timeframe Analysis
- Primary: 30-second chart
- Secondary: 1-minute data
- Reference: 5-minute trend
#### Data Processing
- Real-time tick analysis
- No repainting (signals are final)
- Historical verification system
### Limitations & Known Issues
1. **Spread/Commission Not Included**: Actual profits will be lower
2. **30-Second Noise**: High false signal risk on ultra-short timeframe
3. **Network Latency**: Execution delays not accounted for
4. **Market Conditions**: Performance varies with volatility
5. **Algorithm Trading**: Cannot compete with HFT systems
### Performance Metrics
- Target Win Rate: 83% (aspirational)
- Evaluation Period: 3 minutes
- Risk per trade: Fixed ±$25
- Maximum daily exposure: 5 trades
### Troubleshooting Guide
**No signals appearing?**
- Check F-Score (needs 65+)
- Verify 30-second timeframe
- Ensure BTCUSD pair selected
**Low win rate?**
- Only trade 75%+ confidence signals
- Respect daily trade limit
- Avoid news events
**Pattern shows "-"?**
- Normal when no clear pattern exists
- Not all market conditions produce patterns
### Code Modification Notes
Written in Pine Script v6. Key considerations for modifications:
- Global variables use `var` for persistence
- Drawing objects require manual management
- Bar counting varies by timeframe
- Pattern detection runs on confirmed bars only
### Risk Disclosure
**IMPORTANT**: Trading cryptocurrencies involves substantial risk of loss and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose.
### Support & Updates
- Report issues in TradingView comments
- Check for updates regularly
- Version 7.2 is current release
- Community feedback welcome
### Legal Notice
This indicator is provided for educational and research purposes only. It should not be construed as investment advice. The authors and distributors of this indicator accept no liability for losses incurred through its use. Always consult with a qualified financial advisor before making investment decisions.
---
*Version: 7.2*
*License: Mozilla Public License 2.0*
*Author: *
*Last Updated: 2024*
**FINAL WARNING: This indicator cannot predict the future. Use at your own risk. Start with demo trading. Never trade with money you cannot afford to lose.**
VXN Money Flow IndexThis indicator is based on other open source scripts. It's designed for trading Nasdaq futures (NQ and MNQ). It generates trading signals using the Money Flow Index (MFI), which measures buying and selling pressure based on price and volume. The VXN index (CBOE Nasdaq Volatility Index) filters signals to align with market sentiment.
- MFI Signals: Bullish signals occur when MFI crosses above the 20 level (oversold) and the VXN background is green (bullish sentiment). Bearish signals occur when MFI crosses below the 80 level (overbought) and the VXN background is red (bearish sentiment).
- VXN Filter: The background is green when the VXN 1-period EMA is below the 200-period SMA (bullish), and red when the EMA is above the SMA (bearish).
Usage: Apply this indicator to a Nasdaq futures chart in TradingView. Take long trades on MFI crossovers above 20 when the background is green, and short trades on MFI crossunders below 80 when the background is red. Signals are plotted as triangles on the price chart.
VXN RSI VWAP basedThis indicator is based on other open source scripts. It's designed for trading Nasdaq futures (NQ and MNQ). It generates trading signals based on the Relative Strength Index (RSI) calculated from multiple VWAP-based price series with different lengths. The VXN index (CBOE Nasdaq Volatility Index) is used to filter signals via background color.
- RSI Signals: Bullish signals occur when any RSI crosses above the 20 level (oversold), and bearish signals occur when any RSI crosses below the 80 level (overbought). These are plotted as green/red circles.
- VXN Filter: Traders should only take bullish signals (RSI > 20) when the background is green (VXN 1-period EMA < 200-period SMA, indicating bullish sentiment) and bearish signals (RSI < 80) when the background is red (VXN 1-period EMA > 200-period SMA, indicating bearish sentiment).
- Additional Signals: Optional signals are generated when all RSI lines are simultaneously bullish (green) or bearish (red), plotted as triangles if enabled.
Usage: Apply this indicator to a Nasdaq futures chart (NQ or MNQ) in TradingView. Wait for RSI crossovers above 20 when the background is green for long trades, and crossunders below 80 when the background is red for short trades. Adjust VWAP lengths, RSI length, and VXN settings to suit your trading strategy.
Strat Failed 2-Up/2-Down Scanner v2**Strat Failed 2-Up/2-Down Scanner**
The Strat Failed 2-Up/2-Down Scanner is designed for traders using The Strat methodology, developed by Rob Smith, to identify key reversal patterns in any market and timeframe. This indicator detects two specific candlestick patterns: Failed 2-Up (bearish) and Failed 2-Down (bullish), which signal potential reversals when a directional move fails to follow through.
**What It Does**
- **Failed 2-Up**: Identifies a bearish candle where the low and high are higher than the previous candle’s low and high, but the close is below the open, indicating a failed attempt to continue an uptrend. These are marked with a red candlestick, a red downward triangle above the bar, and a table entry.
- **Failed 2-Down**: Identifies a bullish candle where the high and low are lower than the previous candle’s high and low, but the close is above the open, signaling a failed downtrend. These are marked with a green candlestick, a green upward triangle below the bar, and a table entry.
- A table in the top-right corner displays the signal type ("Failed 2-Up" or "Failed 2-Down") and the ticker symbol for quick reference.
- Alerts are provided for both patterns, making the indicator compatible with TradingView’s screener for automated scanning.
**How It Works**
The indicator analyzes each candlestick’s high, low, and close relative to the previous candle:
- Failed 2-Up: `low > low `, `high > high `, `close < open`.
- Failed 2-Down: `high < high `, `low < low `, `close > open`.
When these conditions are met, the indicator applies visual markers (colored bars and triangles) and updates the signal table. Alert conditions trigger notifications for integration with TradingView’s alert system.
**How to Use**
1. Apply the indicator to any chart (stocks, forex, crypto, etc.) on any timeframe (e.g., 1-minute, hourly, daily).
2. Monitor the chart for red (Failed 2-Up) or green (Failed 2-Down) candlesticks with corresponding triangles.
3. Check the top-right table for the latest signal and ticker.
4. Set alerts by selecting “Failed 2-Up Detected” or “Failed 2-Down Detected” in TradingView’s alert menu to receive notifications (e.g., via email or app).
5. Use the signals to identify potential reversal setups in conjunction with other Strat-based analysis, such as swing levels or time-based strategies.
**Originality**
Unlike other Strat indicators that may focus on swing levels or complex candlestick combinations, this scanner specifically targets Failed 2-Up and Failed 2-Down patterns with clear, minimalist visualizations (bars, triangles, table) and robust alert functionality. Its simplicity makes it accessible for both novice and experienced traders using The Strat methodology.
**Ideal For**
Day traders, swing traders, and scalpers looking to capitalize on reversal signals in trending or ranging markets. The indicator is versatile for any asset class and timeframe, enhancing trade decision-making with The Strat’s pattern-based approach.
Same-Direction Candles (Two Symbols)Same-Direction Candles (Two Symbols)
What it does
Highlights bars on your chart when two symbols print the same candle direction on the chosen timeframe:
Both Bullish → one color
Both Bearish → another color
Great for spotting synchronous moves (e.g., NQ & ES, QQQ & SPY), or confirming risk-on/risk-off with an inverse asset (e.g., NQ vs DXY with inversion).
How it works
For each bar, the script checks whether close > open (bullish), close < open (bearish), or equal (doji) for:
The chart’s symbol
A second symbol pulled via request.security() (optionally on a different timeframe)
If both symbols are bullish, it paints Bull color; if both are bearish, it paints Bear color. Dojis can be ignored.
Inputs
Second symbol: Ticker to compare (e.g., CME_MINI:ES1!, NASDAQ:QQQ, TVC:DXY).
Second symbol timeframe: Leave blank to use the chart’s TF, or set a specific one (e.g., 5, 15, D).
Invert second symbol direction?: Flips the second symbol’s candle direction (useful for inversely related assets like DXY vs indices).
Ignore doji candles: Skip highlights when either candle is neutral (open == close).
Coloring options: Toggle bar coloring and/or background shading; pick colors; set background transparency.
Alerts
Three alert conditions:
Both Bullish
Both Bearish
Both Same Direction (bullish or bearish)
Create alerts from the Add Alert dialog after adding the script.
Use cases
Index confluence: NQ & ES moving in lockstep
ETF confirmation: QQQ & SPY agreement
FX/Index risk signals: Invert DXY against NQ/ES to see when equity strength aligns with dollar weakness
Tips
For mixed timeframes (e.g., chart on 1m, ES on 5m), set Second symbol timeframe to the higher TF to reduce noise.
Keep Ignore dojis on for cleaner signals.
Combine with your own entry rules (structure, FVGs, liquidity sweeps).
Notes
Works on any symbol/timeframe supported by TradingView.
Overlay script; no strategy/entries/exits are executed.
Past performance ≠ future results; for education only.
Version: 1.0 – initial release (bar/background highlights, doji filter, inversion, multi-TF support, alerts).
Quantum Trading MatrixThe Quantum Trading Matrix is a sophisticated Pine Script indicator designed for TradingView that offers a comprehensive trading dashboard by combining multiple market analysis techniques in one interface. The indicator integrates price action, volume, momentum, trend detection, institutional activity, and technical oscillators to provide traders a unified perspective on the market.
At its core, the script uses fundamental market data like price (open, high, low, close) and volume to calculate various metrics. The VWAP (Volume Weighted Average Price) is a key element that helps traders understand if the price is trading above or below the average price weighted by volume, indicating market strength or weakness. The distance of the current price from the VWAP is computed as a percentage to signal how far the price has diverged from this benchmark.
Momentum is measured through a "Quantum Momentum Oscillator" derived from the difference between fast and slow exponential moving averages of price. Positive momentum signals bullish conditions while negative momentum signals bearish ones. Volume flow analysis breaks down buying versus selling pressure on each bar by observing where the close price lies within the daily range combined with volume, generating an order flow ratio. This aids in identifying if buyers or sellers dominate the market at a given time.
Trend detection involves calculating EMAs of different lengths (8, 21, and 50) and aggregating their relationships into a trend score. Scores range from strong uptrend to downtrend, providing a clear directional bias. Institutional activity is inferred by detecting volume spikes significantly above the average volume, suggesting large players might be active. A dark pool estimate provides an approximate volume figure representing hidden or off-exchange trading.
The script also identifies market structure by detecting pivot highs and lows which act as resistance and support levels, respectively. These levels offer valuable insight into potential price reversals or breakouts. The RSI (Relative Strength Index) is incorporated, including a basic divergence detection to suggest potential bull or bear reversals. Volatility is measured using the Average True Range (ATR), classifying the current volatility from low to extreme, helping traders gauge the risk environment.
All these metrics are combined into a scoring system that awards points for positive indications such as price above VWAP, positive order flow, bullish momentum, and an uptrend in EMAs. The overall score ranges from 0 to 100 and is interpreted visually with emojis: a rocket for strong bullish setups, a chart up emoji for positive bias, a balanced scale for neutral, and a chart down emoji for bearish conditions.
The indicator issues alerts based on the combination of these signals, including bullish and bearish setups when multiple criteria align favorably, volume spike alerts when abnormal volume events occur, and institutional activity alerts for high volume surges.
To use this indicator effectively, traders should first assess the trend direction indicated by the EMA-based scoring. Positive momentum and price trading above the VWAP confirm bullish bias, while the opposite suggests bearishness. Volume flow and institutional activity provide additional confirmation. Support and resistance levels derived from pivots help in planning entries and exits. The RSI and volatility readings inform traders of potential overbought or oversold conditions and market risk levels. Alerts provide timely notifications to act on significant setups.
The indicator is highly customizable, allowing users to adjust the dashboard's position, size, and color theme to suit personal preferences. Parameters such as the momentum period, volume profile bars, trend multiplier, and signal sensitivity can be fine-tuned to adapt to different markets and trading styles.
This tool requires foundational knowledge of key technical concepts such as EMAs, VWAP, ATR, RSI, and volume analysis for best utilization. For traders interested in expanding their understanding, recommended resources include the TradingView Pine Script manual, technical analysis books by John J. Murphy and Dr. Alexander Elder, and practical video tutorials focusing on volume spread analysis and institutional order flow.
Overall, the Quantum Trading Matrix™ serves as a powerful control panel for active traders, providing a multi-dimensional view of the market through combined technical indicators, helping to identify high probability trade setups and manage risk effectively.
________________________________________
⚠️ Warning:
• Trading financial markets involves substantial risk.
• You can lose more money than you invest.
• Past performance of indicators does not guarantee future results.
• This script must not be copied, resold, or republished without authorization from aiTrendview.
By using this material or the code, you agree to take full responsibility for your trading decisions and acknowledge that this is not financial advice.
________________________________________
⚠️ Disclaimer and Warning (From aiTrendview)
This Dynamic Trading Dashboard is created strictly for educational and research purposes on the TradingView platform. It does not provide financial advice, buy/sell recommendations, or guaranteed returns. Any use of this tool in live trading is completely at the user’s own risk. Markets are inherently risky; losses can exceed initial investment.
The intellectual property of this script and its methodology belongs to aiTrendview. Unauthorized reproduction, modification, or redistribution of this code is strictly prohibited. By using this study material or the script, you acknowledge personal responsibility for any trading outcomes. Always consult professional financial advisors before making investment decisions.
Fractals + FVG [Combined]Звісно, ось варіант опису англійською, який можна використати для публікації індикатора в TradingView.
Description
This script combines two powerful and widely-used trading concepts into a single, comprehensive indicator: Bill Williams Fractals with dynamic support/resistance lines and Fair Value Gaps (FVG) based on the popular logic from LuxAlgo.
The goal is to provide a cleaner chart by merging two essential tools, allowing traders to analyze market structure and imbalances simultaneously.
Features
1. Williams Fractals with Invalidation Lines
This part of the indicator identifies classic Bill Williams fractals and enhances them with a unique visualization feature.
Fractal Detection: Automatically identifies both bullish (bottom) and bearish (top) fractals. You can choose between a 3-bar or 5-bar pattern in the settings.
Dynamic S/R Lines: A horizontal line is automatically drawn from every confirmed fractal, acting as a potential support or resistance level.
Automatic Invalidation: A line is considered "invalidated" or breached when the body of a candle closes past it. When this happens, the line stops extending, changes its color to the "invalidated" color, and remains on the chart as a historical reference. This provides a clear, objective signal that a level has been broken.
Customization: You can fully customize the colors for the support, resistance, and invalidated lines to match your chart theme.
2. Fair Value Gaps (FVG) / Imbalance
This module incorporates the robust FVG detection logic from LuxAlgo to automatically identify and display market imbalances.
FVG Detection: Highlights bullish and bearish Fair Value Gaps on the chart with colored boxes, representing inefficiencies in price delivery.
Automatic Mitigation: The FVG boxes are automatically removed from the chart once the price has "mitigated" or filled the gap, keeping your workspace clean and focused on active imbalances.
Multi-Timeframe (MTF): You can set the indicator to find and display FVGs from a higher timeframe directly on your current chart.
Dashboard: An optional on-screen dashboard provides a quick summary of the total count of bullish/bearish FVGs and the percentage that have been mitigated.
Full Customization: Control the colors of FVG boxes, extend their length, and configure other visual style settings.
How to Use
Fractal Lines: Use the active support and resistance lines as key levels for potential bounces or breaks. A line's invalidation can serve as confirmation of a shift in market structure.
FVG Zones: Fair Value Gaps often act as "magnets" for price. Use these zones as potential targets for your trades or as areas of interest for entries when price retraces to fill the imbalance.
Combined Strategy: The true power of this indicator comes from combining both concepts. For example, a bullish FVG forming near a key fractal support level can create a high-probability confluence zone for a long entry. Similarly, a break and invalidation of a fractal resistance line might signal that price is heading towards the next bearish FVG above.
This indicator is a tool for analysis and should be used in conjunction with your own trading strategy and risk management rules.
Multi-TF Trend Table (Configurable)1) What this tool does (in one minute)
A compact, multi‑timeframe dashboard that stacks eight timeframes and tells you:
Trend (fast MA vs slow MA)
Where price sits relative to those MAs
How far price is from the fast MA in ATR terms
MA slope (rising, falling, flat)
Stochastic %K (with overbought/oversold heat)
MACD momentum (up or down)
A single score (0%–100%) per timeframe
Alignment tick when trend, structure, slope and momentum all agree
Use it to:
Frame bias top‑down (M→W→D→…→15m)
Time entries on your execution timeframe when the higher‑TF stack is aligned
Avoid counter‑trend traps when the table is mixed
2) Table anatomy (each column explained)
The table renders 9 columns × 8 rows (one row per timeframe label you define).
TF — The label you chose for that row (e.g., Month, Week, 4H). Cosmetic; helps you read the stack.
Trend — Arrow from fast MA vs slow MA: ↑ if fastMA > slowMA (up‑trend), ↓ otherwise (down‑trend). Cell is green for up, red for down.
Price Pos — One‑character structure cue:
🔼 if price is above both fast and slow MAs (bullish structure)
🔽 if price is below both (bearish structure)
– otherwise (between MAs / mixed)
MA Dist — Distance of price from the fast MA measured in ATR multiples:
XS < S < M < L < XL according to your thresholds (see §3.3). Useful for judging stretch/mean‑reversion risk and stop sizing.
MA Slope — The fast MA one‑bar slope:
↑ if fastMA - fastMA > 0
↓ if < 0
→ if = 0
Stoch %K — Rounded %K value (default 14‑1‑3). Background highlights when it aligns with the trend:
Green heat when trend up and %K ≤ oversold
Red heat when trend down and %K ≥ overbought Tooltip shows K and D values precisely.
Trend % — Composite score (0–100%), the dashboard’s confidence for that timeframe:
+20 if trendUp (fast>slow)
+20 if fast MA slope > 0
+20 if MACD up (signal definition in §2.8)
+20 if price above fast MA
+20 if price above slow MA
Background colours:
≥80 lime (strong alignment)
≥60 green (good)
≥40 orange (mixed)
<40 grey (weak/contrary)
MACD — 🟢 if EMA(12)−EMA(26) > its EMA(9), else 🔴. It’s a simple “momentum up/down” proxy.
Align — ✔ when everything is in gear for that trend direction:
For up: trendUp and price above both MAs and slope>0 and MACD up
For down: trendDown and price below both MAs and slope<0 and MACD down Tooltip spells this out.
3) Settings & how to tune them
3.1 Timeframes (TF1–TF8)
Inputs: TF1..TF8 hold the resolution strings used by request.security().
Defaults: M, W, D, 720, 480, 240, 60, 15 with display labels Month, Week, Day, 12H, 8H, 4H, 1H, 15m.
Tips
Keep a top‑down funnel (e.g., Month→Week→Day→H4→H1→M15) so you can cascade bias into entries.
If you scalp, consider D, 240, 120, 60, 30, 15, 5, 1.
Crypto weekends: consider 2D in place of W to reflect continuous trading.
3.2 Moving Average (MA) group
Type: EMA, SMA, WMA, RMA, HMA. Changes both fast & slow MA computations everywhere.
Fast Length: default 20. Shorten for snappier trend/slope & tighter “price above fast” signals.
Slow Length: default 200. Controls the structural trend and part of the score.
When to change
Swing FX/equities: EMA 20/200 is a solid baseline.
Mean‑reversion style: consider SMA 20/100 so trend flips slower.
Crypto/indices momentum: HMA 21 / EMA 200 will read slope more responsively.
3.3 ATR / Distance group
ATR Length: default 14; longer makes distance less jumpy.
XS/S/M/L thresholds: define the labels in column MA Dist. They are compared to |close − fastMA| / ATR.
Defaults: XS 0.25×, S 0.75×, M 1.5×, L 2.5×; anything ≥L is XL.
Usage
Entries late in a move often occur at L/XL; consider waiting for a pullback unless you are trading breakouts.
For stops, an initial SL around 0.75–1.5 ATR from fast MA often sits behind nearby noise; use your plan.
3.4 Stochastic group
%K Length / Smoothing / %D Smoothing: defaults 14 / 1 / 3.
Overbought / Oversold: defaults 70 / 30 (adjust to 80/20 for trendier assets).
Heat logic (column Stoch %K): highlights when a pullback aligns with the dominant trend (oversold in an uptrend, overbought in a downtrend).
3.5 View
Full Screen Table Mode: centers and enlarges the table (position.middle_center). Great for clean screenshots or multi‑monitor setups.
4) Signal logic (how each datapoint is computed)
Per‑TF data (via a single request.security()):
fastMA, slowMA → based on your MA Type and lengths
%K, %D → Stoch(High,Low,Close,kLen) smoothed by kSmooth, then %D smoothed by dSmooth
close, ATR(atrLen) → for structure and distance
MACD up → (EMA12−EMA26) > EMA9(EMA12−EMA26)
fastMA_prev → yesterday/previous‑bar fast MA for slope
TrendUp → fastMA > slowMA
Price Position → compares close to both MAs
MA Distance Label → thresholds on abs(close − fastMA)/ATR
Slope → fastMA − fastMA
Score (0–100) → sum of the five 20‑point checks listed in §2.7
Align tick → conjunction of trend, price vs both MAs, slope and MACD (see §2.9)
Important behaviour
HTF values are sampled at the execution chart’s bar close using Pine v6 defaults (no lookahead). So the daily row updates only when a daily bar actually closes.
5) How to trade with it (playbooks)
The table is a framework. Entries/exits still follow your plan (e.g., S/D zones, price action, risk rules). Use the table to know when to be aggressive vs patient.
Playbook A — Trend continuation (pullback entry)
Look for Align ✔ on your anchor TFs (e.g., Week+Day both ≥80 and green, Trend ↑, MACD 🟢).
On your execution TF (e.g., H1/H4), wait for Stoch heat with the trend (oversold in uptrend or overbought in downtrend), and MA Dist not at XL.
Enter on your trigger (break of pullback high/low, engulfing, retest of fast MA, or S/D first touch per your plan).
Risk: consider ATR‑based SL beyond structure; size so 0.25–0.5% account risk fits your rules.
Trail or scale at M/L distances or when score deteriorates (<60).
Playbook B — Breakout with confirmation
Mixed stack turns into broad green: Trend % jumps to ≥80 on Day and H4; MACD flips 🟢.
Price Pos shows 🔼 across H4/H1 (above both MAs). Slope arrows ↑.
Enter on the first clean base‑break with volume/impulse; avoid if MA Dist already XL.
Playbook C — Mean‑reversion fade (advanced)
Use only when higher TFs are not aligned and the row you trade shows XL distance against the higher‑TF context. Take quick targets back to fast MA. Lower win‑rate, faster management.
Playbook D — Top‑down filter for Supply/Demand strategy
Trade first retests only in the direction where anchor TFs (Week/Day) have Align ✔ and Trend % ≥60. Skip counter‑trend zones when the stack is red/green against you.
6) Reading examples
Strong bullish stack
Week: ↑, 🔼, S/M, slope ↑, %K=32 (green heat), Trend 100%, MACD 🟢, Align ✔
Day: ↑, 🔼, XS/S, slope ↑, %K=45, Trend 80%, MACD 🟢, Align ✔
Action: Look for H4/H1 pullback into demand or fast MA; buy continuation.
Late‑stage thrust
H1: ↑, 🔼, XL, slope ↑, %K=88
Day/H4: only 60–80%
Action: Likely overextended on H1; wait for mean reversion or multi‑TF alignment before chasing.
Bearish transition
Day flips from 60%→40%, Trend ↓, MACD turns 🔴, Price Pos “–” (between MAs)
Action: Stand aside for longs; watch for lower‑high + Align ✔ on H4/H1 to join shorts.
7) Practical tips & pitfalls
HTF closure: Don’t assume a daily row changed mid‑day; it won’t settle until the daily bar closes. For intraday anticipation, watch H4/H1 rows.
MA Type consistency: Changing MA Type changes slope/structure everywhere. If you compare screenshots, keep the same type.
ATR thresholds: Calibrate per asset class. FX may suit defaults; indices/crypto might need wider S/M/L.
Score ≠ signal: 100% does not mean “must buy now.” It means the environment is favourable. Still execute your trigger.
Mixed stacks: When rows disagree, reduce size or skip. The tool is telling you the market lacks consensus.
8) Customisation ideas
Timeframe presets: Save layouts (e.g., Swing, Intraday, Scalper) as indicator templates in TradingView.
Alternative momentum: Replace the MACD condition with RSI(>50/<50) if desired (would require code edit).
Alerts: You can add alert conditions for (a) Align ✔ changes, (b) Trend % crossing 60/80, (c) Stoch heat events. (Not shipped in this script, but easy to add.)
9) FAQ
Q: Why do I sometimes see a dash in Price Pos? A: Price is between fast and slow MAs. Structure is mixed; seek clarity before acting.
Q: Does it repaint? A: No, higher‑TF values update on the close of their own bars (standard request.security behaviour without lookahead). Intra‑bar they can fluctuate; decisions should be made at your bar close per your plan.
Q: Which columns matter most? A: For trend‑following: Trend, Price Pos, Slope, MACD, then Stoch heat for entries. The Score summarises, and Align enforces discipline.
Q: How do I integrate with ATR‑based risk? A: Use the MA Dist label to avoid chasing at extremes and to size stops in ATR terms (e.g., SL behind structure at ~1–1.5 ATR).
Alerts to Google Sheetsa script that will send us alerts from TradingView. For simplicity, I’ve created a basic script that sends long/short signals for each bar, depending on its color. In this example, I construct the JSON manually using string concatenation. This is a straightforward example, but of course, you can create and run much more complex scripts if needed.
Crypto Macro CockpitCrypto Macro Cockpit — Institutional Liquidity Regime Detection
🔍 Overview
This script introduces a modern macro framework for crypto market regime detection, leveraging newly added stablecoin market data on TradingView. It’s designed to guide traders through the evolving institutional era of crypto — where liquidity, not just price, is king.
🌐 Why This Matters
Historically, traditional proxies like M2 money supply or bond yields were referenced to infer macro liquidity shifts. But with the regulatory green light and institutional embrace of stablecoins, on-chain fiat liquidity is now directly observable.
Stablecoins = The new M2 for crypto.
This script utilizes real-time data from:
📊 CRYPTOCAP:STABLE.C (Total Stablecoin Market Cap)
📊 CRYPTOCAP:STABLE.C.D (Stablecoin Dominance)
to assess dry powder, risk appetite, and macro regime transitions.
📋 How to Read the Crypto Macro Cockpit
This dashboard updates every few bars and is organized into four actionable segments:
1️⃣ Macro Spreads
Metric --> Interpretation
Risk Flow --> Measures capital flow between stablecoins and total crypto market cap. → Green = risk deploying.
ETH vs BTC --> Shift in dominance between ETH and BTC → rotation gauge.
ETHBTC --> Price ratio movement → confirms leadership tilt.
ALTs (TOTAL3ES) --> Momentum in altcoin market, excluding BTC/ETH/stables → key for alt season timing.
2️⃣ Liquidity & Risk Appetite
Metric --> Interpretation
Liquidity --> Directional change in stablecoin cap → more stables = more dry powder.
Risk Appetite --> Inverse of stablecoin dominance → falling dominance = capital rotating into risk.
3️⃣ Stablecoin Context
Metric --> Interpretation
StableCap ROC --> Growth rate of stablecoin market cap → proxy for fiat inflows.
StableDom ROC --> Change in stablecoin dominance → reflects market caution or aggression.
4️⃣ Composite Labels
Label --> Interpretation
Rotation --> Sector tilt (BTC-led vs ETH/Alts)
Regime --> Synthesized macro environment → "Risk-ON", "Caution", "Waiting", or "Risk-OFF"
Background Color --> Optional tint reflecting regime for quick glance validation
All metrics are evaluated with directional arrows (▲/▼/•) and acceleration overlays, using user-defined thresholds scaled by timeframe for precision.
🔔 Built-in Alerts
Predefined, non-repainting alerts include:
Regime transitions
Sector rotations
Confirmed ETH/ALT rotations
Stablecoin market cap spikes
Risk Flow acceleration
You can use these alerts for discretionary trading or automated system triggers.
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Trading cryptocurrencies involves risk, and past performance does not guarantee future results. Always do your own research and manage risk responsibly.
✅ Ready to Use
No configuration needed — just load the script
Works on all timeframes (optimized for 1D)
Thresholds and smoothing are customizable
Table positioning and sizing is user-controlled
If you find this helpful, feel free to ⭐️ favorite or leave feedback. Questions welcome in the comments.
Let’s trade with macro awareness in this new era.
VG 1.0This script is an enhanced version of SMC Structures and FVG with an advanced JSON-based alert system designed for seamless integration with webhooks and external applications (such as a Swift iOS app).
What it does
It detects and plots on the chart:
Fair Value Gaps (FVG) — bullish and bearish.
Break of Structure (BOS) and Change of Character (CHOCH).
Key Fibonacci levels (0.786, 0.705, 0.618, 0.5, 0.382) based on the current structure.
Additionally, it generates custom alerts:
FVG Alerts:
When a new FVG is created (bullish or bearish).
When an existing FVG gets mitigated.
BOS & CHOCH Alerts:
Includes breakout direction (bullish or bearish).
Fibonacci Alerts:
When price touches a configured level, with adjustable tick tolerance.
Alerts can be:
Declarative (alertcondition) for manual setup inside TradingView.
Programmatic (alert() JSON) for automated webhook delivery to your system or mobile app.
Key Features
Optional close confirmation to filter out false signals.
Standardized JSON format for direct API or mobile app integration.
Webhook-ready for automated push notifications.
Full visual control with lines, boxes, and labels.
Configurable tick tolerance for Fibonacci “touch” detection.
TSI Indicator with Trailing StopAuthor: ProfitGang
Type: Indicator (visual + alerts). No orders are executed.
What it does
This tool combines the True Strength Index (TSI) with a simple tick-based trailing stop visualizer.
It plots buy/sell markers from a TSI cross with momentum confirmation and, if enabled, draws a trailing stop line that “ratchets” in your favor. It also shows a compact info table (position state, entry price, trailing status, and unrealized ticks).
Signal logic (summary)
TSI is computed with double EMA smoothing (user lengths).
Signals:
Buy when TSI crosses above its signal line and momentum (TSI–Signal histogram) improves, with TSI above your Buy Threshold.
Sell when TSI crosses below its signal line and momentum weakens, with TSI below your Sell Threshold.
Confirmation: Optional “Confirm on bar close” setting evaluates signals on closed bars to reduce repaint risk.
Trailing stop (visual only)
Units are ticks (uses the symbol’s min tick).
Start Trailing After (ticks): activates the trail only once price has moved in your favor by the set amount.
Trailing Stop (ticks): distance from price once active.
For longs: stop = close - trail; it never moves down.
For shorts: stop = close + trail; it never moves up.
Exits shown on chart when the trailing line is touched or an opposite signal occurs.
Note: This is a simulation for visualization and does not place, manage, or guarantee broker orders.
Inputs you can tune
TSI Settings: Long Length, Short Length, Signal Length, Buy/Sell thresholds, Confirm on Close.
Trailing Stop: Start Trailing After (ticks), Trailing Stop (ticks), Show/Hide trailing lines.
Display: Toggle chart signals, info table, and (optionally) TSI plots on the price chart.
Alerts included
TSI Buy / TSI Sell
Long/Short Trailing Activated
Long/Short Trail Exit
Tips for use
Timeframes/markets: Works on any symbol/timeframe that reports a valid min tick. If your market has large ticks, adjust the tick inputs accordingly.
TSI view: By default, TSI lines are hidden to avoid rescaling the price chart. Enable “Show TSI plots on price chart” if you want to see the oscillator inline.
Non-repainting note: With Confirm on bar close enabled, signals are evaluated on closed bars. Intrabar previews can change until the bar closes—this is expected behavior in TradingView.
Limitations
This is an indicator for education/research. It does not execute trades, and visuals may differ from actual broker fills.
Performance varies by market conditions; thresholds and trail settings should be tested by the user.
Disclaimer
Nothing here is financial advice. Markets involve risk, including possible loss of capital. Always do your own research and test on a demo before using any tool in live trading.
— ProfitGang