Optimized Range + RSI + MACD + Fibonacci + Risk Mgmtiron condor nsdkdkikdkckdkkellkemlfnlwlnelkflkwenlflkwklefnlkw
지표 및 전략
SMART TRADER Institutional Trend Engine (ITE)SMART TRADER – Institutional Trend Engine (ITE)
Created by Jonathan Mwendwa Ndunge, this indicator is designed for professional traders and institutions seeking a multi-timeframe trend confirmation system. It combines Donchian Channel-based trend analysis across higher, mid, and lower timeframes to provide a directional authority score, highlighting bullish and bearish execution zones. Built with price action and smart money concepts in mind, it helps traders identify high-probability trend-aligned opportunities while filtering out noise.
Mean Reversion OpportunityIdentifies when price is trading within an established range. Values between +200 and -200 signal mean reversion opportunities. Breaks beyond these levels suggest ranging behavior has ended.
Simple Buy Sell DiamondsTuning Tips (in the indicator settings gear icon)
Make diamonds even smaller: Already set to size.tiny — that's the smallest non-micro size.
Earlier buys: Lower fastLength to 7 or 5
Fewer false signals: Increase slowLength to 34 or raise multiplier to 3.5–4.0
More aggressive sells: Lower multiplier to 2.0–2.5
This is now extremely minimal — just price candles + blue/red diamonds. No lines, no fills, no extra indicators visible.
Let me know how it looks on your live SATL/ADUR/ASST charts — if the timing feels right or if you want one more small tweak (e.g., add volume filter, change diamond shape to triangle, etc.).3.9sFast
CGI - Option Premium Tracker [CE vs PE]## ⚡ CGI - Nifty Option Premium Tracker
**"Stop Switching Tabs. Decode the Institutional Battle."**
Trading Options in Nifty & BankNifty requires speed and clarity. Retail traders lose money because they look at the Spot Chart, but Big Players manipulate the **Premium Chart**.
The **CGI Premium Tracker** solves this. It plots both the **CALL (CE)** and **PUT (PE)** premium charts directly on a single screen, allowing you to spot the real winner in real-time.
---
### 🎯 Key Features (Free Version)
#### 1. ⚡ Dual-Chart Technology
* Visualize the **CE (Green Candles)** and **PE (Red Candles)** side-by-side.
* **The Logic:** If Spot is moving up, but the Call Premium isn't following (Divergence), it's a trap. This tool helps you see that instantly.
#### 2. 🐋 Operator Candle Detection
* **Blue Candles:** Highlight massive volume spikes (1.5x Average). This usually indicates "Smart Money" entering positions.
* **Yellow Candles:** Indicate extreme churn/panic.
#### 3. 🛡️ Institutional Anchors (Fresh AVWAP)
* Standard VWAP lags. Our **Fresh AVWAP** resets daily or at the first 15-minute close, showing you the *true* intraday average price where institutions defend their positions.
#### 4. 🚀 Scalper's EMA
* Includes the classic 8-EMA setup. A visual guide to stay in the trend as long as momentum holds.
---
### 🛠️ How to Use This Tool
1. **Select Your Strikes:** Go to settings and simply type the Strike name (e.g., `NIFTY24FEB26000CE`).
2. **Watch the Flow:** When Green Candles (CE) dominate Red Candles (PE) above the Anchors, the trend is real.
3. **Spot the Operator:** Watch for **Blue Candle** breakouts to identify where the momentum is starting.
---
### 🔓 Unlock Institutional Intelligence
This is the **Basic Visualization** tool.
Our **CGI Titanium Engine** (Invite-Only) is designed for professional analysis, adding:
* ✅ **Institutional Flow Ribbon:** Visualizes the dominant trend without the noise.
* ✅ **Trap Zone Detection:** Automatically highlights "Judas Swings" and fake-outs.
* ✅ **Market Consensus:** Advanced geometry to find high-probability reversal zones.
**👉 Check the Author Profile below to join the CGI Community!**
👇 **Drop a BOOST (Like) if this tool improved your screen setup!** 🚀
Day Trading Levels and Wick Zones_PublicDay Trading Starter Pack
- Previous Day Levels
- Previous Day Wick Zones
- Weekly Wick Zones
REMOVE WEEKLY WICK ZONE TO ELIMINATE GRAY SHADED AREA.
Its only purpose is to show you quickly the weekly candle wicks and the magnitude of the candle.
Combined Advanced Blueprint + Hybrid Stop + GravityCombined Advanced Blueprint + Hybrid Stop + Gravity
Overview
This indicator is a comprehensive "Swiss Army Knife" trading system that combines the classic Traders Reality Blueprint (Moving Averages & Vector Zones) with advanced institutional volume detection (Gravity Squeeze & Sharks) and a Hybrid Trailing Stop for trade management.
It is designed to identify institutional footprints, trend direction, supply/demand zones, and volatility contractions in a single, all-in-one overlay.
🚀 Key Features
1. Gravity Squeeze & Shark Detection (Institutional Volume)
This module detects anomalies in volume and price action to identify where "Smart Money" is stepping in.
Shark Icons (🦈): Appear when the Negative Volume Index (NVI) detects significant accumulation during low volatility periods. This often signals a "defense" of a price level by institutions.
Shark Support (Blood) Zones: When a Shark is detected, a red box is drawn from the low of the candle. This represents an institutional "line in the sand." If price closes below this box, the zone is invalidated (broken).
Gravity Squeeze (⚡): Indicates a contraction in volatility (ATR compression), suggesting an explosive move is imminent.
Coils (🌀) & Hammers (🔨): Identifies specific price action patterns occurring on high relative volume.
2. The Blueprint Moving Averages
Includes the standard Traders Reality moving average sequence to identify trend state and dynamic support/resistance.
Red (8 EMA): Immediate trend.
White (21 EMA): Short-term trend (The "Baseline").
Blue (34 EMA): Trend confirmation.
Indigo (55 EMA) & Purple (89 EMA): Mid-term trend.
Orange (50 SMA) & Dark Orange (200 SMA): Major institutional levels (Golden/Death Cross).
Visual Crossovers: Arrows and shapes appear for 8/21 crosses, 8/34 crosses, and the 50/200 cross.
3. PVSRA (Price Volume Support Resistance Analysis)
Colors trade bars based on volume relative to the average, highlighting hidden liquidity.
Green/Red Bars: Volume is ≥ 200% of the average. (Climax action).
Blue/Violet Bars: Volume is ≥ 150% of the average.
Grey Bars: Average/Low volume.
Vector Zones: Automatically plots zones based on these high-volume candles to show where significant business was transacted.
4. Hybrid Trailing Stop
A volatility-based stop-loss system designed to keep you in the trend longer.
Calculation: Uses a combination of ATR (Average True Range) and manually input Implied Volatility (IV) to calculate a safe distance from price.
Visual: A Fuchsia line that trails behind price. When price closes across this line, the trend structure is considered broken.
5. Inflection Zones (Supply & Demand)
Auto-Drawing: Identifies Swing Highs and Swing Lows to draw Supply (Blue) and Demand (Red) boxes.
BOS (Break of Structure): When price breaks through a zone, the box is removed or converted, helping keep the chart clean.
6. Pivot Points & VWAP
Pivots: Displays multitimeframe pivots (Daily, Weekly, Monthly, etc.) including Traditional, Fibonacci, and Camarilla calculations.
VWAP: Includes Standard Deviation bands (1, 2, and 3 SD) anchored to Session, Week, Month, or even Earnings/Splits.
7. Keltner Channels & RSI Triggers
Entry Signals: Plots circles on the chart when RSI enters extreme zones (Overbought/Oversold) while price is interacting with the Keltner Channel bands.
🛠 Settings & Configuration
Gravity Squeeze & Sharks
Enable: Toggle the overlay on/off.
Min Volume: Set the threshold for volume analysis (Default: 300k).
Max ADX: Filters out signals if the trend is already too exhausted.
Inflection Zones
Swing Length: Sensitivity of the swing high/low detection.
History to Keep: How many historic zones to display before deleting old ones.
Pivot Levels
Timeframe: Auto-selects based on your chart, or force specific timeframes (e.g., Daily Pivots on a 15m chart).
Type: Choose between Traditional, Fibonacci, Woodie, etc.
Trailing Stop
Multiplier: Adjust how "loose" or "tight" the stop is (Default: 1.5 ATR).
IV %: Manually input the annual Implied Volatility for the asset for higher precision.
🎯 How to Trade (Strategy Ideas)
1. The Shark Defense:
Look for a Shark Icon (🦈).
Watch the red "Blood" box form.
Long Entry: If price retests the box and holds (does not close below it), this is a high-probability buy zone.
Stop Loss: A candle close below the red box.
2. The 8/21 & 8/34 Cross:
Use the Arrows generated by the moving averages.
Combine with Vector Candles: If you get a Bullish Cross (Up Arrow) immediately following a Green/Blue vector candle, the move is supported by volume.
3. The Squeeze Breakout:
Look for the Squeeze Icon (⚡) indicating low volatility.
Wait for the Hybrid Trailing Stop line to flip (e.g., price crosses above the Fuchsia line) to confirm the breakout direction.
Alerts
The script includes built-in alert conditions for automation:
8/21 Bullish/Bearish Cross
8/34 Bullish/Bearish Cross
Credits:
Core logic based on Traders Reality (Blueprint/PVSRA).
Gravity logic adapted from standard institutional volume analysis.
Compiled & Enhanced by Gemini.
Top-Down Market Bias ChecklistThis script allows users, to select whether a market is Bullish or Bearish on different timeframes. It simplifies the process of opening a textbox every time and writing in the values manually, it also simplifies on having to move the textbox every time when switching timeframes.
There is a Color Customization section at the bottom on the inputs when you open settings, where each user can change his colors depending on their preferences.
Meridian v2A comprehensive multi-timeframe trading system that combines statistical volatility levels, dynamic price ranges, momentum-based signals, and precision entry/exit zones.
Key Features:
StdDev Levels: Displays standard deviation bands from higher timeframes (4H, 1H default) to identify key support/resistance zones based on price volatility
Trading Ranges: Automatically plots dynamic support/resistance ranges using ATR calculations with adaptive zone fills
ZScore Momentum: Colors candles based on normalized price momentum relative to moving average, highlighting bullish/bearish conditions
60 Tick Lines: Draws horizontal lines at precise tick distances above/below current price for scalping entries
EMA System: Dual EMA crossover signals with optional volume confirmation and visual ribbon display
Trade Signals: Diamond markers for range breakout entries, triangle markers for EMA crossovers
Perfect for multi-timeframe analysis combining volatility structure, momentum, and precise price levels for confluence-based trading decisions.
RLPS -Simplified Long-Term Support/Resistance Levels (Shelters)// Introduction //
RLPS (Simplified Long-Term Shelters) is a streamlined indicator designed for traders who have already identified the preponderant long-term phase of their assets and want to efficiently track multiple assets using pre-calculated Fibonacci levels.
IMPORTANT: Before using this indicator, you need to have determined the date-price coordinates of the preponderant phase (i0→i1 pivots) for your asset(s). These coordinates can be obtained using our master RLP indicator (Long-Term Shelters), which automatically helps to calculates them, or through your own research and analysis.
// Theoretical Foundation //
Many traditional institutional investors use the latest higher-degree market phase that stands out from others (longest duration and greatest price change on daily timeframe) to base a Fibonacci retracement on whose levels they open long-term positions. These positions can remain open to be activated in the future even years in advance. The phase is considered valid until a new, more preponderant phase develops over time.
RLPS allows you to manually input these pre-identified phase coordinates and draw Fibonacci levels that serve as Long-Term Shelter Levels—marking future trading points (entries, exits, risk management) that remain valid for months and even years.
// Key Features //
• Supports up to 5 different assets with permanently stored phase coordinates
• Dropdown selector to quickly switch between configured assets
• No ZigZag calculation required—user provides pre-calculated coordinates
• Timeframe-agnostic: levels remain constant across all timeframes
• Works with any price source (exchange) regardless of historical data availability
• Asset Information table with visual validation (✅ Match / ❌ No Match)
• Long-Term Historical Prices (LTHP): add up to 5 psychological price levels per asset (historical highs/lows, annual opening prices, etc.)
• Customizable Fibonacci levels, colors, styles, and label formatting
• Logarithmic scale support for volatile assets like cryptocurrencies
// Quick Start Guide //
STEP 1: In TradingView, select "Bitcoin / U.S. dollar" from Bitstamp Exchange (BITSTAMP:BTCUSD).
STEP 2: Configure the chart to Daily (D) timeframe.
STEP 3: Load the RLPS indicator. Initially no drawing appears (fields are empty by default).
STEP 4: Open indicator settings and activate "Practice Asset Data Table" in the GENERAL section.
STEP 5: A table appears with sample data for 5 assets. Locate "Bitcoin on Bitstamp":
- i0 Date: 2020-03-13 18:00 | i0 Price: 3850.0
- i1 Date: 2021-11-10 18:00 | i1 Price: 69000.0
STEP 6: Copy this data to "ASSET 1 - IDENTIFICATION AND DATE-PRICE PIVOT COORDINATES".
STEP 7: Verify "Asset 1" is selected in the dropdown and close settings.
STEP 8: You should now see the yellow diagonal phase line, horizontal Fibonacci levels, and the validation table showing "✅ Match".
STEP 9: Navigate the chart to verify how Fibonacci levels align with historical support/resistance zones.
// Important Notes //
• The sample data in the Practice Table was validated in 02/2026 and serves as reference only.
• It is your responsibility to validate or update the preponderant phase of your assets over time.
• Use our master RLP indicator to automatically find and calculate preponderant phases, then transfer the coordinates here for permanent tracking.
• You can deactivate the Practice Table once you've copied the data you need.
// Shelter Indicators Ecosystem //
RLPS is part of a comprehensive ecosystem of indicators for price action analysis based on shelter levels:
RLPS (Simplified Long-Term Shelters): This indicator. Simplified version of RLP that allows manual input of previously identified preponderant phase coordinates. Ideal for permanent operations with multiple assets across different timeframes.
RLP (Long-Term Shelters): Automatically identifies the preponderant Zigzag phase that institutional investors use as a reference to project Fibonacci levels. These levels determine order placement over the following months and years.
RMP (Mid-Term Shelters): Provides the psychological shelter and resistance levels that institutional investors establish at the beginning of each year. These form the main framework that professionals use to plan entry and exit operations throughout the year.
RS (Weekly Shelters): Tactical structural analysis indicator designed to precisely track price action and manage positions during current weeks.
RID (Intra-Day Shelters): For intraday operations based on levels calculated from the daily opening price. Designed for 1H timeframes or lower, including scalping strategies.
By combining RLPS, RLP, RMP, RS, and RID, you obtain a multi-timeframe framework that provides certainty and clarity to apply strategies grounded in price action, across any time horizon: from scalping to long-term investments.
// Final Notes //
We sincerely regret to inform you that we have not included the Spanish translation previously provided in our indicators, due to our significant concern regarding the ambiguous rules on publication bans related to indicators.
Sharing motivates. Happy hunting in this great jungle!
Ayan EMAV HunterThe script involves 2 zones.
The Blue Zone is the Hunting Zone and the Red Zone helps to decide the which side to trade.
If the Blue Zone is above the Red Zone, we search for UpTrend Trades of 1:2 and we need to observe the candles with the Yellow Arrow which indicates Smart Money entering
Similarly, If the Blue Zone is below the Red Zone, we search for Bearish Trades with 1:2 Risk/Reward and we need to observe the candles with the Yellow Arrow which indicates Smart Money entering
If the Blue Zone lies within the Red Zone, then NO Trade, Just Observe
Please share your feedback if it can be refined
Trend Momentum v6Features
- Trend EMAs: plots Fast EMA and Slow EMA to visualize direction and strength.
- RSI Filter (optional): gates signals by RSI thresholds to reduce whipsaws.
- Multi-Timeframe (MTF): computes EMAs/RSI on a selected timeframe via request.security.
- Signals: triangle markers for Long/Short when fast EMA crosses slow EMA with optional RSI gating.
- Bar Coloring: green for up-trend, red for down-trend, neutral otherwise.
- Alerts: built-in alertcondition for Long Signal and Short Signal.
Inputs
- Signal timeframe: timeframe for EMAs/RSI; empty uses chart timeframe.
- Fast/Slow EMA length: trend speed vs smoothness (21/50 default).
- RSI length and thresholds: default RSI(14), thresholds at 50 for symmetry.
- Confirm signals on bar close: requires bar close confirmation to avoid intrabar flips.
- Show signal markers: enable/disable triangles.
- Color bars by trend: enable/disable bar coloring.
Signals
- Long: Fast EMA crosses above Slow EMA, optionally with RSI >= bull threshold.
- Short: Fast EMA crosses below Slow EMA, optionally with RSI <= bear threshold.
- Trend coloring: independent of cross signals; reflects current EMA relation plus optional RSI gating.
Tutorial
- Add to chart:
- Open TradingView → Pine Editor → paste the script → Save → Add to chart.
- Configure:
- Leave Signal timeframe empty for chart timeframe or choose higher TF (e.g., 1h while viewing 5m).
- Start with Fast EMA=21, Slow EMA=50; adjust for your market’s volatility.
- Keep RSI filter on with thresholds at 50 for balanced gating.
- Enable “Confirm signals on bar close” for stable, non-repainting entries.
- Interpret:
- Long triangle appears after a bullish EMA cross that meets RSI criteria (if enabled).
- Bars turn green when trendUp; red when trendDown; neutral when neither condition holds.
- Alerts:
- Add the indicator → Create Alert → Source: this indicator → Condition: Long Signal or Short Signal.
- Configure frequency (Once per bar close recommended when confirm is enabled).
- MTF guidance:
- For intraday, set Signal timeframe to a higher TF (15m–1h) to align entries with dominant trend.
- Using lookahead=barmerge.lookahead_off prevents future-data repainting; signals appear only when confirmed.
Customization
- Faster entries: lower Fast EMA (e.g., 13) or raise RSI bull threshold above 50 for stronger momentum.
- Smoother trend: raise Slow EMA (e.g., 100) to reduce choppiness.
- Stricter shorts: set RSI bear threshold below 50 (e.g., 45 or 40).
- Intrabar signals: disable “Confirm signals on bar close” to see crosses mid-bar (more responsive, more noise).
- Fixed indicator timeframe: if you want chart to render with gaps per fixed TF, set timeframe on indicator itself (e.g., timeframe="60") and optionally enable timeframe_gaps.
Best Practices
- Use with structure: apply on liquid instruments; combine with session/volatility filters if needed.
- Risk management: consider ATR-based stops and position sizing; signals are entries, not guarantees.
- Avoid overfitting: keep lengths and thresholds simple; validate across symbols and regimes.
Limitations
- Cross-based entries can lag at reversals and whipsaw in ranges; RSI gating helps but doesn’t eliminate noise.
- MTF aggregation can delay signals compared to the chart’s timeframe; this is expected behavior.
MTF StochRSI Confluence + Box (1m/3m/9m signals, +1H/3H display)This indicator is a multi-timeframe Stochastic RSI confluence tool designed to help identify high-probability BUY and SELL zones using short-term momentum alignment, while also providing higher-timeframe context at a glance.
Multi-timeframe StochRSI confluence indicator that triggers BUY/SELL signals only when 1m, 3m, and 9m align, with 1H and 3H shown for higher-timeframe context at a glance.
DXY vs Small-Cap Divergence [v6]It creates a dedicated panel to monitor the "tug-of-war" between the US Dollar (DXY) and the Russell 2000 (IWM).
As a swing trader, you are looking for Negative Correlation—specifically, the moment the DXY starts to fall while Small Caps maintain their strength.
How to Interpret This on Your Desktop:
Green Background: This highlights the exact bars where the DXY is dropping while the Russell 2000 is gaining ground. This can be your "Go" signal for the small caps that you are monitoring near pivots, prior levels, POC's, or value area highs or lows.
The Green Line (Bottom of the oscillator): When the line hits -0.8, it means the two assets are moving in nearly perfect opposite directions. For a gold bounce and small-cap rally, you want to see this line deep in the green.
The Red Line (Top of the oscillator): If this line stays near +0.8, it means the Dollar and Stocks are moving together. This usually indicates a "Liquidity Flush" where everything is being sold—stay cautious during these periods.
basechartpatternsLibrary "basechartpatterns"
Library having complete chart pattern implementation
getPatternNameById(id)
Returns pattern name by id
Parameters:
id (int) : pattern id
Returns: Pattern name
method find(points, properties, dProperties, ohlcArray)
Find patterns based on array of points
Namespace types: array
Parameters:
points (array) : array of chart.point objects
properties (ScanProperties type from SwSpace/abstractchartpatterns/1) : ScanProperties object
dProperties (DrawingProperties type from SwSpace/abstractchartpatterns/1) : DrawingProperties object
ohlcArray (array type from SwSpace/ohlc/1)
Returns: Flag indicating if the pattern is valid, Current Pattern object
method find(this, properties, dProperties, patterns, ohlcArray)
Find patterns based on the currect zigzag object but will not store them in the pattern array.
Namespace types: zg.Zigzag
Parameters:
this (Zigzag type from SwSpace/ZigzagLite/1) : Zigzag object containing pivots
properties (ScanProperties type from SwSpace/abstractchartpatterns/1) : ScanProperties object
dProperties (DrawingProperties type from SwSpace/abstractchartpatterns/1) : DrawingProperties object
patterns (array type from SwSpace/abstractchartpatterns/1) : Array of Pattern objects
ohlcArray (array type from SwSpace/ohlc/1)
Returns: Flag indicating if the pattern is valid, Current Pattern object
abstractchartpatternsLibrary "abstractchartpatterns"
Library having abstract types and methods for chart pattern implementations
method checkSize(filters, points)
checks if the series of pivots are within the size filter
Namespace types: SizeFilters
Parameters:
filters (SizeFilters) : SizeFilters object containing size criteria to be matched
points (array) : list of pivot points
Returns: true if matches the size filter, false otherwise
checkBarRatio(p1, p2, p3, properties)
checks if three zigzag pivot points are having uniform bar ratios
Parameters:
p1 (chart.point) : First pivot point
p2 (chart.point) : Second pivot point
p3 (chart.point) : Third pivot point
properties (ScanProperties)
Returns: true if points are having uniform bar ratio
getRatioDiff(p1, p2, p3)
gets ratio difference between 3 pivot combinations
Parameters:
p1 (chart.point)
p2 (chart.point)
p3 (chart.point)
Returns: returns the ratio difference between pivot2/pivot1 ratio and pivot3/pivot2 ratio
method inspect(points, stratingBar, endingBar, direction, ohlcArray)
Creates a trend line between 2 or 3 points and validates and selects best combination
Namespace types: array
Parameters:
points (array) : Array of chart.point objects used for drawing trend line
stratingBar (int) : starting bar of the trend line
endingBar (int) : ending bar of the trend line
direction (float) : direction of the last pivot. Tells whether the line is joining upper pivots or the lower pivots
ohlcArray (array type from SwSpace/ohlc/1) : Array of OHLC values
Returns: boolean flag indicating if the trend line is valid and the trend line object as tuple
method draw(this)
draws pattern on the chart
Namespace types: Pattern
Parameters:
this (Pattern) : Pattern object that needs to be drawn
Returns: Current Pattern object
method erase(this)
erase the given pattern on the chart
Namespace types: Pattern
Parameters:
this (Pattern) : Pattern object that needs to be erased
Returns: Current Pattern object
method pushWithLimit(this, p, maxItems)
push Pattern object to the array by keeping maxItems limit
Namespace types: array
Parameters:
this (array) : array of Pattern objects
p (Pattern) : Pattern object to be added to array
@oaram maxItems Max number of items the array can hold
maxItems (int)
Returns: Current Pattern array
method deepcopy(this)
Perform deep copy of a chart point array
Namespace types: array
Parameters:
this (array) : array of chart.point objects
Returns: deep copy array
DrawingProperties
Object containing properties for pattern drawing
Fields:
patternLineWidth (series int) : Line width of the pattern trend lines
showZigzag (series bool) : show zigzag associated with pattern
zigzagLineWidth (series int) : line width of the zigzag lines. Used only when showZigzag is set to true
zigzagLineColor (series color) : color of the zigzag lines. Used only when showZigzag is set to true
showPatternLabel (series bool) : display pattern label containing the name
patternLabelSize (series string) : size of the pattern label. Used only when showPatternLabel is set to true
showPivotLabels (series bool) : Display pivot labels of the patterns marking 1-6
pivotLabelSize (series string) : size of the pivot label. Used only when showPivotLabels is set to true
pivotLabelColor (series color) : color of the pivot label outline. chart.bg_color or chart.fg_color are the appropriate values.
deleteOnPop (series bool) : delete the pattern when popping out from the array of Patterns.
Pattern
Object containing Individual Pattern data
Fields:
dir (series int) : direction of the last pivot
points (array) : array of Zigzag Pivot points
trendLine1 (Line type from SwSpace/LineWrapper/1) : First trend line joining pivots 1, 3, 5
trendLine2 (Line type from SwSpace/LineWrapper/1) : Second trend line joining pivots 2, 4 (, 6)
properties (DrawingProperties) : DrawingProperties Object carrying common properties
patternColor (series color) : Individual pattern color. Lines and labels will be using this color.
ratioDiff (series float) : Difference between trendLine1 and trendLine2 ratios
zigzagLine (series polyline) : Internal zigzag line drawing Object
pivotLabels (array) : array containning Pivot labels
patternLabel (series label) : pattern label Object
patternType (series int) : integer representing the pattern type
patternName (series string) : Type of pattern in string
SizeFilters
Object containing properties for pattern size filters
Fields:
filterByBar (series bool) : If set filter the patterns by the bar range
minPatternBars (series int) : Used only when filterByBar is set to true. Minimum bars range for pattern size
maxPatternBars (series int) : Used only when filterByBar is set to true. Maximum bars range for pattern size
filterByPercent (series bool) : Filters patterns by percent of price if set
minPatternPercent (series int) : Used only when filterByPercent is set. Minimum pattern size in terms of percent of price
maxPatternPercent (series int) : Used only when filterByPercent is set. Maximum pattern size in terms of percent of price
ScanProperties
Object containing properties for pattern scanning
Fields:
offset (series int) : Zigzag pivot offset. Set it to 1 for non repainting scan.
numberOfPivots (series int) : Number of pivots to be used in pattern search. Can be either 5 or 6
errorRatio (series float) : Error Threshold to be considered for comparing the slope of lines
flatRatio (series float) : Retracement ratio threshold used to determine if the lines are flat
checkBarRatio (series bool) : Also check bar ratio are within the limits while scanning the patterns
barRatioLimit (series float) : Bar ratio limit used for checking the bars. Used only when checkBarRatio is set to true
avoidOverlap (series bool) : avoid overlapping patterns.
ignoreIfEntryCrossed (series bool) : Ignore the trade if close price does not fall within the price entry price range
allowedPatterns (array) : array of bool encoding the allowed pattern types.
allowedLastPivotDirections (array) : array of int representing allowed last pivot direction for each pattern types
themeColors (array) : color array of themes to be used.
filters (SizeFilters)
ZigzagLiteLibrary "ZigzagLite"
Lighter version of the Zigzag Library. Without indicators and sub-component divisions
method getPrices(pivots)
Gets the array of prices from array of Pivots
Namespace types: array
Parameters:
pivots (array) : array array of Pivot objects
Returns: array array of pivot prices
method getBars(pivots)
Gets the array of bars from array of Pivots
Namespace types: array
Parameters:
pivots (array) : array array of Pivot objects
Returns: array array of pivot bar indices
method getPoints(pivots)
Gets the array of chart.point from array of Pivots
Namespace types: array
Parameters:
pivots (array) : array array of Pivot objects
Returns: array array of pivot points
method getPoints(this)
Gets the array of chart.point from Zigzag Object
Namespace types: Zigzag
Parameters:
this (Zigzag) : Zigzag object
Returns: array array of pivot points
method calculate(this, ohlc, ltfHighTime, ltfLowTime)
Calculate zigzag based on input values and indicator values
Namespace types: Zigzag
Parameters:
this (Zigzag) : Zigzag object
ohlc (array) : Array containing OHLC values. Can also have custom values for which zigzag to be calculated
ltfHighTime (int) : Used for multi timeframe zigzags when called within request.security. Default value is current timeframe open time.
ltfLowTime (int) : Used for multi timeframe zigzags when called within request.security. Default value is current timeframe open time.
Returns: current Zigzag object
method calculate(this)
Calculate zigzag based on properties embedded within Zigzag object
Namespace types: Zigzag
Parameters:
this (Zigzag) : Zigzag object
Returns: current Zigzag object
method nextlevel(this)
Calculate Next Level Zigzag based on the current calculated zigzag object
Namespace types: Zigzag
Parameters:
this (Zigzag) : Zigzag object
Returns: Next Level Zigzag object
method clear(this)
Clears zigzag drawings array
Namespace types: array
Parameters:
this (array) : array
Returns: void
method clear(this)
Clears zigzag drawings array
Namespace types: array
Parameters:
this (array) : array
Returns: void
method drawplain(this)
draws fresh zigzag based on properties embedded in ZigzagDrawing object without trying to calculate
Namespace types: ZigzagDrawing
Parameters:
this (ZigzagDrawing) : ZigzagDrawing object
Returns: ZigzagDrawing object
method drawplain(this)
draws fresh zigzag based on properties embedded in ZigzagDrawingPL object without trying to calculate
Namespace types: ZigzagDrawingPL
Parameters:
this (ZigzagDrawingPL) : ZigzagDrawingPL object
Returns: ZigzagDrawingPL object
method drawfresh(this, ohlc)
draws fresh zigzag based on properties embedded in ZigzagDrawing object
Namespace types: ZigzagDrawing
Parameters:
this (ZigzagDrawing) : ZigzagDrawing object
ohlc (array) : values on which the zigzag needs to be calculated and drawn. If not set will use regular OHLC
Returns: ZigzagDrawing object
method drawcontinuous(this, ohlc)
draws zigzag based on the zigzagmatrix input
Namespace types: ZigzagDrawing
Parameters:
this (ZigzagDrawing) : ZigzagDrawing object
ohlc (array) : values on which the zigzag needs to be calculated and drawn. If not set will use regular OHLC
Returns:
PivotCandle
PivotCandle represents data of the candle which forms either pivot High or pivot low or both
Fields:
_high (series float) : High price of candle forming the pivot
_low (series float) : Low price of candle forming the pivot
length (series int) : Pivot length
pHighBar (series int) : represents number of bar back the pivot High occurred.
pLowBar (series int) : represents number of bar back the pivot Low occurred.
pHigh (series float) : Pivot High Price
pLow (series float) : Pivot Low Price
Pivot
Pivot refers to zigzag pivot. Each pivot can contain various data
Fields:
point (chart.point) : pivot point coordinates
dir (series int) : direction of the pivot. Valid values are 1, -1, 2, -2
level (series int) : is used for multi level zigzags. For single level, it will always be 0
ratio (series float) : Price Ratio based on previous two pivots
sizeRatio (series float) : ratio of current zigzag wave size in comparison to last zigzag wave in the same direction
barRatio (series float) : Bar Ratio based on previous two pivots
ZigzagFlags
Flags required for drawing zigzag. Only used internally in zigzag calculation. Should not set the values explicitly
Fields:
newPivot (series bool) : true if the calculation resulted in new pivot
doublePivot (series bool) : true if the calculation resulted in two pivots on same bar
updateLastPivot (series bool) : true if new pivot calculated replaces the old one.
Zigzag
Zigzag object which contains whole zigzag calculation parameters and pivots
Fields:
length (series int) : Zigzag length. Default value is 5
numberOfPivots (series int) : max number of pivots to hold in the calculation. Default value is 20
offset (series int) : Bar offset to be considered for calculation of zigzag. Default is 0 - which means calculation is done based on the latest bar.
level (series int) : Zigzag calculation level - used in multi level recursive zigzags
zigzagPivots (array) : array which holds the last n pivots calculated.
flags (ZigzagFlags) : ZigzagFlags object which is required for continuous drawing of zigzag lines.
ZigzagObject
Zigzag Drawing Object
Fields:
zigzagLine (series line) : Line joining two pivots
zigzagLabel (series label) : Label which can be used for drawing the values, ratios, directions etc.
ZigzagProperties
Object which holds properties of zigzag drawing. To be used along with ZigzagDrawing
Fields:
lineColor (series color) : Zigzag line color. Default is color.blue
lineWidth (series int) : Zigzag line width. Default is 1
lineStyle (series string) : Zigzag line style. Default is line.style_solid.
showLabel (series bool) : If set, the drawing will show labels on each pivot. Default is false
textColor (series color) : Text color of the labels. Only applicable if showLabel is set to true.
maxObjects (series int) : Max number of zigzag lines to display. Default is 300
xloc (series string) : Time/Bar reference to be used for zigzag drawing. Default is Time - xloc.bar_time.
curved (series bool) : Boolean field to print curved zigzag - used only with polyline implementation
force_overlay (series bool) : force drawing in price overlay
ZigzagDrawing
Object which holds complete zigzag drawing objects and properties.
Fields:
zigzag (Zigzag) : Zigzag object which holds the calculations.
properties (ZigzagProperties) : ZigzagProperties object which is used for setting the display styles of zigzag
drawings (array) : array which contains lines and labels of zigzag drawing.
ZigzagDrawingPL
Object which holds complete zigzag drawing objects and properties - polyline version
Fields:
zigzag (Zigzag) : Zigzag object which holds the calculations.
properties (ZigzagProperties) : ZigzagProperties object which is used for setting the display styles of zigzag
zigzagLabels (array)
zigzagLine (series polyline) : polyline object of zigzag lines
LineWrapperLibrary "LineWrapper"
Wrapper Type for Line. Useful when you want to store the line details without drawing them. Can also be used in scnearios where you collect lines to be drawn and draw together towards the end.
method draw(this)
draws line as per the wrapper object contents
Namespace types: Line
Parameters:
this (Line) : (series Line) Line object.
Returns: current Line object
method draw(this)
draws lines as per the wrapper object array
Namespace types: array
Parameters:
this (array) : (series array) Array of Line object.
Returns: current Array of Line objects
method update(this)
updates or redraws line as per the wrapper object contents
Namespace types: Line
Parameters:
this (Line) : (series Line) Line object.
Returns: current Line object
method update(this)
updates or redraws lines as per the wrapper object array
Namespace types: array
Parameters:
this (array) : (series array) Array of Line object.
Returns: current Array of Line objects
method delete(this)
Deletes the underlying line drawing object
Namespace types: Line
Parameters:
this (Line) : (series Line) Line object.
Returns: Current Line object
method get_price(this, bar)
get line price based on bar
Namespace types: Line
Parameters:
this (Line) : (series Line) Line object.
bar (int) : (series/int) bar at which line price need to be calculated
Returns: line price at given bar.
Line
Line Wrapper object
Fields:
p1 (chart.point)
p2 (chart.point)
xloc (series string) : (series string) See description of x1 argument. Possible values: xloc.bar_index and xloc.bar_time. Default is xloc.bar_index.
extend (series string) : (series string) If extend=extend.none, draws segment starting at point (x1, y1) and ending at point (x2, y2). If extend is equal to extend.right or extend.left, draws a ray starting at point (x1, y1) or (x2, y2), respectively. If extend=extend.both, draws a straight line that goes through these points. Default value is extend.none.
color (series color) : (series color) Line color.
style (series string) : (series string) Line style. Possible values: line.style_solid, line.style_dotted, line.style_dashed, line.style_arrow_left, line.style_arrow_right, line.style_arrow_both.
width (series int) : (series int) Line width in pixels.
obj (series line) : line object
utilsLibrary "utils"
Few essentials captured together (subset of arrayutils)
timer(timeStart, timeEnd)
finds difference between two timestamps
Parameters:
timeStart (int) : start timestamp
timeEnd (int)
Returns:
check_overflow(pivots, barArray, dir)
finds difference between two timestamps
Parameters:
pivots (array) : pivots array
barArray (array) : pivot bar array
dir (int) : direction for which overflow need to be checked
Returns: bool overflow
get_trend_series(pivots, length, highLow, trend)
finds series of pivots in particular trend
Parameters:
pivots (array) : pivots array
length (int) : length for which trend series need to be checked
highLow (int) : filter pivot high or low
trend (int) : Uptrend or Downtrend
Returns: int trendIndexes
get_trend_series(pivots, firstIndex, lastIndex)
finds series of pivots in particular trend
Parameters:
pivots (array) : pivots array
firstIndex (int) : First index of the series
lastIndex (int) : Last index of the series
Returns: int trendIndexes
getConsolidatedLabel(include, labels, separator)
Consolidates labels into single string by concatenating it with given separator
Parameters:
include (array) : array of conditions to include label or not
labels (array) : string array of labels
separator (simple string) : Separator for concatenating labels
Returns: string labelText
getColors(theme)
gets array of colors based on theme
Parameters:
theme (simple string) : dark or light theme
Returns: color themeColors
ohlcLibrary "ohlc"
Library having OHLC and Indicator type and method implementations.
getOhlcArray(o, h, l, c, highBeforeLow, highAfterLow, lowBeforeHigh, lowAfterHigh, barindex, bartime, indicators)
get array of OHLC values when called on every bar
Parameters:
o (float) : Open price
h (float) : High Price
l (float) : Low Price
c (float) : Close Price
highBeforeLow (float) : to be calculated based on lower timeframe. high price attained within the candle before reaching the lowest point.
highAfterLow (float) : to be calculated based on lower timeframe. high price attained within the candle after reaching the lowest point.
lowBeforeHigh (float) : to be calculated based on lower timeframe. low price attained within the candle before reaching the highest point.
lowAfterHigh (float) : to be calculated based on lower timeframe. low price attained within the candle after reaching the highest point.
barindex (int) : bar_index of OHLC data
bartime (int) : time of OHLC cata
indicators (array) : array containing indicator
Returns: Array of OHLC objects
pushWithLimit(this, item, maxItems)
Push items to OHLC array with maxItems limit
Parameters:
this (array)
item (OHLC) : OHLC Item to be pushed to the array
maxItems (int) : max Items the array can hold at a time
Returns: current object
pushWithLimit(this, item, maxItems)
Push items to Indicator array with maxItems limit
Parameters:
this (array)
item (Indicator) : Indicator Item to be pushed to the array
maxItems (int) : max Items the array can hold at a time
Returns: current object
unshiftWithLimit(this, item, maxItems)
Unshift items to OHLC array with maxItems limit
Parameters:
this (array)
item (OHLC) : OHLC Item to be unshifted to the array
maxItems (int) : max Items the array can hold at a time
Returns: current object
unshiftWithLimit(this, item, maxItems)
Unshift items to Indicator array with maxItems limit
Parameters:
this (array)
item (Indicator) : Indicator Item to be unshifted to the array
maxItems (int) : max Items the array can hold at a time
Returns: current object
method getPoints(indicators)
get array of points based on array of indicator values
Namespace types: array
Parameters:
indicators (array) : Array containing indicator objects
Returns: array of indicator points
method plot(indicator, xloc, line_color, line_style, line_width)
plots an array of Indicator using polyline
Namespace types: array
Parameters:
indicator (array) : Array containing indicator objects
xloc (string) : can have values xloc.bar_index or xloc.bar_time. Used for drawing the line based on either bars or time.
line_color (color) : color in which the plots need to be printed on chart.
line_style (string) : line style line.style_solid, line.style_dotted, line.style_dashed, line.style_arrow_right, line.style_arrow_left, line.style_arrow_both
line_width (int) : width of the plot line
Returns: array of plot polyline
Indicator
Object containing Indicator name and value
Fields:
name (series string) : Indicator Name
value (chart.point) : Indicator Value as a chart point
OHLC
Object containing OHLC and indicator values
Fields:
o (series float) : Open price
h (series float) : High Price
l (series float) : Low Price
c (series float) : Close Price
highBeforeLow (series float) : to be calculated based on lower timeframe. high price attained within the candle before reaching the lowest point.
highAfterLow (series float) : to be calculated based on lower timeframe. high price attained within the candle after reaching the lowest point.
lowBeforeHigh (series float) : to be calculated based on lower timeframe. low price attained within the candle before reaching the highest point.
lowAfterHigh (series float) : to be calculated based on lower timeframe. low price attained within the candle after reaching the highest point.
barindex (series int) : bar_index of OHLC data
bartime (series int) : time of OHLC cata
indicators (array) : array containing indicator
MA Smart SyncMA Smart Sync determines the market bias by evaluating the price position relative to a moving average channel on four independent timeframes and returning a confluence signal when a configurable number of them agree.
Unlike standard MTF trend indicators that rely on EMA crossovers or slope direction, this script builds a channel around each timeframe and classifies price into three discrete zones: above, below, or inside. The "inside" state acts as a neutral filter, preventing false confluence signals during consolidation — a key distinction from binary up/down dashboards.
The channel itself can be constructed using five different methods selectable from a single input: High/Low MA (separate MAs applied to high and low), Close ± ATR, Close ± Standard Deviation, Close ± percentage offset, or classic Bollinger Bands. All five use the same MA type and length inputs, making it straightforward to compare how different volatility envelopes behave on the same instrument without rebuilding the indicator.
How to use:
— Set four timeframes matching your trading plan (defaults: 15m, 1h, 4h, D).
— Choose the channel method that fits your instrument's volatility profile. ATR-based channels adapt well to forex; StdDev and Bollinger suit equities and indices.
— Set "Minimum Confluence" to 3 or 4. A value of 4 means all timeframes must agree before a signal fires.
— The background color and arrow labels update only when bias changes, keeping the chart clean.
— Use the status table (top-right) to monitor each timeframe independently and identify which TFs are lagging.
Daily 50 per cent (High Low Dinamic)📊 Daily 50% Mid – Dynamic High/Low
🔎 Description
The Daily 50% Mid is a clean and objective indicator that plots the daily equilibrium level, calculated as 50% of the distance between the daily high and daily low.
Unlike static levels, this indicator is fully dynamic: as new daily highs or lows are formed, the 50% level is recalculated in real time throughout the trading session.
⚙️ How it works
Automatically detects:
📈 Daily High
📉 Daily Low
Calculates the daily midpoint:
(
𝐷
𝑎
𝑖
𝑙
𝑦
𝐻
𝑖
𝑔
ℎ
+
𝐷
𝑎
𝑖
𝑙
𝑦
𝐿
𝑜
𝑤
)
/
2
(Daily High+Daily Low)/2
Continuously updates the levels while the trading day is in progress.
📐 What the indicator plots
🔴 Daily High line
🟢 Daily Low line
🟡 50% of the Daily Range (Daily Mid) line
🎯 Trading applications
The 50% daily midpoint is widely used as:
A daily balance / equilibrium zone
A pullback level in trending days
A rejection area in range-bound markets
A confluence level with:
VWAP
Daily open
Volume Profile
Price structure
⏱️ Recommended timeframes
Designed for intraday charts
(1m, 5m, 15m, etc.)
Ideal for day trading
Not recommended for daily charts
🧠 Notes
Works on any asset (indices, stocks, forex, crypto)
Automatically resets at the start of each trading day
No future repainting
StolenKernelFunctionsLibrary "StolenKernelFunctions"
This library provides non-repainting kernel functions for Nadaraya-Watson estimator implementations. This allows for easy substition/comparison of different kernel functions for one another in indicators. Furthermore, kernels can easily be combined with other kernels to create newer, more customized kernels.
rationalQuadratic(_src, _lookback, _relativeWeight, startAtBar)
Rational Quadratic Kernel - An infinite sum of Gaussian Kernels of different length scales.
Parameters:
_src (float) : The source series.
_lookback (simple int) : The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_relativeWeight (simple float) : Relative weighting of time frames. Smaller values resut in a more stretched out curve and larger values will result in a more wiggly curve. As this value approaches zero, the longer time frames will exert more influence on the estimation. As this value approaches infinity, the behavior of the Rational Quadratic Kernel will become identical to the Gaussian kernel.
startAtBar (simple int)
Returns: yhat The estimated values according to the Rational Quadratic Kernel.
gaussian(_src, _lookback, startAtBar)
Gaussian Kernel - A weighted average of the source series. The weights are determined by the Radial Basis Function (RBF).
Parameters:
_src (float) : The source series.
_lookback (simple int) : The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
startAtBar (simple int)
Returns: yhat The estimated values according to the Gaussian Kernel.
periodic(_src, _lookback, _period, startAtBar)
Periodic Kernel - The periodic kernel (derived by David Mackay) allows one to model functions which repeat themselves exactly.
Parameters:
_src (float) : The source series.
_lookback (simple int) : The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_period (simple int) : The distance between repititions of the function.
startAtBar (simple int)
Returns: yhat The estimated values according to the Periodic Kernel.
locallyPeriodic(_src, _lookback, _period, startAtBar)
Locally Periodic Kernel - The locally periodic kernel is a periodic function that slowly varies with time. It is the product of the Periodic Kernel and the Gaussian Kernel.
Parameters:
_src (float) : The source series.
_lookback (simple int) : The number of bars used for the estimation. This is a sliding value that represents the most recent historical bars.
_period (simple int) : The distance between repititions of the function.
startAtBar (simple int)
Returns: yhat The estimated values according to the Locally Periodic Kernel.






















