Drawdown (%)Plots the drawdown percentage from the running peak price. \
Highlights drawdown areas below zero in a soft red shade, and adds a 0% reference line for clarity.
Statistics
Drawdown (%)Plots the drawdown percentage from the running peak price. \
Highlights drawdown areas below zero in a soft red shade, and adds a 0% reference line for clarity.
ADR Remaining-to-70% (Today + Last 10 Days)Script to show over past 10 days.
1. How often ADR hits 100%
2. How often ADR hits 70%
3. ADR used today
4. Remaining ADR.
5. TP Bullish to hit 70%
6. TP Bearish to hit 70%
INCOME STATEMENT BY N' TEEREX HOONJONGPANGConcept
This Pine Script indicator displays a dynamic, customizable table on the TradingView chart.
It is designed for traders who want to monitor annual data, quarterly performance, and key financial ratios directly on the chart without switching to external spreadsheets.
Features
Three Structured Sections:
Yearly Data Table – Displays annual values with adjustable text size and colors.
Quarterly Data Table – Shows quarter-by-quarter figures in a clear, compact format.
Financial Ratios Table – Presents key metrics (e.g., growth rates, margins, or other ratios) for quick analysis.
Customizable Appearance:
Adjustable text size for each table section.
Background and text colors for improved readability.
Option to merge cells for titles and headers.
Flexible Positioning:
Tables can be displayed in various positions on the chart (e.g., top-left, top-center, top-right).
Data Highlighting:
Color-coded cells to highlight important values or trends.
How to Use
1.Add the script to your TradingView chart.
2.Select table position (e.g., top-center for balanced display).
3.Adjust text size and color for yearly, quarterly, and ratio tables according to your preference.
4.Review the merged header cells for section titles and use the table to track key performance data alongside price action.
This tool is especially useful for swing traders, investors, and analysts who need to quickly interpret fundamental data within the same visual context as the chart.
Lunar Calendar US Stocks StrategyLunar Calendar US Stocks Strategy
A very simple lunar calendar US stock trading strategy.
Buy : 12th day of the lunar calendar
Sell : 2th day of the lunar calendar
Banned period : Solar Dec 14 ~ Lunar Jan. 15
Buy and sell before US holidays
Total profit is almost same as just buy & hold.
But MDD is less.
Compare with following Crypto strategy (Lunar day 5~26)
ICT - PSP and SMT Divergence MarkerPSP Marker
The PSP Marker indicator identifies potential divergence patterns between three correlated symbols (e.g., MES, MNQ, and MYM) at significant swing points (higher highs or lower lows). You can customize the appearance of the marker as a label or a dot, including its color and size. This tool is ideal for traders looking to spot discrepancies across multiple markets and enhance their decision-making process.
Moving Averages and Relative StrengthMoving Averages and Relative Strength
Overview
The Moving Averages and Relative Strength is a comprehensive indicator that combines multiple analytical tools to provide traders with a complete picture of price trends, volatility, relative performance, and position sizing guidance. This multi-faceted indicator is designed for both swing and positional traders looking for data-driven entry and exit signals.
Key Components
1. Moving Average Ribbon System
• 4 Customizable Moving Averages with default periods: 13, 21, 55, and 189
• Multiple MA Types : SMA, EMA, SMMA (RMA), WMA, VWMA
• Color-coded visualization for easy trend identification
• Flexible configuration allowing users to modify periods, types, and colors
2. Average Daily Range Percentage (ADR%)
• Calculates the average daily volatility as a percentage
• Uses a 20-period simple moving average of (High/Low - 1) * 100
• Helps traders understand the stock's typical daily movement range
• Essential for position sizing and stop-loss placement
3. Volume Analysis (Up/Down Ratio)
• Analyzes volume distribution over the last 55 periods
• Calculates the ratio of volume on up days vs down days
• Provides insight into buying vs selling pressure
• Values > 1 indicate more buying volume, < 1 indicate more selling volume
4. Absolute Relative Strength (ARS)
• Dual timeframe analysis with customizable reference points
• High ARS : Performance relative to benchmark from a high reference point
• Low ARS : Performance relative to benchmark from a low reference point
• Uses NSE:NIFTY as default comparison symbol
5. Relative Performance Table
• 5 timeframes : 1 Week, 1 Month, 3 Months, 6 Months, 1 Year
• Shows stock performance relative to benchmark index
• Formula: (Stock Return - Index Return) for each period
6. Dynamic Position Allocation System
• 6-factor scoring system based on price vs EMAs (21, 55, 189)
• Evaluates:
- Price above/below each EMA
- EMA alignment (21>55, 55>189, 21>189)
• Allocation recommendations :
- 100% allocation: Score = 6 (all bullish signals)
- 75% allocation: Score = 4
- 50% allocation: Score = 2
- 25% allocation: Score = 0
- 0% allocation: Score = -2, -4, -6 (bearish signals)
Display Tables
Performance Table (Top Right)
Shows relative performance vs benchmark across multiple timeframes with intuitive color coding for quick assessment.
Metrics Table (Bottom Right)
Displays key statistics:
• ADR% : Average Daily Range percentage
• U/D : Up/Down volume ratio
• Allocation% : Recommended position size
• High ARS% : Relative strength from high reference
• Low ARS% : Relative strength from low reference
This indicator is designed to provide a comprehensive analysis framework rather than simple buy/sell signals. It's recommended to use this in conjunction with your overall trading strategy and risk management rules.
Awesome IndicatorAwesome Indicator
Overview
The Moving Average Ribbon with ADR% is a comprehensive technical analysis indicator that combines multiple analytical tools to provide traders with a complete picture of price trends, volatility, relative performance, and position sizing guidance. This multi-faceted indicator is designed for both swing and positional traders looking for data-driven entry and exit signals.
Key Components
1. Moving Average Ribbon System
• 4 Customizable Moving Averages with default periods: 13, 21, 55, and 189
• Multiple MA Types : SMA, EMA, SMMA (RMA), WMA, VWMA
• Color-coded visualization for easy trend identification
• Flexible configuration allowing users to modify periods, types, and colors
2. Average Daily Range Percentage (ADR%)
• Calculates the average daily volatility as a percentage
• Uses a 20-period simple moving average of (High/Low - 1) * 100
• Helps traders understand the stock's typical daily movement range
• Essential for position sizing and stop-loss placement
3. Volume Analysis (Up/Down Ratio)
• Analyzes volume distribution over the last 55 periods
• Calculates the ratio of volume on up days vs down days
• Provides insight into buying vs selling pressure
• Values > 1 indicate more buying volume, < 1 indicate more selling volume
4. Absolute Relative Strength (ARS)
• Dual timeframe analysis with customizable reference points
• High ARS : Performance relative to benchmark from a high reference point (default: Sep 27, 2024)
• Low ARS : Performance relative to benchmark from a low reference point (default: Apr 7, 2025)
• Uses NSE:NIFTY as default comparison symbol
• Color-coded display: Green for outperformance , Red for underperformance
5. Relative Performance Table
• 5 timeframes : 1 Week, 1 Month, 3 Months, 6 Months, 1 Year
• Shows stock performance relative to benchmark index
• Formula: (Stock Return - Index Return) for each period
• Color coding :
- Lime: >5% outperformance
- Yellow: -5% to +5% relative performance
- Red: <-5% underperformance
6. Dynamic Position Allocation System
• 6-factor scoring system based on price vs EMAs (21, 55, 189)
• Evaluates:
- Price above/below each EMA
- EMA alignment (21>55, 55>189, 21>189)
• Allocation recommendations :
- 100% allocation: Score = 6 (all bullish signals)
- 75% allocation: Score = 4
- 50% allocation: Score = 2
- 25% allocation: Score = 0
- 0% allocation: Score = -2, -4, -6 (bearish signals)
Display Tables
Performance Table (Top Right)
Shows relative performance vs benchmark across multiple timeframes with intuitive color coding for quick assessment.
Metrics Table (Bottom Right)
Displays key statistics:
• ADR% : Average Daily Range percentage
• U/D : Up/Down volume ratio
• Allocation% : Recommended position size
• High ARS% : Relative strength from high reference
• Low ARS% : Relative strength from low reference
How to Use This Indicator
For Trend Analysis
1. Moving Average Ribbon : Look for price above ascending MAs for bullish trends
2. MA Alignment : Bullish when shorter MAs are above longer MAs
3. Color coordination : Use consistent color scheme for quick visual analysis
For Entry/Exit Timing
1. Performance Table : Enter when showing consistent outperformance across timeframes
2. Volume Analysis : Confirm entries with U/D ratio > 1.5 for strong buying
3. ARS Values : Look for positive ARS readings for relative strength confirmation
For Position Sizing
1. Allocation System : Use the recommended allocation percentage
2. ADR% Consideration : Adjust position size based on volatility
3. Risk Management : Lower allocation in high ADR% stocks
For Risk Management
1. ADR% for Stop Loss : Set stops at 1-2x ADR% below entry
2. Relative Performance : Reduce positions when consistently underperforming
3. Volume Confirmation : Be cautious when U/D ratio deteriorates
Best Practices
Timeframe Recommendations
• Intraday : Use lower MA periods (5, 13, 21, 55)
• Swing Trading : Default settings work well (13, 21, 55, 189)
• Position Trading : Consider higher periods (21, 50, 100, 200)
Market Conditions
• Trending Markets : Focus on MA alignment and relative performance
• Sideways Markets : Rely more on ADR% for range trading
• Volatile Markets : Reduce allocation percentage regardless of signals
Customization Tips
1. Adjust reference dates for ARS calculation based on significant market events
2. Change comparison symbol to sector-specific indices for better relative analysis
3. Modify MA periods based on your trading style and market characteristics
Technical Specifications
• Version : Pine Script v6
• Overlay : Yes (plots on price chart)
• Real-time Updates : Yes
• Data Requirements : Minimum 252 bars for complete calculations
• Compatible Timeframes : All standard timeframes
Limitations
• Performance calculations require sufficient historical data
• ARS calculations depend on selected reference dates
• Volume analysis may be less reliable in low-volume stocks
• Relative performance is only as good as the chosen benchmark
This indicator is designed to provide a comprehensive analysis framework rather than simple buy/sell signals. It's recommended to use this in conjunction with your overall trading strategy and risk management rules.
Awesome Indicator# Moving Average Ribbon with ADR% - Complete Trading Indicator
## Overview
The **Moving Average Ribbon with ADR%** is a comprehensive technical analysis indicator that combines multiple analytical tools to provide traders with a complete picture of price trends, volatility, relative performance, and position sizing guidance. This multi-faceted indicator is designed for both swing and positional traders looking for data-driven entry and exit signals.
## Key Components
### 1. Moving Average Ribbon System
- **4 Customizable Moving Averages** with default periods: 13, 21, 55, and 189
- **Multiple MA Types**: SMA, EMA, SMMA (RMA), WMA, VWMA
- **Color-coded visualization** for easy trend identification
- **Flexible configuration** allowing users to modify periods, types, and colors
### 2. Average Daily Range Percentage (ADR%)
- Calculates the average daily volatility as a percentage
- Uses a 20-period simple moving average of (High/Low - 1) * 100
- Helps traders understand the stock's typical daily movement range
- Essential for position sizing and stop-loss placement
### 3. Volume Analysis (Up/Down Ratio)
- Analyzes volume distribution over the last 55 periods
- Calculates the ratio of volume on up days vs down days
- Provides insight into buying vs selling pressure
- Values > 1 indicate more buying volume, < 1 indicate more selling volume
### 4. Absolute Relative Strength (ARS)
- **Dual timeframe analysis** with customizable reference points
- **High ARS**: Performance relative to benchmark from a high reference point (default: Sep 27, 2024)
- **Low ARS**: Performance relative to benchmark from a low reference point (default: Apr 7, 2025)
- Uses NSE:NIFTY as default comparison symbol
- Color-coded display: Green for outperformance, Red for underperformance
### 5. Relative Performance Table
- **5 timeframes**: 1 Week, 1 Month, 3 Months, 6 Months, 1 Year
- Shows stock performance **relative to benchmark index**
- Formula: (Stock Return - Index Return) for each period
- **Color coding**:
- Lime: >5% outperformance
- Yellow: -5% to +5% relative performance
- Red: <-5% underperformance
### 6. Dynamic Position Allocation System
- **6-factor scoring system** based on price vs EMAs (21, 55, 189)
- Evaluates:
- Price above/below each EMA
- EMA alignment (21>55, 55>189, 21>189)
- **Allocation recommendations**:
- 100% allocation: Score = 6 (all bullish signals)
- 75% allocation: Score = 4
- 50% allocation: Score = 2
- 25% allocation: Score = 0
- 0% allocation: Score = -2, -4, -6 (bearish signals)
## Display Tables
### Performance Table (Top Right)
Shows relative performance vs benchmark across multiple timeframes with intuitive color coding for quick assessment.
### Metrics Table (Bottom Right)
Displays key statistics:
- **ADR%**: Average Daily Range percentage
- **U/D**: Up/Down volume ratio
- **Allocation%**: Recommended position size
- **High ARS%**: Relative strength from high reference
- **Low ARS%**: Relative strength from low reference
## How to Use This Indicator
### For Trend Analysis
1. **Moving Average Ribbon**: Look for price above ascending MAs for bullish trends
2. **MA Alignment**: Bullish when shorter MAs are above longer MAs
3. **Color coordination**: Use consistent color scheme for quick visual analysis
### For Entry/Exit Timing
1. **Performance Table**: Enter when showing consistent outperformance across timeframes
2. **Volume Analysis**: Confirm entries with U/D ratio > 1.5 for strong buying
3. **ARS Values**: Look for positive ARS readings for relative strength confirmation
### For Position Sizing
1. **Allocation System**: Use the recommended allocation percentage
2. **ADR% Consideration**: Adjust position size based on volatility
3. **Risk Management**: Lower allocation in high ADR% stocks
### For Risk Management
1. **ADR% for Stop Loss**: Set stops at 1-2x ADR% below entry
2. **Relative Performance**: Reduce positions when consistently underperforming
3. **Volume Confirmation**: Be cautious when U/D ratio deteriorates
## Best Practices
### Timeframe Recommendations
- **Intraday**: Use lower MA periods (5, 13, 21, 55)
- **Swing Trading**: Default settings work well (13, 21, 55, 189)
- **Position Trading**: Consider higher periods (21, 50, 100, 200)
### Market Conditions
- **Trending Markets**: Focus on MA alignment and relative performance
- **Sideways Markets**: Rely more on ADR% for range trading
- **Volatile Markets**: Reduce allocation percentage regardless of signals
### Customization Tips
1. Adjust reference dates for ARS calculation based on significant market events
2. Change comparison symbol to sector-specific indices for better relative analysis
3. Modify MA periods based on your trading style and market characteristics
## Technical Specifications
- **Version**: Pine Script v6
- **Overlay**: Yes (plots on price chart)
- **Real-time Updates**: Yes
- **Data Requirements**: Minimum 252 bars for complete calculations
- **Compatible Timeframes**: All standard timeframes
## Limitations
- Performance calculations require sufficient historical data
- ARS calculations depend on selected reference dates
- Volume analysis may be less reliable in low-volume stocks
- Relative performance is only as good as the chosen benchmark
This indicator is designed to provide a comprehensive analysis framework rather than simple buy/sell signals. It's recommended to use this in conjunction with your overall trading strategy and risk management rules.
Backtest - Strategy Builder [AlgoAlpha]🟠 OVERVIEW
This script by AlgoAlpha is a modular Strategy Builder designed to let traders test custom trade entry and exit logic on TradingView without writing their own Pine code. It acts as a framework where users can connect multiple external signals, chain them in sequences, and run backtests with built-in leverage, margin, and risk controls. Its main strength is flexibility—you can define up to five sequential steps for entry and exit conditions on both long and short sides, with logic connectors (AND/OR) controlling how conditions combine. This lets you test complex multi-step confirmation workflows in a controlled, visual backtesting environment.
🟠 CONCEPTS
The system works by linking external signals —these can be values from other indicators, and/or custom sources—to conditional checks like “greater than,” “less than,” or “crossover.” You can stack these checks into steps , where all conditions in a step must pass before the sequence moves to the next. This creates a chain of logic that must be completed before a trade triggers. On execution, the strategy sizes positions according to your chosen leverage mode ( Cross or Isolated ) and allocation method ( Percent of equity or absolute USD value]). Liquidation prices are simulated for both modes, allowing realistic margin behaviour in testing. The script also tracks performance metrics like Sharpe, Sortino, profit factor, drawdown, and win rate in real time.
🟠 FEATURES
Up to 5 sequential steps for both long and short entries, each with multiple conditions linked by AND/OR logic.
Two leverage modes ( Cross and Isolated ) with independent long/short leverage multipliers.
Separate multi-step exit triggers for longs and shorts, with optional TP/SL levels or opposite-side triggers for flipping positions.
Position sizing by equity percent or fixed USD amount, applied before leverage.
Realistic liquidation price simulation for margin testing.
Built-in trade gating and validation—prevents trades if configuration rules aren’t met (e.g., no exit defined for an active side).
Full performance dashboard table showing live strategy status, warnings, and metrics.
Configurable bar coloring based on position side and TP/SL level drawing on chart.
Integration with TradingView's strategy backtester, allowing users to view more detailed metrics and test the strategy over custom time horizons.
🟠 USAGE
Add the strategy to your chart. In the settings, under Master Settings , enable longs/shorts, select leverage mode, set leverage multipliers, and define position sizing. Then, configure your Long Trigger and Short Trigger groups: turn on conditions, pick which external signal they reference, choose the comparison type, and assign them to a sequence step. For exits, use the corresponding Exit Long Trigger and Exit Short Trigger groups, with the option to link exits to opposite-side entries for auto-flips. You can also enable TP and/or SL exits with custom sources for the TP/SL levels. Once set, the strategy will simulate trades, show performance stats in the on-chart table, and highlight any configuration issues before execution. This makes it suitable for testing both simple single-signal systems and complex, multi-filtered strategies under realistic leverage and margin constraints.
🟠 EXAMPLE
The backtester on its own does not contain any indicator calculation; it requires input from external indicators to function. In this example, we'll be using AlgoAlpha's Smart Signals Assistant indicator to demonstrate how to build a strategy using this script.
We first define the conditions beforehand:
Entry :
Longs – SSA Bullish signal (strong OR weak)
Shorts – SSA Bearish signal (strong OR weak)
Exit
Longs/Shorts: (TP/SL hit OR opposing signal fires)
Other Parameters (⚠️Example only, tune this based on proper risk management and settings)
Long Leverage: default (3x)
Short Leverage: default (3x)
Position Size: default (10% of equity)
Steps
Load up the required indicators (in this example, the Smart Signals Assistant).
Ensure the required plots are being output by the indicator properly (signals and TP/SL levels are being plotted).
Open the Strategy Builder settings and scroll down to "CONDITION SETUP"; input the signals from the external indicator.
Configure the exit conditions, add in the TP/SL levels from the external indicator, and add an additional exit condition → {{Opposite Direction}} Entry Trigger.
After configuring the entry and exit conditions, the strategy should now be running. You can view information on the strategy in TradingView's backtesting report and also in the Strategy Builder's information table (default top right corner).
It is important to note that the strategy provided above is just an example, and the complexity of possible strategies stretches beyond what was shown in this short demonstration. Always incorporate proper risk management and ensure thorough testing before trading with live capital.
Rebalance Statistics|█ OVERVIEW
Rebalance statistics is an indicator that gathers relevant data on how often price "rebalances" after an expansion, allowing traders to garner insights on potential future price movements through historical analysis. Additionally, it displays these key levels on the users chart and allows for users to implement filters in order to further deepen their analysis.
█ CONCEPTS
The concept of rebalancing follows the third candle in a typical 3-candle sequence of how an "FVG" is created. Typically, an "FVG" represents the area created during the second candle of an aggressive expansive movement, where the wick of the first candle high or low doesn't overlap with the third candles' high or low, creating an opportunity where traders may expect price to react from.
Rebalancing focuses on the third candle of this sequence, where the "FVG" may be created. When the low of the third candle (in the bullish case) doesn't reach the high of the first candle, the FVG isn't rebalanced, and if it does it's considered rebalanced. This may be useful to determine when movements are likely to retrace, as found by this indicator, most of the time the third candle is likely to rebalance the expansive move.
The indicator will display these areas, including the current ratio that candle 3 rebalanced of the area, as well as the overall stats associated with rebalancing, such as the average ratio of "non-rebalanced" areas, and how often price tends to rebalance these areas.
█ FEATURES
Rebalance areas: After a candle 2 expansion, the indicator will display the current rebalance ratio and the area that has been rebalanced as well as the overall rebalance area.
Rebalance statistics: The indicator will display through a table the overall probability of a rebalance including the average ratio that the candle 3 will rebalance of the overall area.
Time filtering: Filter rebalances to occur only during a specific period of time (suggested for lower timeframes).
Candle sequence filtering: Filter rebalances by only using the cases where the first candle of the sequence is in line with the second one to determine how it affects the statistic.
█ How to use
To use the indicator, simply apply it to your chart and modify any of your desired inputs.
The indicator is setup to display statistics for rebalances based on your current timeframe, but you may also adjust the indicator to only calculate the statistic based on a certain time window in the day done in NY time (UTC-4), or by filtering the candle sequence (candle 1 of the 3 candle sequence must be in the same direction as the ones following it.
Swing Point Volume Z-ScoreSWING POINT VOLUME Z-SCORE INDICATOR
A volume analysis tool that identifies statistical volume spikes at swing points with optional higher timeframe confirmation.
This indicator uses Leviathan's method of swing detection. All credit to him for his amazing work (and any mistakes mine). I was also inspired by Trading Riot, who's Capitulation indicator gave me the idea to create this one.
WHAT IT DOES
This indicator combines three analytical approaches:
- Volume Z-score calculation to measure volume significance statistically
- Automatic swing point detection (higher highs, lower lows, etc.)
- Optional higher timeframe volume confirmation
The Z-score measures how many standard deviations current volume is from the average, helping identify when volume activity is genuinely elevated rather than relying on visual assessment.
VISUAL SYSTEM
The indicator uses a color-coded approach for quick assessment:
GREEN - Normal Activity (Z-Score 1.0-2.0)
Above-average volume levels
ORANGE - Elevated Activity (Z-Score 2.0-3.0)
High volume activity that may indicate increased interest
RED - Potential Institutional Activity (Z-Score 3.0+)
Very high volume levels that could suggest significant market participation
HIGHER TIMEFRAME CONFIRMATION
When enabled, the indicator checks volume on a higher timeframe:
- Checkmark symbol indicates HTF volume also shows elevation
- X symbol indicates HTF volume doesn't confirm
- Auto-selects appropriate higher timeframe or allows manual selection
KEY FEATURES
Statistical Approach: Uses Z-score methodology rather than arbitrary volume thresholds
Adaptive Thresholds: Can adjust based on market volatility conditions
Swing Focus: Concentrates analysis on structurally important price levels
Volume Trends: Shows whether volume is accelerating or decelerating
Success Tracking: Monitors how often HTF confirmation proves effective
DISPLAY OPTIONS
Basic Mode: Essential features with clean interface
Advanced Mode: Additional customization and analytics
Label Sizing: Four size options to fit different screen setups
Table Position: Moveable info table with transparency control
Custom Colors: Adjustable for different chart themes
PRACTICAL APPLICATIONS
May help identify:
- Volume spikes at support/resistance levels
- Potential accumulation or distribution zones
- Breakout confirmation with volume backing
- Areas where larger market participants might be active
Works on all liquid markets and timeframes, though generally more effective on 15-minute charts and higher.
USAGE NOTES
This is an analytical tool that highlights statistically significant volume events. It should be used as part of a broader analysis approach rather than as a standalone trading system.
The indicator works best when combined with:
- Price action analysis
- Support and resistance identification
- Trend analysis
- Proper risk management
Default settings are designed to work well across most instruments, but users can adjust parameters based on their specific needs and trading style.
TECHNICAL DETAILS
Built with Pine Script v5
Compatible with all TradingView subscription levels
Open source code available for review and learning
Works on stocks, forex, crypto, futures, and other liquid instruments
The statistical approach helps remove some subjectivity from volume analysis, though like all technical indicators, it should be used thoughtfully as part of a complete trading plan.
[iQ]PRO Volume Frequency Profile+ PRO Volume Frequency Profile+
Overlay ‑ Institutional-grade volume analytics wrapped around a dynamic regression channel.
🔍 One-glance summary
Linear-regression channel (length 444 default) with up to 4 user-defined standard-deviation bands
Volume Profile across the entire regression window, split by buy vs. sell aggressor
Frequency envelope derived from Ehlers-style band-pass filtering to visualize cyclic expansion / contraction
Smart nodes automatically flag confluence spots where heavy volume intersects the channel or any SD band, checkmarks fill in ehrn area balances *, open X will still be taken .
Alert set for node crosses, regression touches, and SD-band taps
⚙️ Core controls
Key inputs (all collapsible)
Linear Regression
look-back length
extend right
toggle base/median-deviation lines
Standard-Deviation Bands comma-separated multipliers
Volume Profile max bars to scan, opacity
left/right placement
node multiplier
Frequency Analysis period & smoothing for the cyclic wave
Nodes & Alerts
sensitivity slider
three built-in alert conditions
🎯 How to read it
Regression slope – directional bias of the chosen look-back.
Colored volume bars – green-yellow gradient = more buy-aggressor volume, purple-pink = more sell-aggressor.
Diamond labels – “X” = heavy-volume node, “✓” = node-price intersects channel occured or SD band (reaction check).
Oscillating ribbon – upper/lower frequency bands expand when cyclic energy is high → expect volatility; contract → expect chop.
🔔 Alerts included
Price crosses a significant volume-regression node
Price touches the regression line
Price touches any SD band
📏 Compatibility
All symbols & time-frames
Candles, Heikin-Ashi, Renko, Range, etc.
No security() calls → zero repaint, zero delay
ADAM-MMIQ
Spread Mean Reversion Strategy [SciQua]╭───────────────────────────────────────╮
Spread Mean Reversion Strategy
╰───────────────────────────────────────╯
This invite-only futures spread strategy applies a statistical mean reversion framework, executing limit orders exclusively at calculated Z-score thresholds for precise, rules-based entries and exits. It is designed for CME-style spreads and synthetic instruments with well-defined reversion tendencies.
╭────────────╮
Core Concept
╰────────────╯
The strategy calculates a rolling mean and standard deviation of a chosen spread or synthetic price series, then computes the Z-score to measure deviation from the mean in standard deviation units.
Long entries trigger when Z crosses upward through a negative entry threshold (`-devEnter`). A buy limit is placed exactly at the price corresponding to that Z-score, optionally offset by a configurable tick amount.
Short entries trigger when Z crosses downward through a positive entry threshold (`+devEnter`). A sell limit is placed at the corresponding threshold price, also with optional offset.
Exits use the same threshold method, with an independent `Close Limit Offset` to fine-tune exit placement.
╭────────────╮
Key Features
╰────────────╯
Persistence filter – Requires the Z-score to remain beyond threshold for a configurable number of bars before entry.
Cooldown after exits – Prevents immediate re-entry to reduce over-trading.
Daily and weekend flattening – Force-flattens positions via limit orders before exchange maintenance breaks and weekend closes.
Auto-rollover detection with persistence – Detects when the second contract month’s daily volume exceeds the first for a set number of days, then blocks new entries (optional).
Configurable tick offsets – Independently adjust entry and exit levels relative to threshold prices.
Minimum spread width filter – Blocks trades when long/short entry thresholds are too close together.
Contract multiplier override – Allows correct sizing for synthetic symbols where `syminfo.pointvalue` is incorrect or missing.
Limit-only execution – All entries, exits, and forced-flat actions are executed with limit orders for price control.
╭────────────────────╮
Entry Blocking Rules
╰────────────────────╯
New trades are blocked:
During daily maintenance break pre-windows
During weekend close pre-windows
After rollover triggers, if `Block After Roll` is enabled
╭────────────────────────╮
Intended Markets & Usage
╰────────────────────────╯
Built for futures spreads and synthetic instruments , including calendar spreads.
Performs best in markets with clear seasonal or statistical mean-reverting tendencies.
Not designed for strongly trending, non-reverting markets.
╭──────────────────────────╮
Risk Management & Defaults
╰──────────────────────────╯
Fixed default position size of 1 contract (qty calc function available for customization).
Realistic commission and slippage assumptions pre-set.
Pyramiding disabled by default.
Default Z-score levels: Entry at ±2.0, Exit at ±0.5.
Separate tick offset controls for entries and exits.
Note: This strategy is for research and backtesting purposes only. Past performance does not guarantee future results. All use is subject to explicit written permission from the author.
BE-Indicator Aggregator toolkit [Enhanced]█ Overview:
BE-Indicator Aggregator toolkit is an enhanced version of the original toolkit which is built for those we rely on taking multi-confirmation from different indicators available with the traders.
The enhanced version of the Toolkit aid's traders in understanding their custom logic for their trade setups and provides detailed level the results on how it performed over the past considering additional set of parameters such as:
Session Inputs
Parallel Entry | Single Entry
Pyramid Entry | Re - Entry
Single | Multiple Exit Levels, Exit On Opposite Signal
Trailing Of Stop Loss (Liberal & Aggressive Trails)
Extend Target Levels (Locking Profit vs Moving SL to Cost) with Trailing SL
█ Technical Enhancement:
This version is equipped to understand multiple strategies / trade setup for long and short keeping the performance intact. Its important to note that Custom Builder requires text input and hence you are expected to balance between text heavy input vs creative construct of strategy.
toolkit in the backed, equipped with lazy loading features to check the logics and by which performance is kept high at all the time. Depending on the inputs toolkit decides to check for the setups on eligible bars.
█ Additional Features:
Calculated Variables: These are Inner variables which are and can be part of each parameter. These variables can help in conducting mathematical operations before accessing if the logic.
Supported Operating symbols : +, -, *, /, %, (-)
'Sample code to identify HangingMan Candle
VAR-HangingMan:AND:O|L|C, O - L|G|H - O
'O - L & H - O are the calculated variables
Note: Ensure to use space between each of the source values to understand that it requires calculation before pushing for logical assessment.
Another Example: Check if HM candle occurred at Moving average line loaded in Source 1 of the setting.
VAR-HangingMan:AND:O|L|C, O - L|G|H - O
'Check if Low is Less than or Equal to MA line value
VAR-HMClose2MA:AND:ES1 - L|GE|0, HangingMan
'Above Line can be also written as "VAR-HMClose2MA:AND:L (-) ES1|GE|0, HangingMan".
'Enclosing operating symbol with parenthesis converts the output as absolute values.
'Check if Previous Candle was Red and HM candle touched the MA line to trade Reversal Setup
VAR-TwoCandleChk:AND:O |G|C , HMClose2MA
Scope Variables: VAR- keyword can be used to define Logical Conditions as well as independent condition. Defining Rules for VAR- still remain the same. Indicator does the bifurcation. Its better to Map your setups to each of Variable and finally call One L- or S- Condition with OR logic.
A Sample Diagram:
VAR-CriteriaCheck1:Code1
VAR-CriteriaCheck2:AND:Code1, Code2
VAR-CriteriaCheck3:OR:Code1, Code2, Code3
VAR-LongStrategy1:AND:CriteriaCheck1, CriteriaCheck2
VAR-LongStrategy2:OR:CriteriaCheck3, CriteriaCheck2
L-OR:LongStrategy1, LongStrategy2
Note: Search Prioritization starts from Left to Right. LongStrategy1 will be first searched and if not then only it searches for next Strategy. if LongStrategy1 is satisfied It wont search further.
WASTRUE & ISTRUE: These operations can now be part of VAR- keyword.
Note: Ensure to check the Output on the chart. Sometimes it may not work as expected as it can cause repaint and requires to run on each bar for accuracy, however toolkit is not calculating strategy inputs on each bar (basis the input) hence desired results may not come.
Customized Inputs: .
1. Parallelism: Toolkit treats non continuous signals as each Trade. Hence if your signal is valid on alternative bar. toolkit takes trade on alternative Bar whether previous trade is running or not. Toolkit analyses the performance of each trade separately.
You can turn off this method of calculation by enabling "Single Trade at a Time" so that No fresh signal is traded until the previous trade is closed.
2. TP Levels: Customization of TP levels is possible under Input Settings.
3. Independent SL & TGT Levels: Can define Separate SL & TGT levels for Long and Short Trades.
4. Algo Friendly: You can deploy Algo Alerts via Standard Alerts or Via Add Alerts on Indicator Method. Placeholders are made available to support any type of trading. You can customize on when the trading Alerts to be fired via Session Control option.
IMPORTANT Note for Scalpers using Standard Alert (Fx): If you Keep TGT levels very tight along with multiple TP level, on wild movements / Gaps --- if next tick upon Entry directly hits your TGT level, Initial TP level alerts will hit first and Next TP level alert will have 1 - 2 sec delay and so on until TGT alert is fired.
█ Understanding Results Table:
DISCLAIMER: No sharing, copying, reselling, modifying, or any other forms of use are authorized for our documents, script / strategy, and the information published with them. This informational planning script / strategy is strictly for individual use and educational purposes only. This is not financial or investment advice. Investments are always made at your own risk and are based on your personal judgement. I am not responsible for any losses you may incur. Please invest wisely.
Happy to receive suggestions and feedback in order to improve the performance of the indicator better.
[Pandora][Swarm] Rapid Exponential Moving AverageENVISIONING POSSIBILITY
What is the theoretical pinnacle of possibility? The current state of algorithmic affairs falls far short of my aspirations for achievable feasibility. I'm lifting the lid off of Pandora's box once again, very publicly this time, as a brute force challenge to conventional 'wisdom'. The unfolding series of time mandates a transcendental systemic alteration...
THE MOVING AVERAGE ZOO:
The realm of digital signal processing for trading is filled with familiar antiquated filtering tools. Two families of filtration, being 'infinite impulse response' (EMA, RMA, etc.) and 'finite impulse response' (WMA, SMA, etc.), are prevalently employed without question. These filter types are the mules and donkeys of data analysis, broadly accepted for use in finance.
At first glance, they appear sufficient for most tasks, offering a basic straightforward way to reduce noise and highlight trends. Yet, beneath their simplistic facade lies a constellation of limitations and impediments, each having its own finicky quirks. Upon closer inspection, identifiable drawbacks render them far from ideal for many real-world applications in today's volatile markets.
KNOWN FUNDAMENTAL FLAWS:
Despite commonplace moving average (MA) popularity, these conventional filters suffer from an assortment of fundamental flaws. Most of them don't genuinely address core challenges of how to preserve the true dynamics of a signal while suppressing noise and retaining cutoff frequency compliance. Their simple cookie cutter structures make them ill-suited in actuality for dynamic market environments. In reality, they often trade one problem for another dilemma, forsaking analytics to choose between distortion and delay.
A deeper seeded issue remains within frequency compliance, how adequately a filter respects (or disrespects) the underlying signal’s spectral properties according to it's assigned periodic parameter. Traditional MAs habitually distort phase relationships, causing delayed reactions with surplus lag or exaggerations with excessive undershoot/overshoot. For applications requiring timely resilience, such as algorithmic trading, these shortcomings are often functionally unacceptable. What’s needed is vigorous filters that can more accurately retain signal behaviors while minimizing lag without sacrificing smoothness and uniformity. Until then, the public MA zoo remains as a collection of corny compromises, rather than a favorable toolbelt of solutions.
P.S.: In PSv7+, in my opinion, many of these geriatric MAs deserve no future with ease of access for the naive, simply not knowing these filters are most likely creating bigger problems than solving any.
R.E.M.A.
What is this? I prefer to think of it as the "radical EMA", definitely along my lines of a retire everything morte algorithm. This isn't your run of the mill average from the petting zoo. I would categorize it as a paradigm shifting rampant economic masochistic annihilator, sufficiently good enough to begin ruthlessly executing moving averages left and right. Um, yeah... that kind of moving average destructor as you may soon recognize with a few 'Filters+' settings adjustments, realizing ordinary EMA has been doing us an injustice all this time.
Does it possess the capability to relentlessly exterminate most averaging filters in existence? Well, it's about time we find out, by uncaging it on the loose into the greater economic wilderness. Only then can we truly find out if it is indeed a radical exponential market accelerant whose time has come. If it is, then it may eventually become a reality erasing monolithic anomaly destined for greatness, ultimately changing the entire landscape of trading in perpetuity.
UNLEASHING NEXT-GEN:
This lone next generation exoweapon algorithm is intended to initiate the transformative beginning stages of mass filtration deprecation. However, it won't be the only one, just the first arrival of it's alien kind from me. Welcome to notion #1 of my future filtration frontier, on this episode of the algorithmic twilight zone. Where reality takes a twisting turn one dimension beyond practical logic, after persistent models of mindset disintegrate into insignificance, followed by illusory perception confronted into cognitive dissonance.
An evolutionary path to genuine advancement resides outside the prison of preconceptions, manifesting only after divergence from persistent binding restrictions of dogmatic doctrines. Such a genesis in transformative thinking will catalyze unbounded cognitive potential, plowing the way for the cultivation of total redesigns of thought. Futuristic innovative breakthroughs demand the surrender of legacy and outmoded understandings.
Now that the world's largest assembly of investors has been ensembled, there are additional tasks left to perform. I'm compelled to deploy this mathematical-weapon of mass financial creation into it's rightful destined hands, to "WE THE PEOPLE" of TV.
SCRIPT INTENTION:
Deprecate anything and everything as any non-commercial member sees desirably fit. This includes your existing code formulations already in working functional modes of operation AND/OR future projects in the works. Swapping is nearly as simple as copying and pasting with meager modifications, after you have identified comparable likeness in this indicators settings with a visual assessment. Results may become eye opening, but only if you dare to look and test.
Where you may suspect a ta.filter() is lacking sufficient luster or may be flat out majorly deficient, employing rema, drema, trema, or qrema configurations may be a more suitable replacement. That's up to you to discern. My code satire already identifies likely bottom of the barrel suspects that either belong in the extinction record or have already been marked for deprecation. They are ordered more towards the bottom by rank where they belong. SuperSmoother is a masterpiece here to stay, being my original go-to reference filter. Everything you see here is already deprecated, including REMA...
REMA CHARACTERISTICS
- VERY low lag
- No overshoot
- Frequency compliant
- Proper initialization at bar_index==0
- Period parameter accepts poitive floating point numerics (AND integers!)
- Infinite impulse response (IIR) filter
- Compact code footprint
- Minimized computational overhead
BTC Correlation PercentagePurpose
This indicator displays the correlation percentage between the current trading instrument and Bitcoin (BTC/USDT) as a text label on the chart. It helps traders quickly assess how closely an asset's price movements align with Bitcoin's fluctuations.
Key Features
Precise Calculation: Shows correlation as a percentage with one decimal place (e.g., 25.6%).
Customizable Appearance: Allows adjustment of colors, position, and calculation period.
Clean & Simple: Displays only essential information without cluttering the chart.
Universal Compatibility: Works on any timeframe and with any trading pair.
Input Settings
Core Parameters:
BTC Symbol – Ticker for Bitcoin (default: BINANCE:BTCUSDT).
Correlation Period – Number of bars used for calculation (default: 50 candles).
Show Correlation Label – Toggle visibility of the correlation label.
Visual Customization:
Text Color – Label text color (default: white).
Background Color – Label background color (default: semi-transparent blue).
Border Color – Border color around the label (default: gray).
Label Position – Where the label appears on the chart (default: top-right).
Interpreting Correlation Values
70% to 100% → Strong positive correlation (asset moves in sync with BTC).
30% to 70% → Moderate positive correlation.
-30% to 30% → Weak or no correlation.
-70% to -30% → Moderate negative correlation (asset moves opposite to BTC).
-100% to -70% → Strong negative correlation.
Practical Use Cases
For Altcoins: A correlation above 50% suggests high dependence on Bitcoin’s price action.
For Futures Trading: Helps assess systemic risks tied to BTC movements.
During High Volatility: Determines whether an asset’s price change is driven by its own factors or broader market trends.
How It Works
The indicator recalculates automatically with each new candle. For the most reliable results, it is recommended for use on daily or higher timeframes.
This tool provides traders with a quick, visual way to gauge Bitcoin’s influence on other assets, improving decision-making in crypto markets. 🚀
This response is AI-generated, for reference only.
New chat
TRI - Smart Zones============================================================================
# TRI - SMART ZONES v2.0
## Professional Smart Money Concepts Indicator for Pine Script v6
============================================================================
## 📊 OVERVIEW
**TRI - Smart Zones** is a comprehensive Smart Money Concepts indicator that
combines multiple institutional trading concepts into a single, powerful tool.
Built with Pine Script v6 for optimal performance and reliability.
## 🎯 CORE FEATURES
### **Fair Value Gaps (FVG)**
- **Detection**: Automatic identification of price imbalances
- **Types**: Bullish and Bearish Fair Value Gaps
- **Threshold**: Customizable gap size requirements (0.1% default)
- **Extension**: Configurable zone projection length
- **Mitigation**: Real-time tracking of gap fills
### **Order Blocks (OB)**
- **Detection**: Volume-based institutional footprint identification
- **Types**: Bullish and Bearish Order Blocks
- **Method**: Pivot-based volume analysis with configurable lookback
- **Validation**: Market structure confirmation required
- **Extension**: Adjustable zone projection
### **BSL/SSL Liquidity Levels**
- **Multi-Timeframe**: Automatic higher timeframe reference
- **Dynamic**: Real-time level updates and extensions
- **Visual**: Clear line markings with timeframe labels
- **Smart**: Adaptive timeframe selection based on current chart
### **Fibonacci Extensions**
- **ZigZag Integration**: Advanced pivot point detection
- **Levels**: Customizable Fibonacci ratios (38.2%, 61.8%, 100%, 161.8%)
- **Projection**: Dynamic extension from swing points
- **Visual**: Subtle dashed lines with level/price labels
### **Smart Dashboard**
- **Zone Statistics**: Real-time FVG and OB counts
- **Success Rates**: Mitigation percentages for each zone type
- **Market Bias**: Intelligent bullish/bearish/neutral assessment
- **Positioning**: Customizable location and size
### **Zone Analysis Engine**
- **Technical Confluence**: RSI, ADX, ATR, Volume analysis
- **VWAP Integration**: Institutional price reference
- **Confidence Scoring**: High/Mid/Low signal classification
- **Signal Arrows**: Visual trade direction indicators
## 🔔 ALERT SYSTEM
### **Market Structure Alerts**
- `Market Bias Changed` - Shift in overall market sentiment
- `BSL Touched` - Buy Side Liquidity level reached
- `SSL Touched` - Sell Side Liquidity level reached
### **Zone Touch Alerts**
- `OB Touched` - Any Order Block interaction
- `Bullish OB Touched` - Bullish Order Block touch
- `Bearish OB Touched` - Bearish Order Block touch
- `FVG Touched` - Any Fair Value Gap interaction
- `Bullish FVG Touched` - Bullish FVG touch
- `Bearish FVG Touched` - Bearish FVG touch
- `Zone Touched` - Any Smart Zone interaction
- `Bullish Zone Touched` - Any bullish zone touch
- `Bearish Zone Touched` - Any bearish zone touch
## ⚙️ CONFIGURATION
### **Zone Detection**
- Enable/disable FVG and OB detection independently
- Maximum zones per type (3-15, default: 8)
- Zone-specific threshold and extension settings
### **Visual Customization**
- Individual color schemes for each zone type
- Adjustable transparency levels
- Configurable line styles and widths
- Dashboard positioning and sizing options
### **Technical Analysis**
- RSI, ADX, ATR period customization
- Volume threshold multipliers
- Confidence level color coding
- Signal display toggle
## 🚀 PINE SCRIPT v6 OPTIMIZATIONS
- **User-Defined Types**: Structured data for zones and statistics
- **Methods**: Type-specific operations for better code organization
- **Enhanced Arrays**: Optimized memory management
- **Switch Statements**: Improved performance for zone classification
- **Error Handling**: Robust input validation and edge case management
- **Performance**: Efficient algorithms for real-time analysis
## 📈 TRADING APPLICATIONS
### **Entry Strategies**
- Zone confluence for high-probability setups
- Multi-timeframe confirmation via BSL/SSL
- Fibonacci extension targets
- Signal arrows for directional bias
### **Risk Management**
- Zone mitigation for stop-loss placement
- Market bias for position sizing
- Dashboard statistics for strategy validation
### **Market Analysis**
- Institutional footprint identification
- Liquidity level mapping
- Market structure assessment
- Trend continuation vs reversal analysis
## 🔧 TECHNICAL SPECIFICATIONS
- **Version**: Pine Script v6
- **Overlay**: True (draws on price chart)
- **Max Objects**: 100 boxes, 100 lines, 50 labels
- **Performance**: Optimized for real-time analysis
- **Compatibility**: All TradingView chart types and timeframes