ICT Multi-Session Hi/L/EQ
Indicator Overview: The "ICT Multi-Session Hi/L/EQ" indicator is a versatile tool designed for traders utilizing Inner Circle Trader (ICT) strategies, enabling the visualization of key price levels—High (H), Low (L), Equilibrium (EQ, the midpoint between high and low), and Optimal Trade Entry (OTE) levels at 61.8%, 70%, and 79% of the session range—across up to 6 customizable market sessions on a single chart.
Core Functionality: It dynamically tracks and plots session-specific highs, lows, and EQ, updating in real-time as price action evolves, providing traders with immediate insights into potential support, resistance, and balance zones during defined periods like the Asian, London, or New York sessions. This multi-session capability allows for comprehensive market analysis without the need for multiple indicators.
Unique OTE Auto Detection: A standout feature is the automatic detection and directional calculation of OTE levels. When a session forms a new high, OTE levels are recalculated downward from the high to the low (bearish bias), highlighting potential short entry zones. Conversely, a new low triggers upward OTE levels from the low to the high (bullish bias), signaling long opportunities. This auto-detection adapts to market momentum without manual input, making it highly unique for ICT traders seeking efficient entry signals based on range retracements. No other indicator combines this session-based auto-directionality with OTE percentages tailored for ICT methodologies.
Left-Side Trimming Innovation: Another innovative aspect is the left-side trimming option, which allows users to limit the historical extension of lines to a user-defined number of bars (e.g., the last 8 bars), reducing chart clutter and focusing attention on recent price action. This feature is particularly unique as it addresses a common issue in multi-session indicators where full historical lines can overwhelm the chart, making it ideal for scalpers or day traders who prioritize clarity.
Without trimming the left side:
And when left side trimming is enabled:
Multi-Session Customization: Support for up to 6 independent sessions, each with individual time ranges (HHMM-HHMM format), timezones, and enable/disable toggles, offers unparalleled flexibility. Traders can configure sessions for specific market phases (e.g., Asia: 2000-0000 UTC) and customize colors, line styles (solid, dashed, dotted), and label properties separately, ensuring a personalized setup for global trading environments.
Auto-Deletion at Market Close: Levels can be automatically deleted at the session's calculated market close (17:00 NY timestamp), keeping the chart clean for the next session or day, a useful feature for avoiding accumulation of outdated levels.
Label and Visual Controls: Users can toggle labels on/off, adjust text color, background color, transparency, and size (tiny, small, normal, large), with options to stick labels to the right for better visibility. This level of customization ensures the indicator integrates seamlessly with any chart style.
No External Dependencies: All calculations are performed using built-in Pine Script functions on the chart's price data, making it self-contained and reliable without needing external libraries or data sources.
Professional and Compliant Design: Developed to comply with TradingView House Rules, this indicator is original in its combination of multi-session plotting, directional OTE auto-detection, and left-side trimming, providing traders with a robust tool for ICT-based analysis.
How It Works
Session Setup: Define session times and timezones in settings; the script tracks high/low from session start.
Level Calculation: High/low update on every bar; EQ is the midpoint. OTE levels recalculate directionally upon new extremes.
Drawing Mechanism: Lines extend with user-defined padding; trimming cuts left side for cleanliness.
Update Logic: OTE direction shifts based on new high/low detection, with levels refreshed accordingly.
Deletion: Auto-deletes at session end if enabled, resetting for new sessions.
Uniqueness and Innovation
Session OTE Auto Detection: Automatically adjusts OTE direction based on new highs/lows, a feature not commonly available in other indicators, enabling hands-free bias identification.
Left-Side Trimming: Unique clutter-reduction tool that trims historical lines, improving chart readability—a rare capability in session-based indicators.
Multi-Session Support: Handles 6 sessions independently, with per-session OTE, making it a one-stop tool for global market analysis.
Directional OTE: Adapts to market bias, offering dynamic entry zones tailored to ICT strategies.
Full Customization: Extensive controls for visuals and behavior, ensuring adaptability to individual trading styles.
User Guide: How to Use the "ICT Multi-Session Hi/L/EQ" Indicator
This guide provides a comprehensive, step-by-step explanation of how to use the "ICT Multi-Session Hi/L/EQ" indicator on TradingView. The indicator is designed to help Inner Circle Trader (ICT) enthusiasts plot key price levels—High (H), Low (L), Equilibrium (EQ, the midpoint), and Optimal Trade Entry (OTE) levels at 61.8%, 70%, and 79% of the session range—across up to 6 customizable sessions. It also includes a Candle Open line for midnight or custom times. I'll break it down by settings groups, explaining each option, its purpose, how to tweak it, and tips for optimal use. All settings are accessible via the indicator's settings panel (cog icon next to the indicator name on your chart).
General Settings
These control global behaviors that apply to all sessions and levels. They allow you to customize the overall appearance and functionality of the indicator on your chart.
Line Padding (Bars Beyond Current): This integer input (default: 2, minimum: 0) extends the plotted lines beyond the current bar by the specified number of bars.
How to Use/Tweak: Increase this value (e.g., to 5) for longer forward projections of levels, useful for anticipating future price action. Decrease to 0 for no extension. It's ideal for traders who like to see levels projected ahead in volatile markets.
Tip: On lower timeframes (e.g., 5M), higher padding (4-6) helps visualize potential targets; on higher timeframes (1H), keep it low to avoid clutter.
Label Padding (Bars from Line End): An integer (default: 3, minimum: 0) that positions labels away from the end of the lines by the specified bars.
How to Use/Tweak: Adjust to move labels further right (higher value) or closer to the line end (lower value). This prevents label overlap with price action or other indicators.
Tip: If your chart has many labels, set to 5+ for better readability; use 1-2 for minimalistic setups.
Enable Left-Side Trimming: A boolean toggle (default: true) to trim lines from the left, limiting their historical extension.
How to Use/Tweak: Turn on to reduce chart clutter by showing only recent bars of the lines; turn off for full historical view. Pairs with "Left Trim Bars" for fine-tuning.
Tip: Enable for clean charts during live trading; disable for backtesting to see long-term patterns.
Left Trim Bars: An integer (default: 8, minimum: 1) specifying how many bars back from the current bar to trim lines when left trimming is enabled.
How to Use/Tweak: Set higher (e.g., 20) for more historical visibility while trimmed; lower (e.g., 4) for ultra-clean charts focusing on immediate action.
Tip: Use 8-12 for intraday trading on 15M charts; adjust based on timeframe to balance context and clarity.
Stick Labels to Right of Current Bar: A boolean toggle (default: true) to position labels at the right end of the lines.
How to Use/Tweak: Enable for labels to "stick" right, keeping them visible as the chart updates; disable for labels at the current bar position.
Tip: Keep enabled for real-time trading to avoid labels shifting left; disable for static analysis.
Delete Previous Session Lines/Labels on Market Close: A boolean toggle (default: true) to automatically delete session lines and labels at the calculated market close (17:00 NY time).
How to Use/Tweak: Enable to keep the chart clean by clearing old sessions; disable to retain historical levels for reference.
Tip: Enable for live trading to focus on active sessions; disable for educational reviews or backtesting.
Session 1 to 6 Settings
Each session has identical options, allowing independent configuration. I'll describe Session 1; replicate for others by changing the number (e.g., Session 2 uses "Session 2 Name", etc.).
Session Name: String input (default: "Asia" for Session 1) to label the session (e.g., "Asia" or "London").
How to Use/Tweak: Enter a descriptive name like "NY Open" for clarity in labels (e.g., "NY Open High").
Tip: Use short names to avoid long labels; this appears in all session labels for easy identification.
Session Time (HHMM-HHMM): Session input (default: "2000-0000" for Session 1) to define the start and end time.
How to Use/Tweak: Set the time range (e.g., "0930-1600" for NY session). Ensure start < end in 24-hour format.
Tip: Use for custom sessions like "London Kill Zone" (0800-1100); validate with the timezone setting.
Session Timezone: String selection (default: "America/New_York") from a list of options.
How to Use/Tweak: Choose the timezone matching your session (e.g., "Europe/London" for UK times).
Tip: Align with session name for accuracy; "Etc/UTC" for universal times.
Enable Session Drawings: Boolean toggle (default: true for Session 1, false for others) to activate the session's lines and labels.
How to Use/Tweak: Enable to show the session; disable to hide it without removing settings.
Tip: Enable one session at a time for focused analysis; use for multi-session overlays.
Enable EQ Line/Label: Boolean toggle (default: true) to show the EQ line and label.
How to Use/Tweak: Enable for midpoint plotting; disable to hide EQ while keeping high/low.
Tip: Useful for ICT fair value gaps; toggle off if focusing on extremes only.
Enable Labels: Boolean toggle (default: true) to show labels for high, low, EQ, and OTE levels.
How to Use/Tweak: Enable for annotated levels; disable for lines-only view.
Tip: Disable on crowded charts; customize label size for better readability.
Enable OTE Levels: Boolean toggle (default: false) to activate OTE levels (61.8%, 70%, 79%).
How to Use/Tweak: Enable for OTE plotting; disable to hide while keeping high/low/EQ.
Tip: Toggle on for entry zone identification; adjust colors for visual distinction.
Line Color: Color input (default varies by session, e.g., blue for Session 1) for lines.
How to Use/Tweak: Choose a color to differentiate sessions (e.g., green for bullish).
Tip: Use contrasting colors for multiple sessions; match your chart theme.
Line Style: String selection (default: "Dashed") from "Solid", "Dashed", "Dotted".
How to Use/Tweak: Select style for line appearance (e.g., dotted for OTE).
Tip: Use dashed for OTE to distinguish from solid high/low lines.
Label Text Color: Color input (default: white) for label text.
How to Use/Tweak: Set to contrast with background (e.g., black on white charts).
Tip: Use bright colors for visibility; match line color for cohesion.
Label Background Color: Color input (default: black) for label background.
How to Use/Tweak: Choose a semi-transparent background for readability.
Tip: Set to chart background color for subtle labels.
Label Transparency (0=opaque, 100=transparent): Integer input (default: 70) for label opacity.
How to Use/Tweak: Lower for solid labels (e.g., 0); higher for see-through (e.g., 90).
Tip: Use 50-80 for balance; 100 hides background entirely.
Label Text Size: String selection (default: "Small") from "Tiny", "Small", "Normal", "Large".
How to Use/Tweak: Choose size for label visibility (e.g., "Large" for emphasis).
Tip: "Small" for crowded charts; "Large" for main levels.
OTE 61.8% Color: Color input (default: purple) for 61.8% OTE line.
How to Use/Tweak: Customize to highlight the 61.8% level (e.g., gold for key entry).
Tip: Use distinct colors for each OTE level to differentiate (e.g., purple, orange, teal).
OTE 70% Color: Color input (default: orange) for 70% OTE line.
How to Use/Tweak: Set to a secondary color for mid-range OTE.
Tip: Coordinate with overall theme; use faded shades for less prominence.
OTE 79% Color: Color input (default: teal) for 79% OTE line.
How to Use/Tweak: Choose for the deepest OTE level (e.g., red for aggressive entries).
Tip: Make it stand out if 79% is your preferred entry zone.
Candle Open Settings
This section adds a custom open line (e.g., midnight open) with similar customization.
Use Time 1: Boolean toggle (default: true) to enable the first time setting.
How to Use/Tweak: Enable for the open line; disable to hide.
Tip: Use for midnight open in ICT setups; toggle off if not needed.
Name: String input (default: "Midnight Open") for the open line label.
How to Use/Tweak: Change to "Daily Open" or similar for context.
Tip: Keep short for clean labels.
Start Time: String input (default: "0000") for open range start.
How to Use/Tweak: Set in HHMM format (e.g., "0000" for midnight).
Tip: Ensure valid (0000-2359); pair with end time for narrow ranges.
End Time: String input (default: "0001") for open range end.
How to Use/Tweak: Set slightly after start (e.g., "0001") for precise open capture.
Tip: Use for quick ranges; start < end always.
Color: Color input (default: teal) for the open line.
How to Use/Tweak: Customize to distinguish from session lines.
Tip: Use gray for subtle open lines.
Timezone: String selection (default: "America/New_York") for the open line.
How to Use/Tweak: Choose matching your chart or session.
Tip: "Etc/UTC" for universal opens.
Enable Line/Label: Boolean toggle (default: true) for the open line/label.
How to Use/Tweak: Enable to show; disable to hide.
Tip: Use for daily opens in ICT; toggle off for session-only focus.
Enable Label: Boolean toggle (default: true) for the open label.
How to Use/Tweak: Enable for named label; disable for line-only.
Tip: Disable if labels clutter the chart.
Auto Delete at 18:00 NY: Boolean toggle (default: true) to delete at 18:00 NY.
How to Use/Tweak: Enable for cleanup; disable to retain.
Tip: Align with new day start; useful for resetting.
Stick Label to Right: Boolean toggle (default: true) for label positioning.
How to Use/Tweak: Enable for right-side labels; disable for current bar.
Tip: Keep enabled for visibility as chart updates.
Enable Left-Side Trimming: Boolean toggle (default: true) for open line trimming.
How to Use/Tweak: Enable to trim historical open line; disable for full view.
Tip: Similar to session trimming; use for clean charts.
Left Trim Bars: Integer input (default: 8) for open line trim bars.
How to Use/Tweak: Set the number of bars back to show when trimming.
Tip: Lower for more focus; higher for context.
Line Padding (Bars Beyond Current): Integer input (default: 2) for open line extension.
How to Use/Tweak: Increase for forward projection; decrease for no extension.
Tip: Match general padding for consistency.
Label Padding (Bars from Line End): Integer input (default: 3) for open label position.
How to Use/Tweak: Adjust to move label away from line end.
Tip: Higher for spaced labels; lower for compactness.
Line Style: String selection (default: "Solid") for open line style.
How to Use/Tweak: Choose "Dashed" or "Dotted" for distinction.
Tip: Use dotted for subtle opens.
Label Text Color: Color input (default: white) for open label text.
How to Use/Tweak: Set to contrast with background.
Tip: Black for light charts.
Label Background Color: Color input (default: black) for open label background.
How to Use/Tweak: Customize for visibility.
Tip: Semi-transparent for blend.
Label Transparency: Integer input (default: 70) for open label opacity.
How to Use/Tweak: 0 for opaque; 100 for transparent.
Tip: 50-80 for balance.
Label Text Size: String selection (default: "Small") for open label size.
How to Use/Tweak: "Large" for emphasis; "Tiny" for minimalism.
Tip: "Normal" for standard use.
Custom
Dual Custom Index with SpreadDual Custom Index with Spread
Create powerful custom indices from any instruments and analyze their relative strength dynamics
Overview
This advanced indicator allows you to build two completely customizable indices from your choice of instruments and analyze their spread relationship. Perfect for inter-market analysis, sector rotation strategies, currency strength comparisons, and sophisticated relative performance studies.
Key Features
🔧 Fully Customizable Index Construction
Build each index from up to 6 instruments with individual weightings
Enable/disable instruments on the fly without losing settings
Automatic weight validation ensures mathematically accurate calculations
Invert functionality for instruments that move opposite to index strength
📊 Advanced ADX-Based Methodology
Uses sophisticated ADX +DI/-DI directional bias calculations
Normalized bias calculation for consistent scaling across different instruments
Optimized default settings for intraday trading with full customization options
Professional-grade smoothing and filtering options
📈 Dual Analysis Modes
Difference Mode: Shows absolute strength difference (Index1 - Index2)
Ratio Mode: Shows relative performance ratio (Index1 / Index2)
Additional spread smoothing for cleaner signals
🎨 Professional Display Options
Custom labels with full color, size, and positioning control
Dynamic "Follow Line" labels that move with your data
Static corner positioning for reference displays
Clean error messaging and validation feedback
Use Cases
Gold Trading: Create gold strength vs USD strength indices for precise market timing
Sector Analysis: Compare technology vs financial sector strength for rotation strategies
Currency Strength: Build custom currency baskets for advanced forex analysis
Commodity Spreads: Analyze relative strength between different commodity groups
Regional Markets: Compare strength between different geographical market indices
Crypto Analysis: Track relative performance between different cryptocurrency sectors
Technical Specifications
Instruments per Index: Up to 6 with individual enable/disable
Weight Validation: Automatic 100% total weight enforcement
Calculation Method: ADX-based directional bias with trend strength weighting
Smoothing Options: Multiple levels of customizable smoothing
Error Handling: Professional validation with clear user feedback
Optimization Tips
Intraday Trading: Use DI Length 3-7 for faster response
Daily Analysis: Use DI Length 10-14 for smoother signals
Noisy Markets: Increase Final Smoothing for cleaner signals
Trending Markets: Lower smoothing values for faster reaction
Perfect for traders who need sophisticated inter-market analysis tools beyond standard indicators. Whether you're analyzing gold vs dollar dynamics, sector rotation opportunities, or custom currency strength relationships, this indicator provides institutional-grade analysis capabilities with complete customization flexibility.
MTF Custom Synthetic IndexMTF Custom Synthetic Index - Ultimate Index Creation Tool
🎯 What is this indicator?
The MTF Custom Synthetic Index is a powerful, fully customizable indicator that allows you to create your own synthetic index using up to 6 different instruments of your choice. Unlike traditional indices, this tool gives you complete control over instrument selection, weightings, and calculation methodology.
⭐ Key Features
🔧 Complete Customization
Choose ANY instruments: Forex pairs, stocks, commodities, indices, cryptocurrencies, bonds, etc.
Manual weight control: Set exact percentage weights for each instrument (must total 100%).
Flexible instrument direction: Ability to invert enabled instruments that move opposite to your desired index direction (i.e. you can use instruments that are negatively correlated).
📊 Multi-Timeframe Analysis
Simultaneous monitoring: View index strength across up to 3 additional timeframes.
Strength rating system: Automatic classification (Very Strong, Strong, Neutral, Weak, Very Weak).
Normalization options: Z-Score, Min-Max, or Percentage methods for timeframe comparison.
Visual summary table: Real-time strength ratings for all timeframes.
🎨 Professional Visualization
Clean chart display: Smooth index strength line with customizable styling.
Dynamic labelling: Real-time value display with strength ratings.
Color-coded indicators: Visual strength representation with intuitive colour schemes.
💡 Use Cases
🌍 Currency Strength Analysis
USD Index: Combine EURUSD (inverted), USDJPY, AUDUSD (inverted), etc.
EUR Index: Combine EURUSD, EURGBP, EURJPY, etc.
Multi-currency baskets: Track regional currency performance.
📈 Sector/Industry Tracking
Technology sector: Combine AAPL, MSFT, GOOGL with custom weights.
Energy sector: Combine oil, gas, and energy stocks.
Precious metals: Combine gold, silver, platinum with custom allocations.
🏛️ Macro Economic Indices
Interest rate sensitivity: Combine bonds, currency pairs, and rate-sensitive stocks.
Inflation hedges: Combine commodities, TIPS, and inflation-sensitive assets.
Risk appetite: Combine safe havens vs. risk assets.
💰 Portfolio Replication
Custom benchmarks: Create indices that match your specific portfolio allocation.
Strategy testing: Build theoretical indices to test investment strategies.
🔥 Key Benefits
✅ Precision Control
Exact weight specifications with mandatory 100% total.
Choose instruments that matter to your trading strategy.
Advanced ADX/DI calculation methodology with configurable parameters.
✅ Versatile Application
Works with any asset class available on TradingView.
Suitable for scalping, day trading, swing trading, and long-term analysis.
Perfect for both retail and institutional approaches.
✅ Multi-Timeframe Insights
Quickly and easily pot divergences between timeframes.
Confirm trends across multiple time horizons.
Make better-informed trading decisions.
⚙️ Technical Specifications
Calculation Method
Base algorithm: Advanced ADX (Average Directional Index) with Directional Indicators.
Bias calculation: Normalized or raw DI difference with ADX weighting.
Smoothing options: Configurable periods for DI calculation and ADX smoothing.
Validation & Safety
Weight validation: Must total exactly 100% - prevents calculation errors.
Data integrity: Handles missing data and invalid symbols gracefully.
Timeframe validation: Prevents duplicate or invalid timeframe selections.
🚀 Perfect For
Currency traders seeking custom dollar/euro/yen/etc strength indices.
Commodity traders seeking custom precious metal/energy/etc strength indices.
Portfolio managers needing custom benchmark creation.
Macro traders building economic strength indicators.
Systematic traders requiring precise, repeatable index calculations.
📋 Quick Start
Add the indicator to your chart
Configure instruments: Select your desired symbols and weights (must total 100%).
Set timeframes: Choose additional timeframes for multi-timeframe analysis.
Customize display: Adjust colors, labels, and table settings to your preference.
Start trading: Use the index strength readings to guide your trading decisions.
⚠️ Important Notes
Weights must total exactly 100%: The indicator will show an error if weights don't add up correctly.
Data requirements: All selected instruments must have available data for the calculation to work.
Timeframe selection: Multi-timeframe analysis requires different timeframes from your main/selected chart.
Transform your trading with the power of custom index creation. Take control of your analysis and build indices that truly matter to your trading strategy.
Multi Averages - CustomizableThis script adds up to 5 moving averages to your plot!
Both type and length are customizable.
VIX Filter/RSI/EMA Bias/Cum-TICK w/ Exhaustion Zone DashboardThis all-in-one dashboard gives intraday traders a real-time visual read of market conditions, combining volatility regime, trend bias, momentum exhaustion, and internal strength — all in a fully customizable overlay that won’t clutter your chart.
📉 VIX Market Regime Detector
Identifies "Weak", "Normal", "Volatile", or "Danger" market states based on customizable VIX ranges and symbol (e.g., VXN or VIX).
📊 RSI Momentum Readout
Displays real-time RSI from any selected timeframe or symbol, with adjustable length, OB/OS thresholds, and color-coded exhaustion alerts.
📈 EMA Trend Bias Scanner
Compares fast and slow EMAs to define bullish or bearish bias, using your preferred timeframe, symbol, and EMA lengths — ideal for multi-timeframe setups.
🧠 Cumulative TICK Pressure & Exhaustion Engine
Analyzes internal market strength using cumulative TICK data to classify conditions as:
-Strong / Mild Bullish or Bearish Pressure
-Choppy / No Edge
-⚠️ Exhaustion Zones — when raw TICK values hit extreme highs/lows, a separate highlight box appears in the dashboard, warning of potential turning points
All logic is customizable, including TICK symbol, timeframes, thresholds, and lookback periods.
Scalpers and day traders who want fast, visual insight into market internals, exhaustion, and trend bias.
Gold DynamicThis is a custom-made TradingView indicator designed to visualize "sequential price levels" based on a user-defined step value, dynamically centered around the current gold price. It draws horizontal lines at multiples of a chosen step value (e.g., 7) both above and below the current price.
Key Features:
Dynamic Price Levels: Lines are calculated relative to the live price, providing relevant support/resistance or structural levels for the current market context.
Customizable Step Value: Easily adjust the Sequence Step Value (e.g., 7, 10, 14) from the indicator settings to align with your trading theory.
Adjustable Line Count: Control the Number of Lines ABOVE Current Price and Number of Lines BELOW Current Price to show as many or as few levels as desired.
Extended Lines: Horizontal lines extend indefinitely to both the left (historical data) and right (future projection) for comprehensive visualization.
Clear Price Labels: Each line displays its exact price value, positioned at the far right of the chart for quick reference.
Customizable Appearance: Modify line color, width, and style (solid, dotted, dashed) to suit your charting preferences.
Exact Values: All displayed price labels are rounded to whole numbers for clear, precise visualization without decimal values.
This indicator is ideal for traders looking to apply a fixed-step price theory to their gold analysis.
Top Right Watermark# TopRight Watermark
**Finally, a watermark that stays out of your way!**
Tired of TradingView's default watermark blocking your price action and technical analysis? This customizable watermark indicator gives you complete control over positioning and content display.
## 🎯 Key Features
**✅ Flexible Positioning** - Place anywhere: corners, sides, or edges
**✅ Multi-Slot Display** - Up to 3 customizable information slots
**✅ Individual Font Control** - Different sizes for each slot
**✅ Platform Compatibility** - TradingView OR MetaTrader timeframe formats
**✅ Clean & Professional** - Customizable colors and transparency
## 🔧 What You Can Display
- **Timeframe** - Current chart period
- **Ticker** - Symbol name (smart formatting for crypto/forex)
- **Exchange** - Broker/platform name
- **Custom Text** - Your own message
- **Empty** - Hide unused slots
## 🎨 Customization Options
- **Position**: 9 placement options (top/middle/bottom + left/center/right)
- **Colors**: Full color picker with transparency control
- **Font Sizes**: 5 sizes available per slot (tiny to huge)
- **Timeframe Style**: Choose TradingView (1m, 4H) or MetaTrader (M1, H4) format
## 🚀 Perfect For
- Traders who need clean chart visibility
- Multi-timeframe analysis
- Professional chart screenshots
- Platform migrants (MT4/MT5 to TradingView)
- Anyone wanting organized chart information
## 💡 Pro Tips
- Place in corners to avoid price action interference
- Combine Exchange + Ticker + Timeframe for complete context
- Use transparency to make it subtle but visible
**Stop letting watermarks interfere with your trading analysis. Take control of your chart display today!**
---
*Compatible with all TradingView chart types and timeframes. Easy setup with intuitive controls.*
Zweig Market Breadth Thrust Indicator+Trigger [LazyBear x rwak]The Breadth Thrust (BT) indicator is a market momentum indicator developed by Dr. Martin Zweig. According to Dr. Zweig, a Breadth Thrust occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40 percent to above 61.5 percent.
A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. This is very rare and has happened only a few times. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust.
This version of the Breadth Thrust indicator includes a trigger visualized with red circles, making it easier to spot when the indicator crosses the critical 61.5% level, signaling potential bullish momentum.
All parameters are configurable. You can draw BT for NYSE, NASDAQ, AMEX, or based on combined data (i.e., AMEX+NYSE+NASD). There is also a "CUSTOM" mode supported, so you can enter your own ADV/DEC symbols.
Credit: The original Breadth Thrust logic was created by LazyBear, whose public indicators can be found here , and app-store indicators here .
More info:
Definition of Breadth Thrust
A Breadth Thrust Signal
A Rare "Zweig" Buy Signal
Zweig Breadth Thrust: Redux
real_time_candlesIntroduction
The Real-Time Candles Library provides comprehensive tools for creating, manipulating, and visualizing custom timeframe candles in Pine Script. Unlike standard indicators that only update at bar close, this library enables real-time visualization of price action and indicators within the current bar, offering traders unprecedented insight into market dynamics as they unfold.
This library addresses a fundamental limitation in traditional technical analysis: the inability to see how indicators evolve between bar closes. By implementing sophisticated real-time data processing techniques, traders can now observe indicator movements, divergences, and trend changes as they develop, potentially identifying trading opportunities much earlier than with conventional approaches.
Key Features
The library supports two primary candle generation approaches:
Chart-Time Candles: Generate real-time OHLC data for any variable (like RSI, MACD, etc.) while maintaining synchronization with chart bars.
Custom Timeframe (CTF) Candles: Create candles with custom time intervals or tick counts completely independent of the chart's native timeframe.
Both approaches support traditional candlestick and Heikin-Ashi visualization styles, with options for moving average overlays to smooth the data.
Configuration Requirements
For optimal performance with this library:
Set max_bars_back = 5000 in your script settings
When using CTF drawing functions, set max_lines_count = 500, max_boxes_count = 500, and max_labels_count = 500
These settings ensure that you will be able to draw correctly and will avoid any runtime errors.
Usage Examples
Basic Chart-Time Candle Visualization
// Create real-time candles for RSI
float rsi = ta.rsi(close, 14)
Candle rsi_candle = candle_series(rsi, CandleType.candlestick)
// Plot the candles using Pine's built-in function
plotcandle(rsi_candle.Open, rsi_candle.High, rsi_candle.Low, rsi_candle.Close,
"RSI Candles", rsi_candle.candle_color, rsi_candle.candle_color)
Multiple Access Patterns
The library provides three ways to access candle data, accommodating different programming styles:
// 1. Array-based access for collection operations
Candle candles = candle_array(source)
// 2. Object-oriented access for single entity manipulation
Candle candle = candle_series(source)
float value = candle.source(Source.HLC3)
// 3. Tuple-based access for functional programming styles
= candle_tuple(source)
Custom Timeframe Examples
// Create 20-second candles with EMA overlay
plot_ctf_candles(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 20,
timezone = -5,
tied_open = true,
ema_period = 9,
enable_ema = true
)
// Create tick-based candles (new candle every 15 ticks)
plot_ctf_tick_candles(
source = close,
candle_type = CandleType.heikin_ashi,
number_of_ticks = 15,
timezone = -5,
tied_open = true
)
Advanced Usage with Custom Visualization
// Get custom timeframe candles without automatic plotting
CandleCTF my_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 30
)
// Apply custom logic to the candles
float ema_values = my_candles.ctf_ema(14)
// Draw candles and EMA using time-based coordinates
my_candles.draw_ctf_candles_time()
ema_values.draw_ctf_line_time(line_color = #FF6D00)
Library Components
Data Types
Candle: Structure representing chart-time candles with OHLC, polarity, and visualization properties
CandleCTF: Extended candle structure with additional time metadata for custom timeframes
TickData: Structure for individual price updates with time deltas
Enumerations
CandleType: Specifies visualization style (candlestick or Heikin-Ashi)
Source: Defines price components for calculations (Open, High, Low, Close, HL2, etc.)
SampleType: Sets sampling method (Time-based or Tick-based)
Core Functions
get_tick(): Captures current price as a tick data point
candle_array(): Creates an array of candles from price updates
candle_series(): Provides a single candle based on latest data
candle_tuple(): Returns OHLC values as a tuple
ctf_candles_array(): Creates custom timeframe candles without rendering
Visualization Functions
source(): Extracts specific price components from candles
candle_ctf_to_float(): Converts candle data to float arrays
ctf_ema(): Calculates exponential moving averages for candle arrays
draw_ctf_candles_time(): Renders candles using time coordinates
draw_ctf_candles_index(): Renders candles using bar index coordinates
draw_ctf_line_time(): Renders lines using time coordinates
draw_ctf_line_index(): Renders lines using bar index coordinates
Technical Implementation Notes
This library leverages Pine Script's varip variables for state management, creating a sophisticated real-time data processing system. The implementation includes:
Efficient tick capturing: Samples price at every execution, maintaining temporal tracking with time deltas
Smart state management: Uses a hybrid approach with mutable updates at index 0 and historical preservation at index 1+
Temporal synchronization: Manages two time domains (chart time and custom timeframe)
The tooltip implementation provides crucial temporal context for custom timeframe visualizations, allowing users to understand exactly when each candle formed regardless of chart timeframe.
Limitations
Custom timeframe candles cannot be backtested due to Pine Script's limitations with historical tick data
Real-time visualization is only available during live chart updates
Maximum history is constrained by Pine Script's array size limits
Applications
Indicator visualization: See how RSI, MACD, or other indicators evolve in real-time
Volume analysis: Create custom volume profiles independent of chart timeframe
Scalping strategies: Identify short-term patterns with precisely defined time windows
Volatility measurement: Track price movement characteristics within bars
Custom signal generation: Create entry/exit signals based on custom timeframe patterns
Conclusion
The Real-Time Candles Library bridges the gap between traditional technical analysis (based on discrete OHLC bars) and the continuous nature of market movement. By making indicators more responsive to real-time price action, it gives traders a significant edge in timing and decision-making, particularly in fast-moving markets where waiting for bar close could mean missing important opportunities.
Whether you're building custom indicators, researching price patterns, or developing trading strategies, this library provides the foundation for sophisticated real-time analysis in Pine Script.
Implementation Details & Advanced Guide
Core Implementation Concepts
The Real-Time Candles Library implements a sophisticated event-driven architecture within Pine Script's constraints. At its heart, the library creates what's essentially a reactive programming framework handling continuous data streams.
Tick Processing System
The foundation of the library is the get_tick() function, which captures price updates as they occur:
export get_tick(series float source = close, series float na_replace = na)=>
varip float price = na
varip int series_index = -1
varip int old_time = 0
varip int new_time = na
varip float time_delta = 0
// ...
This function:
Samples the current price
Calculates time elapsed since last update
Maintains a sequential index to track updates
The resulting TickData structure serves as the fundamental building block for all candle generation.
State Management Architecture
The library employs a sophisticated state management system using varip variables, which persist across executions within the same bar. This creates a hybrid programming paradigm that's different from standard Pine Script's bar-by-bar model.
For chart-time candles, the core state transition logic is:
// Real-time update of current candle
candle_data := Candle.new(Open, High, Low, Close, polarity, series_index, candle_color)
candles.set(0, candle_data)
// When a new bar starts, preserve the previous candle
if clear_state
candles.insert(1, candle_data)
price.clear()
// Reset state for new candle
Open := Close
price.push(Open)
series_index += 1
This pattern of updating index 0 in real-time while inserting completed candles at index 1 creates an elegant solution for maintaining both current state and historical data.
Custom Timeframe Implementation
The custom timeframe system manages its own time boundaries independent of chart bars:
bool clear_state = switch settings.sample_type
SampleType.Ticks => cumulative_series_idx >= settings.number_of_ticks
SampleType.Time => cumulative_time_delta >= settings.number_of_seconds
This dual-clock system synchronizes two time domains:
Pine's execution clock (bar-by-bar processing)
The custom timeframe clock (tick or time-based)
The library carefully handles temporal discontinuities, ensuring candle formation remains accurate despite irregular tick arrival or market gaps.
Advanced Usage Techniques
1. Creating Custom Indicators with Real-Time Candles
To develop indicators that process real-time data within the current bar:
// Get real-time candles for your data
Candle rsi_candles = candle_array(ta.rsi(close, 14))
// Calculate indicator values based on candle properties
float signal = ta.ema(rsi_candles.first().source(Source.Close), 9)
// Detect patterns that occur within the bar
bool divergence = close > close and rsi_candles.first().Close < rsi_candles.get(1).Close
2. Working with Custom Timeframes and Plotting
For maximum flexibility when visualizing custom timeframe data:
// Create custom timeframe candles
CandleCTF volume_candles = ctf_candles_array(
source = volume,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 60
)
// Convert specific candle properties to float arrays
float volume_closes = volume_candles.candle_ctf_to_float(Source.Close)
// Calculate derived values
float volume_ema = volume_candles.ctf_ema(14)
// Create custom visualization
volume_candles.draw_ctf_candles_time()
volume_ema.draw_ctf_line_time(line_color = color.orange)
3. Creating Hybrid Timeframe Analysis
One powerful application is comparing indicators across multiple timeframes:
// Standard chart timeframe RSI
float chart_rsi = ta.rsi(close, 14)
// Custom 5-second timeframe RSI
CandleCTF ctf_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 5
)
float fast_rsi_array = ctf_candles.candle_ctf_to_float(Source.Close)
float fast_rsi = fast_rsi_array.first()
// Generate signals based on divergence between timeframes
bool entry_signal = chart_rsi < 30 and fast_rsi > fast_rsi_array.get(1)
Final Notes
This library represents an advanced implementation of real-time data processing within Pine Script's constraints. By creating a reactive programming framework for handling continuous data streams, it enables sophisticated analysis typically only available in dedicated trading platforms.
The design principles employed—including state management, temporal processing, and object-oriented architecture—can serve as patterns for other advanced Pine Script development beyond this specific application.
------------------------
Library "real_time_candles"
A comprehensive library for creating real-time candles with customizable timeframes and sampling methods.
Supports both chart-time and custom-time candles with options for candlestick and Heikin-Ashi visualization.
Allows for tick-based or time-based sampling with moving average overlay capabilities.
get_tick(source, na_replace)
Captures the current price as a tick data point
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
na_replace (float) : Optional - Value to use when source is na
Returns: TickData structure containing price, time since last update, and sequential index
candle_array(source, candle_type, sync_start, bullish_color, bearish_color)
Creates an array of candles based on price updates
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
sync_start (simple bool) : Optional - Whether to synchronize with the start of a new bar
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of Candle objects ordered with most recent at index 0
candle_series(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides a single candle based on the latest price data
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: A single Candle object representing the current state
candle_tuple(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides candle data as a tuple of OHLC values
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Tuple representing current candle values
method source(self, source, na_replace)
Extracts a specific price component from a Candle
Namespace types: Candle
Parameters:
self (Candle)
source (series Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
na_replace (float) : Optional - Value to use when source value is na
Returns: The requested price value from the candle
method source(self, source)
Extracts a specific price component from a CandleCTF
Namespace types: CandleCTF
Parameters:
self (CandleCTF)
source (simple Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
Returns: The requested price value from the candle as a varip
method candle_ctf_to_float(self, source)
Converts a specific price component from each CandleCTF to a float array
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
Returns: Array of float values extracted from the candles, ordered with most recent at index 0
method ctf_ema(self, ema_period)
Calculates an Exponential Moving Average for a CandleCTF array
Namespace types: array
Parameters:
self (array)
ema_period (simple float) : Period for the EMA calculation
Returns: Array of float values representing the EMA of the candle data, ordered with most recent at index 0
method draw_ctf_candles_time(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar time coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using time-based x-coordinates
method draw_ctf_candles_index(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar index coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using index-based x-coordinates
method draw_ctf_line_time(self, source, line_size, line_color)
Renders a line representing a price component from the candles using time coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_time(self, line_size, line_color)
Renders a line from a varip float array using time coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_index(self, source, line_size, line_color)
Renders a line representing a price component from the candles using index coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
method draw_ctf_line_index(self, line_size, line_color)
Renders a line from a varip float array using index coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots tick-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots tick-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots time-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots time-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_candles(source, candle_type, sample_type, number_of_ticks, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, enable_ema, line_width, ema_color, use_time_indexing)
Unified function for plotting candles with comprehensive options
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Optional - Type of candle chart to display
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
ema_period (simple float) : Optional - Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
enable_ema (bool) : Optional - Whether to display the EMA overlay
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with optional EMA overlay
ctf_candles_array(source, candle_type, sample_type, number_of_ticks, number_of_seconds, tied_open, bullish_color, bearish_color)
Creates an array of custom timeframe candles without rendering them
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to create (candlestick or Heikin-Ashi)
sample_type (simple SampleType) : Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of CandleCTF objects ordered with most recent at index 0
Candle
Structure representing a complete candle with price data and display properties
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
candle_color (series color) : Color to use when rendering the candle
ready (series bool) : Boolean indicating if candle data is valid and ready for use
TickData
Structure for storing individual price updates
Fields:
price (series float) : The price value at this tick
time_delta (series float) : Time elapsed since the previous tick in milliseconds
series_index (series int) : Sequential index identifying this tick
CandleCTF
Structure representing a custom timeframe candle with additional time metadata
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
open_time (series int) : Timestamp marking when the candle was opened (in Unix time)
time_delta (series float) : Duration of the candle in milliseconds
candle_color (series color) : Color to use when rendering the candle
Triple Doji SequenceThe Triple Doji Sequence indicator helps traders identify consecutive Doji candlestick patterns, allowing them to choose between spotting single, double, or triple Dojis. A Doji is detected when the candle's body is small relative to its wicks, with either the upper or lower wick being significantly larger. Users can customize their own Doji criteria by adjusting the body size and wick dominance settings. The indicator ensures that consecutive Dojis align in the same direction before confirming a valid pattern, making it easier to identify market indecision or potential trend reversals.
When the chosen Doji sequence is detected, the indicator plots a star (*) above bearish Dojis (upper wick dominant) and below bullish Dojis (lower wick dominant). It also sends alerts when a valid sequence is confirmed at the close of the bar. This tool helps traders refine their strategy by spotting repeated Doji formations, which may indicate key turning points or continuation patterns in price action.
How to Use the Triple Doji Sequence Indicator?
Apply the Indicator:
Add the Triple Doji Sequence indicator to your TradingView chart.
It will automatically scan for Doji patterns based on your settings.
Customize Your Doji Criteria:
Adjust the body size and wick dominance settings to define what qualifies as a Doji.
Choose whether to detect single, double, or triple Doji sequences.
Interpret the Signals:
A star (*) above a candle signals a bearish Doji (upper wick dominant).
A star (*) below a candle signals a bullish Doji (lower wick dominant).
Set Up Alerts:
Enable alerts to receive notifications when a Doji sequence is confirmed at bar close.
Choose alert frequency based on your trading strategy (e.g., once per bar, once per bar close).
Use in Trading Strategy:
Doji sequences can indicate trend reversals or market indecision.
Combine this indicator with support/resistance levels, volume, or other indicators to confirm signals.
PS: Good luck in finding a Triple Doji :)
Custom Index CompositeCustom Index Composite calculates an unweighted composite index by averaging the daily returns of multiple stock tickers. Instead of using price-level weighting, it focuses solely on percentage change, allowing you to compare diverse market themes side by side on a common basis.
Why Use a Custom Index Composite?
Unlike traditional indices that often lean on market capitalization or price-level data, a custom composite based solely on returns strips out the bias inherent to high-priced stocks. This provides several benefits:
Objective Cross-Comparison:
When stocks or market themes trade at very different price levels, it can be difficult to assess performance objectively. Using percentage returns, the composite creates an even playing field, enabling a clear comparison between different assets or themes.
Tailored Benchmarking:
By selecting and combining specific tickers, you can create benchmarks that better represent the segments or strategies you’re interested in. This is particularly useful when standard indices do not capture the nuances of your investment approach.
Performance Normalization:
Converting raw price data into daily percentage returns minimizes distortions that arise from price differences. This normalization helps in understanding true performance trends across the chosen tickers, making the composite index a more reliable gauge of relative market movement.
Custom Analysis Framework:
The indicator offers flexibility to adjust the lookback period (defaulting to about 3 months) so you can fine-tune the sensitivity of the index to recent market behavior. This enables you to either smooth out volatility or capture a more immediate trend, depending on your analytical needs.
Key Features:
Configurable Appearance:
You can easily configure the line color, line width, index name, and index name color via the options panel.
Ticker Configuration:
By default, you can enter up to 15 different tickers into the composite index. Technically, the indicator supports up to 40 tickers (these additional inputs are commented out by default to maintain performance), and you may enable them individually if required.
Calculated Bars Length:
The indicator uses a “Calculated bars length” setting, which is set by default to 63 days (approximately 3 months). This value can be adjusted, and it is recommended to use the greatest common denominator for consistent analysis.
How To Configure Your Chart:
Add the Indicator:
Place the Custom Index Composite on your chart.
Disable Main Symbol Visibility:
Hide the primary symbol’s plot and set its scale to “None” to prevent interference with the composite display.
Pin to Right Scale:
Set the scale of the first composite indicator to “Pinned to right scale.” This helps maintain consistency across different composite indicators.
Add Multiple Composites:
You can add additional composite indicators and set their scales to “Pinned to right scale” (or alternatively to “A”) for convenient comparison.
Limitations:
If a ticker symbol is set once in the options, it cannot be cleared to an empty value later. As a result, the symbol will continue to appear in the indicator’s title on the chart. The only way to remove an unwanted symbol is to completely reset the settings and re-enter your desired tickers.
[EmreKb] Custom PatternCustom Pattern
With this indicator, you can create and display as many patterns as you want on the chart. The indicator works by taking two inputs. We can start the explanation by describing these inputs.
Inputs
Zigzag Length: Length for zigzag legs.
Patternscript Code: Patternscript code. (But what is patternscript?)
Explanation Of Patternscript
Patternscript (it's a completely fictional script language) is a scripting language that allows you to write your own patterns, and it operates within Pinescript). Let's take a look at the syntax of this language.
{
(, )
}
...
This means that the Fibonacci levels drawn from the from_point to the to_point must have the target_point between the min_fib_level and max_fib_level .
Let's see a few practical examples.
Patternscript Code For ABCD Pattern
ABCD{
ABC(0.618, 0.886)
BCD(1.272, 1.618)
}
ABC(0.618, 0.886): Fibonacci drawn from the A to B, must have the C between the 0.618 and 0.886
BCD(1.272, 1.618): Fibonacci drawn from the B to C, must have the D between the 1.272 and 1.618
Patternscript Code For Multiple Pattern
BAT{
XAB(0.382, 0.5)
ABC(0.382, 0.886)
BCD(1.618, 2.618)
XAD(0.382, 0.886)
}
ABCD{
ABC(0.618, 0.886)
BCD(1.272, 1.618)
}
Notes:
You can set the pattern name as you like, this is not related to the pattern rules.
There is no limit for pattern count, but remember pine limits.
Stock vs Custom Symbol OutperformanceStock vs Custom Symbol Outperformance" is a powerful technical analysis indicator designed to help traders and investors gauge the relative performance of a stock against a selected benchmark symbol. This tool enables users to easily visualize how a stock is performing in comparison to another asset, such as an index or another stock.
Key Features:
Custom Symbol Comparison: Input any symbol to compare against the stock of interest, allowing for flexible analysis tailored to specific market conditions.
Outperformance Calculation: The indicator calculates the percentage change in price for both the stock and the selected benchmark, providing a clear view of relative performance.
Moving Average Smoothing: A customizable moving average smooths the outperformance data, helping to identify trends and reduce noise in the signals.
Threshold Lines: Set upper and lower threshold lines to visualize significant levels of outperformance or underperformance, aiding in decision-making.
Dynamic Color Coding: The outperformance bars are color-coded—green indicates that the stock is outperforming the benchmark, while red indicates underperformance.
How to Use:
Select a Benchmark: Use the input field to choose the symbol against which you want to compare the stock.
Adjust Parameters: Modify the moving average length and set your desired thresholds for easier identification of performance metrics.
Interpret Results: Analyze the plot for insights into the stock's performance relative to the benchmark, with the moving average providing additional context for trends.
This indicator is ideal for traders looking to refine their strategies by understanding how individual stocks measure up against key benchmarks in the market.
Gann toolbox - Custom boxGann toolbox - Custom box
█ OVERVIEW
This script is designed to draw Gann boxes based on pivotal levels. It is made make it easy by being interactive where you do not have to input data manually but rather select your two points right after adding the script by clicking on the levels on the chart itself.
In addition, this script has some great features, such as the ability to select the number of divisions wanted up to three with a click from the menu and to adjust the end date based on the selected pivotal level. Not to mention that you can automatically add a follow-up box right after
The divisions included are the one division ( at 50% ), the two divisions ( at .333% and 666% ), and finally the three divisions ( at 25%, 50%, and 75% ).
You can also display the golden ration in Time and Price on your box when it's on the one division setting.
When choosing a different end point you're presented with 4 options for using your 2nd point as :
- 25% of the box
- 50% of the box
- 33 days total size box ( for lower time frame trading )
- 45 days total size box.
You can enable/disable multiple lines using the styling options.
█ Future Plans and upgrades to this script may include :
1. Box current volume.
2. Stat information box.
and more! feel free to let me know what you'd like to see!
█ How to use :
1. Put the script on your chart
2. You are going to be asked to select your first pivotal level, then your second pivotal level. Simply select them by clicking on the level on the chart.
give the script a few seconds and you should be set.
[-_-] DictionaryThe script shows an example implementation of dictionary-like data type which can store key:value pairs (Python style). Both keys and values can have any of the following type:
• string
• integer
• float
• boolean
• color
You can add items of different types to the same dictionary (e.g. key = 12 and value = "value" stored in the same dictionary with key = "key" and value = 0.23).
Under the hood dictionary is a custom Object (see www.tradingview.com), that has two array fields (one for storing keys, another for storing values). Keys and values of different types are converted into a string representation when adding a new item to the dictionary. The value is then converted back to certain type (bool/color/etc.) from that string representation when being retrieved. Script also utilises the new Methods (see www.tradingview.com).
The following methods are implemented:
• init() -> initialises the array fields of dictionary (without this the script throws an error "Array methods can't be called when ID of array is na"
• set(key, value) -> add a new item to dictionary; if an item for given key already exists - change it to new value
• getS(key) -> get value of string type
• getI(key) -> get value of integer type
• getF(key) -> get value of float type
• getB(key) -> get value of boolean type
• getC(key) -> get value of color type
• remove(key) -> removes item from dictionary
• len() -> get length of dictionary (the number of keys)
I could not make just one "get" function that returns any type of value (color/string/etc.), so instead I created a get function for each value type. Example usage:
• you add a string item: dictionary.set(2, "string here")
• you add a float item: dictionary.set(3, 24.56)
• to retrieve first value (key=2) do this: dictionary.getS(2)
• to retrieve second value (key=3) do this: dictionary.getF(3)
TICK - Custom Tickers [Pt]Traditionally, the TICK index is a technical analysis indicator that shows the difference in the number of stocks that are trading on an uptick vs a downtick in a particular period of time. This indicator allows user to choose up to 40 tickers to calculate TICK.
By default, it uses the SPY Top 40 stocks, but can be changed to any tickers.
There are options to show:
- Top 7 , ie. can be used for just showing TICK for FAANGMT => $FB + $AMZN + $AAPL + $NFLX + $GOOG + $MSFT + $TSLA
- Top 10
- Top 20
- Top 30
- Top 40
Data can be displayed in candle bars, line, or both.
Enjoy~
Simple OHLC Custom Range Interactive█ OVERVIEW
This indicator show lines of OHLC which can be commonly used as support and resistance zones.
OHLC can be shown table with candlestick visual.
Color of candlestick depends on direction of bullish / bearish of the chosen candlestick.
█ INSPIRATION
Inspired by design, code and usage of CAGR . Basic usage of custom range / interactive, pretty much explained here . Credits to TradingView .
█ FEATURES
Table can positioned by any position and font size can be resized.
OHLC can be in full or simple name.
Lines can be extend either right, left, both or none.
█ HOW TO USE
Only 1 point is required.
Dont worry about magnet, point will attached depends on High or Low of the candle.
█ USAGE / TIPS EXAMPLES (Description explained in each image)
TT Multibands MTFThis Multi Moving Average Indicator is for a long list of Moving Averages:
- Simple Moving Average (SMA)
- Exponential Moving Average (EMA)
- Weighted Moving Average (WMA)
- Hull Moving Average (HMA)
- Double Exponential Moving Average (DEMA)
- Triple Exponential Moving Average (TEMA)
- Volume Weighted Moving Average (VWMA)
- Kaufman's Adaptive Moving Average (KAMA)
- Relative Moving Average (RMA)
- Arnaud Legoux’s Moving Average (ALMA)
Advantages:
- Auto Plotting the Lable: < TIMEFRAME + BAND TYPE + LENGTH >
- Multi TimeFrame (MTF)
- Usable with Custom Time Frames: You can choose any Time Frame out of your Custom Time Frame List
- "No Repainting"
- "No Gaps" on lower Chart Time Frames (HD, no "Stairs")
"No Repainting" and "No Gaps" TRUE
"No Gaps" FALSE
Custom IndexEnables users to create their own custom Stock Index with up to 29 tickers! Has included optionality to include/exclude certain sectors, plot sectors individually and measure in gold. Good for having a look at how your favorite tickers have performed (with your modification of course). Also has option to show Moving Averages for your convenience.
Volume Spread for VSA CustomHey everyone, I have been using volume a lot more lately as price action can sometimes get manipulated but volume shows us the truth!
Anyways, I have enjoyed the Volume Spread for VSA indicator but wished I had the code to change a few settings. This volume indicator includes spread analysis with the ability to customize input values and I'm making it open source so you can do with it as you please.
I have made notes all throughout the code to give suggestions on a few changes or why I have written it in such a way. I have also tried to section everything off to make it easier to see where each piece of the code is used. Overall I think it is a good example of how to code cleanly and how to add useful notes when you are learning Pine for yourself :D
The indicator on the price chart is my Donchian Channel indicator, which you can also find on my profile. This is the one I use every day.
[FR]WmThis a water mark that uses a table to allow placement at 9 different locations on the screen
you can either pick on of the given Date and time formats or you can choose custom and build your own
One of the reasons for this project I wanted to be able to add the "s,m,h" to the water marks timeframe not have i.e. "240" and have it say 4h..
you can select what format for the dates from in the settings if the user selects custom it will make it so you can input what ever format
string into the input box "Custom Format input'"
Hope You Enjoy!
FFriZz
Custom Price LineThis indicator lets you freely customize your price line. Choose between static or dynamic colors for falling/rising prices. In addition you can adjust the following:
Line style
Thickness
Length
Direction
It is also possible to mix different designs by using a single indicator.
Customized Multi EMAPlot several EMA with only one script.
Default EMA: 20、50、100、200.
All of these are adjustable.
Also, Vegas tunnel and filter line can be presented or not according to your needs.