UTBot + EMA Filter (HA + ATR Logic)hightest winrate >90%,
hightest winrate >90%
hightest winrate >90%
hightest winrate >90%hightest winrate >90%
Chỉ báo và chiến lược
High/Low Day + Operacionais (com RSI)📌 Indicator Name: High/Low Day + Operational Levels (with RSI)
Short title: HL Day + RSI
Version: Pine Script v6
Overlay: Yes (draws directly on the chart)
🧠 What This Script Does
This indicator is a comprehensive tool designed for intraday and swing traders, combining daily high/low levels, custom operational zones, and a scaled RSI visual directly on the chart. It helps traders identify key price zones for entries or exits and overlays the RSI indicator in a unique way that’s dynamically scaled to the day’s range.
⚙️ Main Features
🔹 Daily High & Low Lines
Automatically detects the current day’s high and low.
Updates dynamically as new highs/lows form.
Optionally displays labels for "High Day" and "Low Day".
🔹 Operational Zones
Two customizable strategies for setting trade zones around the high/low:
Operational 01: Projects levels above the High and below the Low using a user-defined distance (e.g., ±20 points).
Operational 02: Projects levels inside the daily range using a reversed logic (e.g., High - X and Low + X).
Each has customizable visibility and color.
🔹 RSI Visualization
Plots the RSI scaled between the day’s high and low prices.
Highlights overbought (default 80), oversold (default 20), and midpoint (default 50) RSI levels with color-coded lines.
Dynamically places a visual marker and RSI value label aligned to the price chart.
The RSI is smoothed using ATR to account for market volatility.
🛠️ How to Use It
Add the Script: Paste the code into a new Pine Script editor on TradingView and add it to your chart.
Timeframe: Best used on intraday charts (1m to 1h), but works on any timeframe.
Settings Panel:
Toggle the display of High/Low lines.
Adjust point distances for Operational 01 and 02.
Choose whether to show each operational zone and assign their colors.
Enable or disable RSI display, and customize RSI settings (length, ATR smoothing, levels, and colors).
Trade with Context:
Use Operational levels as potential zones for breakout or reversal entries.
Observe RSI in relation to the price range to gauge momentum or overbought/oversold conditions.
Combine the high/low zones and RSI signal for confirmation.
🔍 Example Scenarios
Breakout Strategy: Use Op. 01 levels for buying above the high + 20 pts or selling below the low – 20 pts.
Reversal Strategy: Use Op. 02 to identify potential fade/reversal levels within the day's range.
Momentum Confirmation: When price breaks Op.01 levels and RSI is above 70 or below 30, this may add confluence to the setup.
Custom IndicatorThis indicator indicated the 10 EMA and 20 EMA
When Ema 20 Goes Over My 10 Sell When Ema 10 Goes Below 20 Buy
Horizontal Price TableOverview:
This script displays a dynamic price table on your chart, showing real-time prices and daily percentage changes for up to 7 user-defined tickers. You can customize both which tickers are shown and how many are visible, all through the settings panel.
How it works (Step-by-Step):
User-Defined Tickers:
The script provides input fields for up to 7 tickers using input.symbol(). You can track stocks, indexes, ETFs, crypto, or futures — anything supported by TradingView.
Choose How Many to Display:
An additional dropdown lets you choose how many of the 7 tickers to actually display (between 1 and 7). This gives you control over screen space and focus.
Market Data Fetching:
For each displayed ticker, the script fetches:
The current day’s closing price (close)
The previous day’s closing price (close )
This data is pulled using request.security() on the daily timeframe (1D).
% Change Calculation:
The script calculates the daily percentage change using:
(Current Price−Previous Close)/Previous Close×100(Current Price−Previous Close)/Previous Close×100
Cleaned Ticker Names:
Ticker symbols often include an exchange prefix like NASDAQ:AAPL. The script automatically removes anything before the colon (:), so only the clean symbol (e.g., AAPL) is shown in the table.
Table Display:
A visual table appears at the top-center of your chart, showing:
Row 1: Ticker symbol (cleaned)
Row 2: Current price (rounded to 2 decimals)
Row 3: Daily % change (green for gains, red for losses)
Customization:
You can choose the background color of the table.
Ticker names appear in white text with a gray background.
% change is color-coded: green for positive, red for negative.
Why Use This Script?
Track multiple tickers at once without leaving your chart.
Clean, customizable layout.
Useful for monitoring watchlists, portfolios, or related markets.
Tips:
Combine this with your favorite indicators for a personalized dashboard.
Works great on any chart or timeframe.
Ensure the tickers entered are valid on TradingView (e.g., SPY, BTCUSD, NQ1!, etc.).
Bubbles Volume Delta V2English Version
Introduction
Bubbles Volume Delta V2 is an advanced volume analysis indicator for TradingView that visualizes trading volume as bubbles on your chart. It combines volume visualization with delta analysis, support/resistance detection, and VWAP (Volume-Weighted Average Price) to provide comprehensive volume insights for more informed trading decisions.
Key Features
Volume Bubbles: Displays volume as differently sized bubbles at price levels
Up/Down Volume Analysis: Analyzes buying vs selling pressure using lower timeframe data
Delta Divergence Detection: Identifies when price direction contradicts volume delta
Support/Resistance Levels: Automatically detects potential support/resistance based on volume imbalance
VWAP Integration: Displays VWAP with customizable anchoring and deviation bands
Setup Instructions
Add the indicator to your chart from the Indicators & Strategies menu
Adjust settings in the various sections according to your preferences
Verify that your chart has volume data available (some symbols may not provide volume)
Settings Guide
Bubbles Volume Settings
Show Bubbles: Toggle bubble visualization on/off
Threshold: Minimum normalized volume to display bubbles (lower = more bubbles)
Bubble Color: Default color for volume bubbles
Volume Label Size: Size of text labels showing volume information
Label Display Options: Control which bubble sizes display text labels
Delta Divergence Settings
Show Delta Divergence: Toggle divergence detection on/off
Delta Significance (%): Minimum percentage for significant delta
Bullish/Bearish Signal: Colors for divergence signals
Dynamic Triangle Size: Scale triangle size based on divergence magnitude
Divergence Thresholds: Configure levels for weak, moderate, and strong divergence signals
Support/Resistance Settings
Show Support/Resistance Levels: Toggle display of S/R levels
Imbalance Threshold: Required imbalance ratio for level detection
Max Levels to Display: Limit the number of lines shown
Extend Lines to Right: Continue lines to the right edge of the chart
Support/Resistance Colors and Styles: Visual appearance customization
Up/Down Volume Settings
Use Custom Timeframe: Override automatic timeframe selection
Show Up/Down Info: Display buying/selling volume breakdown on bubbles
Color Bubbles by Direction: Use green/red based on delta direction
VWAP Settings
Show VWAP: Toggle VWAP line display
VWAP Anchor: Choose when VWAP calculations reset (Session/Week/Month/Year)
Show VWAP Bands: Display standard deviation bands around VWAP
Bands Multiplier: Adjust the width of deviation bands
Number of Bands: How many deviation bands to display (1-4)
Line Style Settings: Customize colors, widths, and styles
How to Interpret the Indicator
Volume Bubbles
Size: Larger bubbles indicate higher relative volume
Color: Green indicates buying pressure, red indicates selling pressure
Labels: Show precise volume figures and up/down breakdown
Divergence Signals
▲ (Blue Triangle): Bullish divergence - price moving down but buying pressure detected
▼ (Red Triangle): Bearish divergence - price moving up but selling pressure detected
Triangle Size: Larger triangles indicate stronger divergence
Support/Resistance Lines
Green Lines: Support levels with buying pressure
Red Lines: Resistance levels with selling pressure
Percentage Labels: Show the imbalance ratio strength
VWAP
Main Line: Average price weighted by volume
Bands: Standard deviation ranges showing potential support/resistance zones
Best Practices
Use on liquid markets with reliable volume data
Combine with price action analysis for confirmation
Adjust thresholds based on the specific market's volatility
Use lower timeframes for short-term trading and higher timeframes for swing trading
Pay attention to divergences at key price levels
Troubleshooting
No Volume Data: Ensure your selected symbol provides volume information
Missing Up/Down Volume: Some exchanges or symbols may not provide lower timeframe data
Performance Issues: Reduce the number of displayed levels or use larger timeframes
中文版本
介绍
Bubbles Volume Delta V2 是一个高级交易量分析指标,用于 TradingView 平台,将交易量以气泡形式直观显示在图表上。它结合了交易量可视化、Delta分析、支撑/阻力检测和 VWAP(成交量加权平均价格),为您提供全面的交易量洞察,帮助做出更明智的交易决策。
主要功能
交易量气泡:在价格水平上显示不同大小的交易量气泡
上涨/下跌交易量分析:使用低时间周期数据分析买卖压力
Delta 背离检测:识别价格方向与交易量 Delta 相矛盾的情况
支撑/阻力水平:根据交易量不平衡自动检测潜在支撑/阻力位
VWAP 集成:显示可自定义锚点和偏差带的 VWAP
设置指南
从指标与策略菜单将指标添加到您的图表
根据您的偏好调整各部分设置
确认您的图表有可用的交易量数据(某些交易品种可能不提供交易量)
设置指南
交易量气泡设置
显示气泡:开启/关闭气泡可视化
阈值:显示气泡的最小归一化交易量(越低 = 越多气泡)
气泡颜色:交易量气泡的默认颜色
交易量标签大小:显示交易量信息的文本标签大小
标签显示选项:控制哪些气泡大小显示文本标签
Delta 背离设置
显示 Delta 背离:开启/关闭背离检测
Delta 显著性 (%):显著 Delta 的最小百分比
看涨/看跌信号:背离信号的颜色
动态三角形大小:根据背离幅度调整三角形大小
背离阈值:配置弱、中等和强背离信号的水平
支撑/阻力设置
显示支撑/阻力水平:开启/关闭支撑/阻力水平显示
不平衡阈值:水平检测所需的不平衡比率
最大显示水平数:限制显示的线条数量
向右延伸线条:线条延伸至图表右侧边缘
支撑/阻力颜色和样式:视觉外观自定义
上涨/下跌交易量设置
使用自定义时间周期:覆盖自动时间周期选择
显示上涨/下跌信息:在气泡上显示买卖交易量细分
按方向着色气泡:根据 Delta 方向使用绿色/红色
VWAP 设置
显示 VWAP:开启/关闭 VWAP 线显示
VWAP 锚点:选择 VWAP 计算何时重置(盘中/周/月/年)
显示 VWAP 带:显示 VWAP 周围的标准偏差带
带乘数:调整偏差带的宽度
带数量:显示多少条偏差带(1-4)
线条样式设置:自定义颜色、宽度和样式
如何解读指标
交易量气泡
大小:更大的气泡表示更高的相对交易量
颜色:绿色表示买入压力,红色表示卖出压力
标签:显示精确的交易量数字和上涨/下跌细分
背离信号
▲(蓝色三角形):看涨背离 - 价格下移但检测到买入压力
▼(红色三角形):看跌背离 - 价格上移但检测到卖出压力
三角形大小:更大的三角形表示更强的背离
支撑/阻力线
绿线:有买入压力的支撑位
红线:有卖出压力的阻力位
百分比标签:显示不平衡比率强度
VWAP
主线:按交易量加权的平均价格
带:显示潜在支撑/阻力区域的标准偏差范围
最佳实践
在具有可靠交易量数据的流动性市场上使用
结合价格动作分析进行确认
根据特定市场的波动性调整阈值
短期交易使用低时间周期,摇摆交易使用高时间周期
注意关键价格水平的背离
故障排除
无交易量数据:确保您选择的交易品种提供交易量信息
缺少上涨/下跌交易量:某些交易所或交易品种可能不提供低时间周期数据
性能问题:减少显示的水平数量或使用更大的时间周期
Daily Levels & Stats Pro - [Aspect] v4.0# Description of the "Daily Levels & Stats Pro - v4.0" Indicator
This indicator is a powerful tool for market analysis through the lens of key daily levels and statistical price movement indicators. It allows you to display important trading session opening levels, daily statistical movements, and high volatility zones on the price chart.
## Main Indicator Functions:
### Key Time Levels:
- **Daily Open (DO)** - daily trading session opening level at 02:00
- **NY Midnight (NYM)** - New York session opening level at 06:00
- **Trade Open (TO)** - active trading opening level at 10:00
### Analysis Zones:
- **Previous Close Zone (PCZ)** - previous day's closing zone (displayed on M5 timeframe)
- **Open Day Zone (ODZ)** - current day's opening zone (displayed on M5 timeframe)
### Statistical Price Movement Levels:
- **Min** - minimum statistical movement from DO
- **Max** - maximum statistical movement from DO
- **Aver** - average statistical movement from DO
- **Dev-** - lower deviation of movement from DO
- **Dev+** - upper deviation of movement from DO
### TO Impulse Movement Statistical Levels:
- **Aver TO** - average statistical movement from TO
- **Dev+ TO** - upper deviation of movement from TO
- **Max TO** - maximum statistical movement from TO
## Indicator Features:
- Complete customization of colors, styles, and line widths for all levels
- Ability to select time for each main level
- Adjustment of the number of bars for level display
- Automatic calculation of level values relative to DO and TO
- Visual display of TO-levels starts 3 bars before the actual TO point, providing better visual perception
- Ability to enable/disable individual levels and zones
- Automatic updates and resets when the day changes
- Adaptive text labels to mark levels
This indicator is excellent for traders who use statistical data and daily support/resistance levels in their trading strategy. It is particularly useful for DAX40 and other highly liquid instruments where daily trading statistics are important for making trading decisions.
📊 Volume Split Buy/Sell | Copytrade TungdubaiThis Pine Script calculates the estimated buy and sell volume based on price action (relative position of the close within the price range of the candle) and plots the values on the chart. Additionally, it detects significant volume spikes by comparing the current volume to a 20-period moving average of volume.
Here’s a breakdown of what each section of the script does:
1. **Inputs and Variables:**
- `vol`: This variable holds the volume of the current candle.
- `body`: This calculates the absolute difference between the close and open prices (i.e., the body size of the candle).
- `price_range`: This is the range between the high and low of the candle.
- `buy_ratio`: This is the ratio of the candle's body above the close relative to the total range, representing buying pressure.
- `sell_ratio`: This is the inverse of `buy_ratio`, representing selling pressure.
2. **Volume Calculation:**
- `buy_volume`: The estimated buying volume is calculated as the total volume multiplied by the buying ratio.
- `sell_volume`: The estimated selling volume is calculated as the total volume multiplied by the selling ratio.
3. **Volume Plots:**
- The script plots the estimated selling volume in red below the baseline (`sell_volume`).
- The estimated buying volume is plotted in lime above the baseline (`buy_volume`).
4. **Volume Spike Detection:**
- `vol_ma`: This is the 20-period simple moving average of volume.
- `vol_spike`: This condition checks if the current volume is greater than 2.5 times the 20-period moving average of volume.
- If a volume spike is detected, a tiny purple circle is plotted at the bottom of the volume bar.
This script can be useful for visualizing the relative strength of buy and sell volumes, as well as detecting unusual volume spikes that might signal significant market activity.
Log-Normal Price ForecastLog-Normal Price Forecast
This Pine Script creates a log-normal forecast model of future price movements on a TradingView chart, based on historical log returns. It plots expected price trajectories and bands representing different levels of statistical deviation.
Parameters
Model Length – Number of bars used to calculate average and standard deviation of log returns (default: 100).
Forecast Length – Number of bars into the future for which the forecast is projected (default: 100, max: 500).
Volatility SMA Length – The smoothing length for the standard deviation (default: 20).
Confidence Intervals – Confidence intervals for price bands (default: 95%, 99%, 99.9%).
Pattern Candlestick - V5This script is an advanced visual tool for technical analysis. It allows you to:
Highlight classic and custom patterns.
Get a clear visual overview through the use of colors and symbols.
*Let me know in the comments if you'd like to see more indicators like this one.
---------------------------------------- ----------------------------------------
1. Detection of specific “DOJI” candles
When a candle has a small body and long wicks.
Label: "⧱"
2. “ENGULFING” Pattern (2 candles)
Bullish: The second candle is bearish and engulfs the range of the first (which is bullish).
Bearish: The second candle is bullish and engulfs the range of the first (which is bearish).
Labels: "◧🢆" for bullish, "◨🢅" for bearish.
3. “OVERSHADOW” Pattern (Engulfing variant)
A 2-candle pattern where the second candle heavily overshadows the first.
Bullish: Second candle is bullish and engulfs a bullish first candle.
Bearish: Second candle is bearish and engulfs a bearish first candle.
Labels: "◫🢅" or "❚❚🢆"
4. “EFFICIENCY” Pattern (4 candles + FVG)
Uses 4 candles to define a structured directional pattern.
Complex conditions based on descending or ascending highs/lows that leave behind FVG.
Labels: "⟰🢆" and "⟱🢅"
5. “3 IN A ROW” Pattern (3 consecutive candles)
Detects 3 consecutive bullish or bearish candles.
Labels: "⥔🢆" or "⥕🢅"
6. “4 IN A ROW” Pattern (4 consecutive candles)
Same as above, but for 4 bullish or bearish candles.
Labels: "⥔⥔🢅" or "⥕⥕🢆"
7. “REJECTION” Pattern (3 candles)
A 3-candle pattern where the central candle shows strong rejection compared to the ones before and after it.
The middle candle gets strongly pushed back.
Labels: "⊻🢅" or "⊼🢆"
------------------------------- -------------------------------
This script is extremely useful for traders and technical analysts, offering:
Faster Pattern Recognition: Quickly spot well-known candlestick patterns without manual analysis.
Visual Clarity: Uses distinct symbols and colors to make chart reading more intuitive.
Customization: Detects not only standard patterns like Doji and Engulfing, but also more complex or personalized setups (e.g. Efficiency, Overshadow).
Trade Timing: Helps identify potential entry or exit points based on historically significant formations.
Adaptability: Can be used across various markets (stocks, crypto, forex) and timeframes.
VWAP Bounce & Squeeze (Enhanced)(loosened parameters for extended hours trading, now also includes wicks)
VWAP
20/50 EMA
Volume spike and candle body simulating Bookmap/DOM
custom confluence detection for VWAP, EMA, candle structure
15 minute Opening Range
signals for long and short opportunities
automated risk/reward boxes
automated trailing stop suggestions
Volume Weighted Median Price (VWMP)The volume is indeed crucial for confirming price moves and understanding market conviction. While many traders are familiar with VWAP (Volume Weighted Average Price), this indicator introduces a lesser-known but powerful cousin: the Volume Weighted Median Price (VWMP).
What is VWMP?
Unlike VWAP, which calculates the average price weighted by volume over a period, VWMP identifies the median price level weighted by volume.
Think of it this way: If you line up all the trades within a specific lookback period, sorted by price, and then start accumulating the volume traded at each price level, the VWMP is the price level where 50% of the total volume occurred below it, and 50% occurred above it.
It essentially finds the "middle ground" of trading activity based on where the bulk of the volume actually traded, not just the average price.
Key Difference: VWMP vs. VWAP
VWAP: Volume Weighted Average Price. Sensitive to outliers (single large trades at extreme prices can skew the average).
VWMP: Volume Weighted Median Price. More robust to outliers. It represents the price that splits the period's volume distribution in half.
Because it uses the median, VWMP can sometimes provide a more stable or representative level of the "typical" price where significant volume is changing hands, especially in volatile markets or when large, anomalous trades occur.
How to Interpret and Use VWMP in trading
The VWMP plots as a line on your chart, similar to a moving average or VWAP. Here are a few ways traders might use it:
Dynamic Support and Resistance:
Like VWAP, the VWMP line can act as a dynamic level of interest.
Watch how price interacts with the VWMP. Consistent acceptance above VWMP might suggest bullish control and potential support.
Consistent rejection or acceptance below VWMP might indicate bearish control and potential resistance.
Trend Filter / Confirmation:
Uptrend: Look for price consistently staying above the VWMP line. Pullbacks to the VWMP that hold could offer entry opportunities.
Downtrend: Look for price consistently staying below the VWMP line. Rallies to the VWMP that fail could present shorting opportunities.
Use it to filter trades: Only take long trades if price is above VWMP, and short trades if below.
Mean Reversion Potential (Use with Caution):
When price extends significantly far away from the VWMP, some traders might look for potential reversion back towards this volume-based median level.
Important: This should not be used in isolation. Always look for confirmation from other indicators (like RSI, Stochastics, or candlestick patterns) before trading counter-trend reversions.
Confluence with Other Indicators:
VWMP works best when combined with other analysis tools.
Look for confluence: Does the VWMP align with a key Fibonacci level, a standard moving average, or a prior support/resistance zone? This confluence strengthens the level's potential significance.
Considerations
Lookback Period: The length input is crucial. A shorter period makes VWMP more responsive to recent action; a longer period makes it smoother and reflects longer-term volume distribution. Experiment to find what suits your timeframe and trading style.
Lagging Nature: Like all indicators based on past data, VWMP is inherently lagging. It reflects past volume distribution, not the future.
Market Context: Its effectiveness can vary depending on the market conditions (trending vs. ranging) and the asset being traded.
High/Low Day + RSIThis Pine Script® indicator, titled 'High/Low Day + RSI', overlays key daily price levels and Relative Strength Index (RSI) information directly onto your chart. It's designed to help traders identify the day's range and gauge momentum relative to that range.
**How to Use:**
1. **Apply the Indicator:** Add the 'High/Low Day + RSI' indicator to your TradingView chart.
2. **High/Low Day Lines:**
* By default ('Mostrar Linhas do Dia Atual' is checked), the indicator will plot horizontal lines marking the highest (green) and lowest (red) prices reached so far during the current trading day.
* Labels 'High Day' and 'Low Day' will appear next to these lines.
* You can toggle the visibility of these lines using the 'Mostrar Linhas do Dia Atual' input.
3. **Operational Levels:**
* The indicator provides two sets of operational levels based on distances from the day's high and low.
* **Operational 01:** You can set a 'Distância Op. 01 (Pontos)' (default: 20.0) and choose to 'Mostrar Op. 01 (+/- Distância)' (default: true). This will plot dashed lines (color configurable via 'Cor Op. 01', default: gray) at a specified distance above the day's high and below the day's low. These can be used as potential support or resistance levels or for breakout strategies.
* **Operational 02:** Similar to Operational 01, you can set a 'Distância Op. 02 (Pontos)' (default: 20.0) and choose to 'Mostrar Op. 02 (-/+ Distância)' (default: false). This will plot dashed lines (color configurable via 'Cor Op. 02', default: gray) at a specified distance *below* the day's high and *above* the day's low. The +/- in the input title indicates this reversed application, offering alternative operational levels.
4. **RSI Visualization:**
* If 'Mostrar RSI' is checked (default: true), the indicator displays the RSI value scaled within the current day's high and low range on the right side of the last bar.
* The 'Período do RSI' (default: 14) determines the calculation length of the RSI.
* 'Comprimento ATR para RSI' (default: 200) is used to scale the RSI visualization proportionally to the day's range.
* A vertical line with arrows connects the day's high and low.
* A diamond shape and a numerical label indicate the current RSI value along this vertical line.
* A label 'RSI' is placed near the day's high.
* Horizontal lines are plotted at customizable RSI levels:
* 'Nível Superior' (default: 80, color configurable via 'Cor Linha Superior', default: purple) - often considered overbought.
* 'Nível Médio' (default: 50, color configurable via 'Cor Linha Médio', default: gray) - represents the midpoint.
* 'Nível Inferior' (default: 20, color configurable via 'Cor Linha Inferior', default: orange) - often considered oversold.
* The color of the RSI marker changes based on customizable levels (e.g., purple for above 80, red for above 70, orange for below 20, green for below 30, blue otherwise).
**What it Can Do:**
* **Identify Daily Range:** Quickly see the high and low of the current trading day.
* **Potential Support and Resistance:** The operational lines based on the day's high and low can act as potential support or resistance levels for intraday trading.
* **Breakout Levels:** Traders might use the operational lines to identify potential breakout points.
* **Momentum Relative to Daily Range:** The RSI visualization within the day's range provides a unique perspective on the current momentum relative to the established daily extremes.
* **Overbought and Oversold Identification:** The plotted RSI levels (80 and 20 by default, customizable) help identify potential overbought and oversold conditions.
* **RSI Trend Analysis:** Observing the RSI value relative to the customizable levels and its color can aid in assessing the strength and direction of the current price movement within the day.
* **Customizable Visualization:** Users can adjust colors and distances of the operational lines and the levels and colors of the RSI indicators to suit their trading strategies and preferences.
By combining the day's price action with momentum analysis through the RSI, this indicator offers a comprehensive intraday trading tool. Remember that no indicator is foolproof, and it's crucial to use this indicator in conjunction with other analysis techniques and risk management strategies.
Dr. Ravi Strategy - Full ComboThis Pine Script indicator identifies demand and supply zones based on price action:
It detects bullish or bearish impulsive candles using a user-defined body percentage threshold.
Then it looks back a few candles to identify a “base”—a consolidation area with small candle bodies (checked via math.abs()).
If the setup is valid, it draws a green zone below for demand (after a bullish impulse) or a red zone above for supply (after a bearish impulse).
These zones can help traders anticipate potential reversal or breakout areas.
The Mayan CalendarThis indicator displays the current date in the Mayan Calendar, based on real-time UTC time. It calculates and presents:
🌀 Long Count (Baktun.Katun.Tun.Uinal.Kin) – A linear count of days since the Mayan epoch (August 11, 3114 BCE).
🔮 Tzolk'in Date – A 260-day sacred cycle combining a number (1–13) and one of 20 day names (e.g., 4 Ajaw).
🌾 Haab' Date – A 365-day civil cycle divided into 18 months of 20 days + 5 "nameless" days (Wayeb').
The calculations follow Smithsonian standards and align with the Maya Calendar Converter from the National Museum of the American Indian:
👉 maya.nmai.si.edu
The results are shown in a table overlay on your chart's top-right corner. This indicator is great for symbolic traders, astro enthusiasts, or anyone interested in ancient timekeeping systems woven into financial timeframes. Enjoy, time travelers! ⌛
5ma + O’Neil & Minervini Buy ConditionIndicator Overview
5ma + O’Neil & Minervini Buy Condition is an original TradingView indicator that extends beyond a simple collection of standard moving averages by offering:
- Five Fully Independent Lines : Each of MA1–MA5 can be configured as SMA, EMA, WMA, or VWMA with its own period and data source. This level of customization unlocks unique combinations no existing script provides.
- Synergy of Multiple Timeframes : Default settings (10, 21, 50, 200, 325) reflect ultra‑short, short, medium, long, and volume‑weighted long‑term perspectives. The layered structure functions as a multi‑filter, sharpening entry signals and trend confirmation beyond any single MA.
- Integrated Buy Conditions : Built‑in O’Neil and Minervini buy filters use fixed SMA‑based rules (50 & 200 SMA rising within 15% of 52‑week high; 10 > 21 > 50 SMA rising within high/low thresholds), plus a combined condition highlighting when both methods align.
- Clean Visualization & Style Controls : Background coloring for each buy condition appears only in the Style tab under clearly named parameters (O’Neil Buy Condition, Minervini Buy Condition, Both Conditions). MA lines support transparent default colors and customizable line width for optimal readability without clutter.
Calculation & Logic
SMA: (P₁ + P₂ + … + Pₙ) ÷ N
EMA: α = 2 ÷ (N + 1)
EMA_today = (Price_today – EMA_yesterday) × α + EMA_yesterday
WMA: (P₁×N + P₂×(N–1) + … + Pₙ×1) ÷
VWMA: Σ(Pᵢ×Vᵢ) ÷ Σ(Vᵢ) for i = 1…N
```
Buy Condition Logic
- O’Neil: Price > 50 SMA & 200 SMA (both rising) **and** within 15% of the 52‑week high.
- Minervini : 10 SMA > 21 SMA > 50 SMA (both short‑term SMAs rising) **and** within 25% of the 52‑week high **and** at least 25% above the 52‑week low.
- Combined : Both O’Neil and Minervini conditions true.
Usage Examples
1. Short‑Mid Cross : Observe MA1/MA2 crossover while MA3/MA4 confirm trend strength.
2. Volume‑Weighted Long‑Term : Use VWMA as MA5 to filter institutional‑strength pullbacks.
3. Multi‑Filter Entry : Look for purple background (Both Conditions) on daily chart as high‑confidence entry.
Why It’s Unique
- Not a Mash‑Up : Though built on standard MA formulas, the customizable layering and built‑in buy filters create a novel multi‑dimensional analysis tool.
- Trader‑Friendly : Detailed comments in the code explain parameter choices, calculation methods, and practical entry scenarios so that even Pine novices can understand the underlying mechanics.
- Publication‑Ready : Description and code demonstrate originality, add clear value, and comply with house‑rule requirements by explaining why and how components interact, not just listing features.
- Combined Custom MA & Buy Conditions : By integrating customizable moving averages with built-in buy filters, users can easily recognize O’Neil and Minervini recommended setups.
ONE RING 8 MA Bands with RaysCycle analysis tool ...
MAs: Eight moving averages (MA1–MA8) with customizable lengths, types (RMA, WMA, EMA, SMA), and offsets
Bands: Upper/lower bands for each MA, calculated based on final_pctX (Percentage mode) or final_ptsX (Points mode), scaled by multiplier
Rays: Forward-projected lines for bands, with customizable start points, styles (Solid, Dashed, Dotted), and lengths (up to 500 bars)
Band Choices
Manual: Uses individual inputs for band offsets
Uniform: Sets all offsets to base_pct (e.g., 0.1%) or base_pts (e.g., 0.1 points)
Linear: Scales linearly (e.g., base_pct * 1, base_pct * 2, base_pct * 3 ..., base_pct * 8)
Exponential: Scales exponentially (e.g., base_pct * 1, base_pct * 2, base_pct * 4, base_pct * 8 ..., base_pct * 128)
ATR-Based: Offsets are derived from the Average True Range (ATR), scaled by a linear factor. Dynamic bands that adapt to market conditions, useful for breakout or mean-reversion strategies. (final_pct1 = base_pct * atr, final_pct2 = base_pct * atr * 2, ..., final_pct8 = base_pct * atr * 8)
Geometric: Offsets follow a geometric progression (e.g., base_pct * r^0, base_pct * r^1, base_pct * r^2, ..., where r is a ratio like 1.5) This is less aggressive than Exponential (which uses powers of 2) and provides a smoother progression.
Example: If base_pct = 0.1, r = 1.5, then final_pct1 = 0.1%, final_pct2 = 0.15%, final_pct3 = 0.225%, ..., final_pct8 ≈ 1.71%
Harmonic: Offsets are based on harmonic flavored ratios. final_pctX = base_pct * X / (9 - X), final_ptsX = base_pts * X / (9 - X) for X = 1 to 8 This creates a harmonic-like progression where offsets increase non-linearly, ensuring MA8 bands are wider than MA1 bands, and avoids duplicating the Linear choice above.
Ex. offsets for base_pct = 0.1: MA1: ±0.0125% (0.1 * 1/8), MA2: ±0.0286% (0.1 * 2/7), MA3: ±0.05% (0.1 * 3/6), MA4: ±0.08% (0.1 * 4/5), MA5: ±0.125% (0.1 * 5/4), MA6: ±0.2% (0.1 * 6/3), MA7: ±0.35% (0.1 * 7/2), MA8: ±0.8% (0.1 * 8/1)
Square Root: Offsets grow with the square root of the band index (e.g., base_pct * sqrt(1), base_pct * sqrt(2), ..., base_pct * sqrt(8)). This creates a gradual widening, less aggressive than Linear or Exponential. Set final_pct1 = base_pct * sqrt(1), final_pct2 = base_pct * sqrt(2), ..., final_pct8 = base_pct * sqrt(8).
Example: If base_pct = 0.1, then final_pct1 = 0.1%, final_pct2 ≈ 0.141%, final_pct3 ≈ 0.173%, ..., final_pct8 ≈ 0.283%.
Fibonacci: Uses Fibonacci ratios (e.g., base_pct * 1, base_pct * 1.618, base_pct * 2.618
Percentage vs. Points Toggle:
In Percentage mode, bands are calculated as ma * (1 ± (final_pct / 100) * multiplier)
In Points mode, bands are calculated as ma ± final_pts * multiplier, where final_pts is in price units.
Threshold Setting for Slope:
Threshold setting for determining when the slope would be significant enough to call it a change in direction. Can check efficiency by setting MA1 to color on slope temporarily
Arrow table: Shows slope direction of 8 MAs using an Up or Down triangle, or shows Flat condition if no triangle.
Market Structure CHoCH/BOS (Fractal) [LuxAlgo]trading algo char t for michael it has everything that hes goin to need for the chart and everything that makes this a unique indicator
Shark Invest Vip//@version=6
indicator("Shark Invest Vip", "Shark Invest Vip ", overlay=true, max_bars_back=500)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Moving Averages ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
ma_set = "Moving Averages"
// EMA Settings
show_ema = input.bool(false, "Show EMA", inline="ema_set", group=ma_set)
ema_len = input.int(21, "", inline="ema_set", group=ma_set)
ema_color = input.color(#2962FF, "", inline="ema_set", group=ma_set)
ema_width = input.int(1, "", inline="ema_set", group=ma_set, minval=1, maxval=4)
// WMA Settings
show_wma = input.bool(false, "Show WMA", inline="wma_set", group=ma_set)
wma_len = input.int(55, "", inline="wma_set", group=ma_set)
wma_color = input.color(#FF1744, "", inline="wma_set", group=ma_set)
wma_width = input.int(1, "", inline="wma_set", group=ma_set, minval=1, maxval=4)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Bollinger Bands ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
bb_set = "Bollinger Bands"
// BB 14-2 Settings
show_bb2 = input.bool(true, "Show BB(14,2)", inline="bb2_set", group=bb_set)
bb2_color_upper = input.color(#2962FF, "", inline="bb2_set", group=bb_set)
bb2_color_middle = input.color(#787B86, "", inline="bb2_set", group=bb_set)
bb2_color_lower = input.color(#2962FF, "", inline="bb2_set", group=bb_set)
bb2_width = input.int(1, "", inline="bb2_set", group=bb_set, minval=1, maxval=4)
// BB 14-3 Settings
show_bb3 = input.bool(true, "Show BB(14,3)", inline="bb3_set", group=bb_set)
bb3_color_upper = input.color(#ebb00efc, "", inline="bb3_set", group=bb_set)
bb3_color_middle = input.color(#787B86, "", inline="bb3_set", group=bb_set)
bb3_color_lower = input.color(#ebb00efc, "", inline="bb3_set", group=bb_set)
bb3_width = input.int(1, "", inline="bb3_set", group=bb_set, minval=1, maxval=4)
// BB 14-4 Settings
show_bb4 = input.bool(true, "Show BB(14,4)", inline="bb4_set", group=bb_set)
bb4_color_upper = input.color(#171a18, "", inline="bb4_set", group=bb_set)
bb4_color_middle = input.color(#787B86, "", inline="bb4_set", group=bb_set)
bb4_color_lower = input.color(#171a18, "", inline="bb4_set", group=bb_set)
bb4_width = input.int(1, "", inline="bb4_set", group=bb_set, minval=1, maxval=4)
// Calculate BBs
= ta.bb(close, 14, 2)
= ta.bb(close, 14, 3)
= ta.bb(close, 14, 4)
// Plot BBs
// BB 14-2
plot(show_bb2 ? bb2_upper : na, "BB(14,2) Upper", color=bb2_color_upper, linewidth=bb2_width)
plot(show_bb2 ? bb2_middle : na, "BB(14,2) Middle", color=bb2_color_middle, linewidth=bb2_width)
plot(show_bb2 ? bb2_lower : na, "BB(14,2) Lower", color=bb2_color_lower, linewidth=bb2_width)
// BB 14-3
plot(show_bb3 ? bb3_upper : na, "BB(14,3) Upper", color=bb3_color_upper, linewidth=bb3_width)
plot(show_bb3 ? bb3_middle : na, "BB(14,3) Middle", color=bb3_color_middle, linewidth=bb3_width)
plot(show_bb3 ? bb3_lower : na, "BB(14,3) Lower", color=bb3_color_lower, linewidth=bb3_width)
// BB 14-4
plot(show_bb4 ? bb4_upper : na, "BB(14,4) Upper", color=bb4_color_upper, linewidth=bb4_width)
plot(show_bb4 ? bb4_middle : na, "BB(14,4) Middle", color=bb4_color_middle, linewidth=bb4_width)
plot(show_bb4 ? bb4_lower : na, "BB(14,4) Lower", color=bb4_color_lower, linewidth=bb4_width)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Ichimoku Base ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
ich_set = "Ichimoku Settings"
// Base Line Settings
show_baseline = input.bool(true, "Show Base Line", inline="base_set", group=ich_set)
base_len = input.int(257, "", inline="base_set", group=ich_set)
base_color = input.color(#242221, "", inline="base_set", group=ich_set)
base_width = input.int(2, "", inline="base_set", group=ich_set, minval=1, maxval=4)
// Calculate Base Line (Kijun-sen)
base_high = ta.highest(high, base_len)
base_low = ta.lowest(low, base_len)
base_line = math.avg(base_high, base_low)
// Plot Base Line
plot(show_baseline ? base_line : na, "Base Line", color=base_color, linewidth=base_width)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Volume Profile Settings ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
vol_set = "Volume Profile"
i_vol_length = input.int(20, "MA Length", group=vol_set)
// Volume Thresholds
i_vol_ultra = input.float(2.2, "Ultra High Volume ×", inline="vol_thresh1", group=vol_set)
i_vol_high = input.float(1.8, "High Volume ×", inline="vol_thresh1", group=vol_set)
i_vol_mid = input.float(1.2, "Mid Volume ×", inline="vol_thresh2", group=vol_set)
i_vol_low = input.float(0.8, "Low Volume ×", inline="vol_thresh2", group=vol_set)
i_vol_vlow = input.float(0.4, "Ultra Low Volume ×", inline="vol_thresh2", group=vol_set)
// Volume Colors
vol_color = "Volume Colors"
c_vol_ultra = input.color(#9B59B6, "Ultra High", inline="vol_c1", group=vol_color)
c_vol_high = input.color(#E74C3C, "High", inline="vol_c1", group=vol_color)
c_vol_mid = input.color(#95A5A6, "Mid", inline="vol_c2", group=vol_color)
c_vol_low = input.color(#7F8C8D, "Low", inline="vol_c2", group=vol_color)
c_vol_vlow = input.color(#666666, "Ultra Low", inline="vol_c2", group=vol_color)
i_vol_transp = input.int(0, "Transparency", inline="vol_c3", group=vol_color, minval=0, maxval=100)
// Ultra Volume Box Settings
box_set = "Ultra Volume Box"
show_ultra_box = input.bool(true, "Show Ultra Volume Box", group=box_set)
box_extend = input.int(5, "Box Extension (bars)", minval=1, maxval=20, group=box_set)
box_border_color = input.color(#9B59B6, "Box Border", group=box_set)
box_fill_color = input.color(color.new(#9B59B6, 90), "Box Fill", group=box_set)
box_border_width = input.int(1, "Border Width", minval=1, maxval=4, group=box_set)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ VSA: UT, Spring, Stopping Volume ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
volMA = ta.wma(volume, i_vol_length)
// UT: Đỉnh mới, đóng cửa thấp, volume cao
isUT = high > high and close < close and volume > volMA
plotshape(isUT, title="UT", location=location.abovebar, style=shape.labeldown, text="UT", textcolor=color.white, size=size.small, color=color.red)
// Spring: Đáy mới, đóng cửa cao, volume cao
isSpring = low < low and close > close and volume > volMA
plotshape(isSpring, title="Spring", location=location.belowbar, style=shape.labelup, text="Spring", textcolor=color.white, size=size.small, color=color.green)
// Stopping Volume: Nến giảm mạnh, volume cực cao
isStopping = close < open and volume > i_vol_ultra * volMA
plotshape(isStopping, title="Stop", location=location.belowbar, style=shape.labelup, text="Stop", textcolor=color.black, size=size.small, color=color.yellow)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Trading Range Settings ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
tr_set = "Trading Range"
// Display Control
show_tr = input.bool(false, "Show Trading Range", inline="tr_display", group=tr_set)
max_tr_display = input.int(10, "Max TR to Display", inline="tr_display", group=tr_set, minval=1)
// Core Parameters
i_dxi = input.int(25, "DXI Length", inline="tr_core", group=tr_set)
i_atr = input.int(14, "ATR Length", inline="tr_core", group=tr_set)
i_adx = input.int(20, "ADX Limit", inline="tr_core", group=tr_set)
// Range Parameters
i_atr_ma = input.int(20, "ATR MA Length", inline="tr_range", group=tr_set)
i_atr_rate = input.float(1.1, "ATR Rate", inline="tr_range", group=tr_set)
// Bar Requirements
i_min_bars = input.int(25, "Min Bars", inline="tr_bars", group=tr_set)
i_max_bars = input.int(100, "Max Bars", inline="tr_bars", group=tr_set)
// Visual Settings
vis_set = "TR Appearance"
c_tr_border = input.color(#2980B9, "Border", inline="tr_style", group=vis_set)
c_tr_fill = input.color(#ECF0F1, "Fill", inline="tr_style", group=vis_set)
i_tr_width = input.int(2, "Width", inline="tr_style", group=vis_set, minval=1, maxval=4)
i_tr_transp = input.int(90, "Transp", inline="tr_style", group=vis_set, minval=0, maxval=100)
// Arrays for tracking
var tr_lines = array.new_line(0) // Array for upper lines
var tr_lines2 = array.new_line(0) // Array for lower lines
var tr_fills = array.new_linefill(0) // Array for line fills
var ultra_boxes = array.new_box(0) // Array for ultra volume boxes
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ VSA Analysis ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
volumeMA = ta.wma(volume, i_vol_length)
ultraVol = volumeMA * i_vol_ultra
highVol = volumeMA * i_vol_high
midVol = volumeMA * i_vol_mid
lowVol = volumeMA * i_vol_low
veryLowVol = volumeMA * i_vol_vlow
isUltraVol = volume >= ultraVol
isHighVol = volume >= highVol and volume < ultraVol
isMidVol = volume >= midVol and volume < highVol
isLowVol = volume >= lowVol and volume < midVol
isVeryLowVol = volume < lowVol
candleColor = isUltraVol ? color.new(c_vol_ultra, i_vol_transp) :
isHighVol ? color.new(c_vol_high, i_vol_transp) :
isMidVol ? color.new(c_vol_mid, i_vol_transp) :
isLowVol ? color.new(c_vol_low, i_vol_transp) :
color.new(c_vol_vlow, i_vol_transp)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Trading Range Logic ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
var float SmoothedTR = 0.0
var float SmoothedDMPlus = 0.0
var float SmoothedDMMinus = 0.0
TrueRange = math.max(math.max(high-low, math.abs(high-nz(close ))), math.abs(low-nz(close )))
DMPlus = high-nz(high ) > nz(low )-low ? math.max(high-nz(high ), 0): 0
DMMinus = nz(low )-low > high-nz(high ) ? math.max(nz(low )-low, 0): 0
SmoothedTR := nz(SmoothedTR ) - (nz(SmoothedTR )/i_dxi) + TrueRange
SmoothedDMPlus := nz(SmoothedDMPlus ) - (nz(SmoothedDMPlus )/i_dxi) + DMPlus
SmoothedDMMinus := nz(SmoothedDMMinus ) - (nz(SmoothedDMMinus )/i_dxi) + DMMinus
DIPlus = SmoothedDMPlus / SmoothedTR * 100
DIMinus = SmoothedDMMinus / SmoothedTR * 100
DX = math.abs(DIPlus-DIMinus) / (DIPlus+DIMinus)*100
ADX = ta.sma(DX, i_dxi)
atr = ta.atr(i_atr)
atrMA = ta.ema(atr, i_atr_ma) * i_atr_rate
ADXma = ta.sma(ADX, 10)
isSideway = (ADX < i_adx or ADX < ADXma) and atr < atrMA
// TR Detection Functions
foundStartTR(lookback) =>
int count = 0
bool onRange = true
int maxBars = math.min(lookback, i_max_bars)
for i = 1 to maxBars
if not isSideway
onRange := false
if onRange
count := count + 1
count
foundHighest(lookback, startCount) =>
float temp = high
int maxBars = math.min(lookback, i_max_bars)
for i = startCount to maxBars
if temp < high
temp := high
temp
foundLowest(lookback, startCount) =>
float temp = low
int maxBars = math.min(lookback, i_max_bars)
for i = startCount to maxBars
if i == startCount or temp > low
temp := low
temp
get_swings(len) =>
float ph = ta.highestbars(high, len) == 0 ? high : na
float pl = ta.lowestbars(low, len) == 0 ? low : na
isLastSideway = not isSideway and isSideway
startTR = foundStartTR(i_max_bars)
highValue = foundHighest(startTR, 2)
lowValue = foundLowest(startTR, 2)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Fair Value Gap Settings ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
fvg_set = "Fair Value Gap"
// Display Controls
show_fvg = input.bool(true, "Show Fair Value Gap", group=fvg_set)
show_fvg_lines = input.bool(false, "Show FVG Lines", group=fvg_set)
// Basic Settings
threshold_per = input.float(0, "Percentage", minval=0, group=fvg_set)
auto = input(false, "Auto Threshold", group=fvg_set)
discard_len = input(5, "Show Last Unfilled Gaps", group=fvg_set)
show_all = input(false, "Show All Unfilled Gaps", group=fvg_set)
tf = input.timeframe('', "Timeframe", group=fvg_set)
// FVG Style
bull_css = input.color(color.new(#0cb51a, 90), "Bullish FVG", group=fvg_set)
bear_css = input.color(color.new(#ff1100, 90), "Bearish FVG", group=fvg_set)
bull_line_css = input.color(color.new(#0cb51a, 90), "Bullish FVG Line", group=fvg_set)
bear_line_css = input.color(color.new(#ff1100, 90), "Bearish FVG Line", group=fvg_set)
show_dash = input.bool(false, "Show Dashboard", group=fvg_set)
// Arrays for FVG
var bull_fvg_lines = array.new_line(0)
var discarded_bull_fvg_lines = array.new_line(0)
var bear_fvg_lines = array.new_line(0)
var discarded_bear_fvg_lines = array.new_line(0)
// FVG Logic
n = bar_index
change_tf = timeframe.change(tf)
get_ohlc()=> [close , open , high, low, high , low ]
= request.security(syminfo.tickerid, tf, get_ohlc())
delta_per = (src_c1 - src_o1) / src_o1 * 100
threshold = auto ? ta.cum(math.abs(change_tf ? delta_per : 0)) / n * 2 : threshold_per
// FVG Detection Function
detect_display_fvg(fvg_condition, fvg_type, fvg_lines, discarded_fvg_lines, css)=>
var float fvg_max = na
var float fvg_min = na
var int filled = 0
var int total = 0
var int fill_x1 = 0
var int duration = 0
if show_fvg_lines
idx = 0
for l in fvg_lines
line.set_x2(l, n)
turn_filled_cnd = fvg_type == "bullish"
? src_l <= line.get_y2(l)
: src_h >= line.get_y2(l)
if turn_filled_cnd
array.remove(fvg_lines, idx)
filled += 1
duration += n - line.get_x1(l)
idx += 1
idx := 0
for l in discarded_fvg_lines
turn_filled_cnd = fvg_type == "bullish"
? src_l <= line.get_y2(l)
: src_h >= line.get_y2(l)
if turn_filled_cnd
array.remove(discarded_fvg_lines, idx)
filled += 1
duration += n - line.get_x1(l)
idx += 1
if fvg_condition and show_fvg
if fvg_max != fvg_min
level = fvg_type == "bullish" ? fvg_min : fvg_max
if show_fvg_lines
array.unshift(fvg_lines, line.new(n - 1, level, n, level,
color = css,
style = line.style_dashed))
if not show_all
if array.size(fvg_lines) > discard_len
pop_l = array.pop(fvg_lines)
array.push(discarded_fvg_lines, pop_l)
else
filled += 1
duration += n - fill_x1
fvg_max := fvg_type == "bullish" ? src_l : src_l2
fvg_min := fvg_type == "bullish" ? src_h2 : src_h
total += 1
fill_x1 := n
fvg_max := fvg_type == "bullish"
? math.max(math.min(fvg_max, src_l), fvg_min)
: fvg_max
fvg_min := fvg_type == "bearish"
? math.min(math.max(fvg_min, src_h), fvg_max)
: fvg_min
filled_cnd = fvg_max == fvg_min and fvg_max != fvg_min
fill_x1 := filled_cnd ? n : fill_x1
// FVG Conditions
bullish_fvg_cnd = src_l > src_h2 and src_c1 > src_h2 and delta_per > threshold and change_tf
bearish_fvg_cnd = src_h < src_l2 and src_c1 < src_l2 and -delta_per > threshold and change_tf
=
detect_display_fvg(bullish_fvg_cnd, "bullish", bull_fvg_lines, discarded_bull_fvg_lines, bull_line_css)
=
detect_display_fvg(bearish_fvg_cnd, "bearish", bear_fvg_lines, discarded_bear_fvg_lines, bear_line_css)
// FVG Plots
bull_max_plot = plot(show_fvg ? bull_fvg_max : na, "Bullish FVG Maximum", na)
bull_min_plot = plot(show_fvg ? bull_fvg_min : na, "Bullish FVG Minimum", na)
fill(bull_max_plot, bull_min_plot, (show_fvg and not bullish_fvg_cnd) ? bull_css : na, "Bullish FVG")
bear_max_plot = plot(show_fvg ? bear_fvg_max : na, "Bearish FVG Maximum", na)
bear_min_plot = plot(show_fvg ? bear_fvg_min : na, "Bearish FVG Minimum", na)
fill(bear_max_plot, bear_min_plot, (show_fvg and not bearish_fvg_cnd) ? bear_css : na, "Bearish FVG")
// FVG Dashboard
if show_fvg and show_dash
var tb = table.new(position.bottom_right, 3, 3)
if barstate.isfirst
table.cell(tb, 0, 1, "Filled %", text_color=chart.fg_color, text_halign=text.align_right)
table.cell(tb, 0, 2, "Avg Duration", text_color=chart.fg_color, text_halign=text.align_right)
table.cell(tb, 1, 0, "Bullish", text_color=chart.fg_color)
table.cell(tb, 2, 0, "Bearish", text_color=chart.fg_color)
if barstate.islast
table.cell(tb, 1, 1, str.format("{0, number, percent}", bull_filled / bull_total),
text_color=chart.fg_color)
table.cell(tb, 2, 1, str.format("{0, number, percent}", bear_filled / bear_total),
text_color=chart.fg_color)
table.cell(tb, 1, 2, str.format("{0,number,integer}", bull_duration / bull_filled),
text_color=chart.fg_color)
table.cell(tb, 2, 2, str.format("{0,number,integer}", bear_duration / bear_filled),
text_color=chart.fg_color)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Moving Average Calculations ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
ema_line = ta.ema(close, ema_len)
wma_line = ta.wma(close, wma_len)
// ╔══════════════════════════════════════════════════════════════════════════════╗
// ║ Drawing ║
// ╚══════════════════════════════════════════════════════════════════════════════╝
// Plot Moving Averages
plot(show_ema ? ema_line : na, "EMA", color=ema_color, linewidth=ema_width)
plot(show_wma ? wma_line : na, "WMA", color=wma_color, linewidth=wma_width)
// Volume Based Candle Colors
barcolor(candleColor)
// Ultra Volume Box Drawing - Chỉ vẽ box khi có nến tím
if show_ultra_box and isUltraVol
box.new(
left=bar_index,
top=high,
right=bar_index + box_extend,
bottom=low,
border_color=box_border_color,
bgcolor=box_fill_color,
border_width=box_border_width)
// Trading Range Drawing
if show_tr and isLastSideway and startTR >= i_min_bars and startTR <= i_max_bars
// Create new lines
line upperLine = line.new(bar_index , highValue, bar_index, highValue,
color=color.new(c_tr_border, 0), width=i_tr_width)
line lowerLine = line.new(bar_index , lowValue, bar_index, lowValue,
color=color.new(c_tr_border, 0), width=i_tr_width)
linefill newFill = linefill.new(upperLine, lowerLine, color=color.new(c_tr_fill, i_tr_transp))
// Add to arrays
array.unshift(tr_lines, upperLine)
array.unshift(tr_lines2, lowerLine)
array.unshift(tr_fills, newFill)
// Remove old TR if exceeding max display limit
if array.size(tr_lines) > max_tr_display
line.delete(array.pop(tr_lines))
line.delete(array.pop(tr_lines2))
linefill.delete(array.pop(tr_fills))
// Clean up when indicator is removed
if barstate.islast
if not show_tr
while array.size(tr_lines) > 0
line.delete(array.pop(tr_lines))
line.delete(array.pop(tr_lines2))
linefill.delete(array.pop(tr_fills))
if not show_ultra_box
while array.size(ultra_boxes) > 0
box.delete(array.pop(ultra_boxes))
Akkerman IMB + Targets IndicatorAkkerman IMB + Targets Indicator
The Akkerman IMB + Targets Indicator is a powerful tool for traders who use the Smart Money Concept (SMC) methodology for intraday trading. This indicator combines several key elements of technical analysis, such as IMB (Imbalance) zones, liquidity zones, and intraday targets, to help traders identify significant levels on the chart for potential entry and exit points.
Main Features of the Indicator:
IMB (Imbalance) Zones:
The indicator detects IMB zones (imbalances) on the chart, which are often significant for the market because these zones can signal unsupported price moves where the market may either retrace or continue the move.
Green box — indicates a bullish IMB, where the price moves downward but does not reach the previous "low" level.
Red box — indicates a bearish IMB, where the price moves upward but does not reach the previous "high" level.
Liquidity Zones:
The indicator automatically identifies liquidity zones, which are critical levels for potential retracements or breakouts. These zones are determined by equal highs and lows on the chart (where the price has made similar highs or lows).
Triangles or lines highlight levels where significant buy or sell orders might be gathered.
Intraday Target Lines:
The indicator generates targets for intraday trading based on support and resistance levels over the last 10 periods.
These target lines on the chart indicate potential entry or exit points based on the lowest and highest prices over the past 10 bars, which represent key points for trading within the current session.
Indicator Settings:
Show IMB: Toggle to show or hide IMB zones on the chart.
Show Liquidity Zones: Toggle to show or hide liquidity zones on the chart.
Show Targets (Intraday): Toggle to show or hide intraday target lines.
Max Targets (maxTargets): Set the maximum number of targets to display on the chart.
How to Use:
IMB Zones help identify potential retracement or breakout zones on the market. These zones are a critical part of Smart Money analysis, as markets often retrace to these areas after significant price moves.
Liquidity Zones provide clues about where large orders may be gathered, which could lead to a retracement or breakout.
Intraday Targets assist in identifying important levels for entering or exiting trades within the current session to take advantage of short-term price movements.
Important Notes:
This indicator works best on the 1-hour timeframe (H1) for more accurate and stable signals.
For maximum effectiveness, it is recommended to combine this indicator with other technical indicators and analysis methods.
((Range||Type||Swing))Consecutive Candle range boxes with gradient and number count. Inside Outside and Engulfing color bars plus plots. Strict swing filter plus bonus filter where the 3rd bar in the swing closes below the swing candles high or low respectfully.
How I Use
I use the candle stick patterns to gauge market conditions, the consecutive candle ranges to follow order flow using a closing break of the range and retest and the filtered swings to assist in identifying stronger. If any one wants to create a strategy around this that would be cool i know nothing of coding and do everything with A.I
turns
Jim Simons Inspired Quantitative StrategyThis sophisticated indicator implements quantitative trading methodologies inspired by Jim Simons' revolutionary theories and approaches. Rather than simply signaling standard buy/sell points, this advanced tool provides deeper trend analysis through a color-coded system:
Green signals indicate strong upward momentum
Red signals represent confirmed downward trends
Neutral coloration suggests potential trend reversals or transition points
The indicator excels on higher timeframes where market patterns become more pronounced, though it demonstrates remarkable versatility across all timeframes. By focusing on mathematical relationships rather than conventional technical indicators, this tool helps traders identify high-probability setups while filtering market noise.
Perfect for traders seeking to incorporate quantitative analysis into their strategy without requiring advanced mathematical expertise.
for your comparison: Global M2 Money Supply // Days Offset =📈 Global M2 Money Supply Overlay – Offset Adjustable
This script plots an aggregated, FX-adjusted global M2 money supply index directly on your TradingView chart. It pulls M2 data from multiple global regions—including North America, Europe, Asia, Latin America, and more—and normalizes it for comparison in USD terms.
You can apply a custom time offset to the M2 line using the settings, allowing you to test potential leading or lagging correlations between global liquidity and market price action (e.g., Bitcoin, equities, commodities).
💡 Ideal for macro traders, long-term investors, and anyone interested in liquidity-driven market behavior.
Features:
Combines M2 data from 20+ countries and currency zones
FX-adjusted for consistency in USD terms
Offset slider to shift M2 data forward or backward in time
Scaled to trillions for readability
Plots directly on the main chart for visual comparison