Zero Lag Trend Signals (MTF) + Sideways FilterThis script is a custom indicator for TradingView that combines two major components: the **Zero Lag Trend** (with MTF support) and a **Sideways Market Filter**. Let me break down the key features and functions of the script:
### Key Components:
1. **Zero Lag Trend Signals**:
- **Zero Lag Trend (ZLEMA)**: A smoothed moving average designed to minimize lag and give faster responses to price movements. This is used to determine the trend.
- **Trend Bands**: Upper and lower bands are derived from the ZLEMA value and adjusted by volatility (calculated using Average True Range or ATR).
- **Trend Direction**: The trend direction is determined by whether the price crosses over the upper or lower band of the ZLEMA, indicating bullish or bearish trends.
2. **Sideways Market Filter**:
- **RSI (Relative Strength Index)**: Measures the speed and change of price movements. It's used here to identify neutral or sideways market conditions when RSI is between 40 and 60.
- **ADX (Average Directional Index)**: Measures the strength of a trend. The script considers a sideways market when ADX is less than 25 and both DI+ and DI- are low.
- **Sideways Market Condition**: A sideways market is defined when the RSI is in the range of 40 to 60 and the ADX is below 25, indicating weak trends.
### Main Features:
1. **Sideways Market Indicators**:
- **Sideways Circles**: When the market is identified as "sideways" based on RSI and ADX conditions, a small circle is plotted either above or below the bars on the chart. The user can adjust the color of the circles via the indicator settings.
- **Sideways Market Filter**: This filter helps to determine when to stay out of trend-based signals, and its detection is visually marked by the circles.
2. **Zero Lag Trend (ZLEMA) Plot**:
- **ZLEMA**: The Zero Lag Exponential Moving Average is plotted as a baseline, and the direction of the trend is indicated by color changes. Green is used for bullish trends, and red is used for bearish trends.
- **Trend Bands**: The script calculates upper and lower bands around the ZLEMA using volatility, and these bands help identify areas of potential trend reversal.
3. **Trend Plotting**:
- **Trend Arrows**: When the trend crosses from bullish to bearish or vice versa, the script plots arrows ("▲" for bullish and "▼" for bearish) above or below the bars on the chart to indicate the signal.
- **Trend Entry Points**: Small arrows are plotted when an entry point is detected for a long (bullish) or short (bearish) position.
4. **Multi-Timeframe (MTF) Trend Signals**:
- The script includes multi-timeframe (MTF) analysis by checking the trend on different timeframes (5m, 15m, 60m, 240m, and 1D).
- A **data table** is displayed on the chart showing the trend status for each of these timeframes (Bullish or Bearish), helping the trader visualize the trend across multiple timeframes.
5. **Alerts**:
- **Alert Conditions**: Alerts are triggered when specific conditions are met, such as:
- Bullish or bearish trend crossover.
- Zero Lag Trend crossing the price.
- Trend change signals on any of the timeframes.
- Alerts for bullish and bearish entry signals based on the trend.
### Inputs for Customization:
- **Zero Lag Trend Parameters**: Length, multiplier for the band, and timeframes for MTF analysis (t1, t2, t3, t4, t5).
- **Color Customization**: Colors for bullish and bearish trends, as well as the fill colors for the bands and the sideways market circles.
- **Sideways Market Filter Parameters**: RSI length, ADX length, and options for showing sideways market circles.
- **Circle Customization**: You can adjust the size, color, and location (above or below bars) of the sideways market circles.
### Summary:
This indicator is a sophisticated tool that combines the **Zero Lag Trend** and **Sideways Market Filter** to help traders:
- Identify strong trends (bullish or bearish) using the ZLEMA and volatility bands.
- Stay out of choppy or sideways markets using the RSI and ADX filter.
- Make trading decisions based on trend confirmation across multiple timeframes (MTF).
- Customize the visual appearance, including color schemes, circle size, and alert conditions.
This script is perfect for traders who want to focus on trading trends while avoiding market conditions that are not conducive to strong directional moves.
Candlestick analysis
Time-Based Fair Value Gaps (FVG) with Inversions (iFVG)The Time-Based Fair Value Gaps (FVG) with Inversions (iFVG) (ICT/SMT) is a specialized tool for ICT traders, pinpointing Fair Value Gaps (FVGs) within customizable 10-minute windows each hour (:00–:10, :10–:20, :20–:30, :30–:40, :40–:50, :50–:60).
Optimized for 10 minute charts or lower, this indicator identifies bullish and bearish FVGs, tracks their mitigation to form inverted FVGs (iFVGs) as key support/resistance zones, and generates retest signals with "Close" or "Wick" options.
With toggleable ATR filtering, optional FVG labels, mitigation removal, and alerts for new FVGs and signals, this indicator delivers precision for ICT strategies.
A timeframe warning ensures users stay on lower timeframes (<1 hour) for accurate filtering, making it ideal for targeting macro timeframes and hourly transitions.
Settings Description:
Show Last (disp_num): Sets the number of recent inverted FVGs (iFVGs) to display (1–100, default: 5). Lower values reduce chart clutter, while higher values show more historical zones.
Time Window Checkboxes (enable_00_10, enable_10_20, etc.): Six toggles to enable/disable FVG detection in each 10-minute window (:00–:10, :10–:20, :20–:30, :30–:40, :40–:50, :50–:60). All default to enabled, allowing FVGs across the hour. Disable specific windows to focus on key ICT periods (e.g., :00–:10 for hourly opens).
Signal Preference (signal_pref): Choose "Close" (default) or "Wick" for iFVG retest signals. "Close" requires the candle body to confirm the retest, while "Wick" uses highs/lows, offering earlier but potentially noisier signals.
Use ATR Filter (use_atr): Enables/disables ATR-based size filtering for FVGs (default: true). When enabled, only FVGs larger than ATR × Multiplier are shown, reducing noise.
ATR Multiplier (atr_multi): Sets the ATR threshold for FVG size (0–∞, default: 0.25). Higher values filter for larger gaps; setting to 0 uses the average bar range, making the filter very permissive.
Remove Mitigated FVGs (remove_mitigated): Removes FVGs and iFVGs when price fully closes through them (default: true), aligning with ICT’s principle that mitigated gaps lose relevance.
Show FVG Labels (show_labels): Displays “Bull FVG” or “Bear FVG” labels above/below gaps (default: true). Disable to reduce chart clutter.
Colors (bull_color, bear_color, midline_color): Customize colors for bullish FVGs (green), bearish FVGs (red), and midlines (gray). Adjust transparency for visibility.
Recommendations for ICT Traders
To maximize the indicator’s effectiveness within ICT concepts, use it on 1–5 minute charts during macro timeframes like the New York Kill Zone (7:00–11:00 AM EST) or London Kill Zone (2:00–5:00 AM EST), where institutional order flow often creates significant FVGs. Focus on the :00–:10 and :50–:60 windows by enabling only these checkboxes , as they capture hourly opens and closes, key for ICT setups like Judas swings or liquidity grabs.
Keep ATR filtering enabled with a multiplier of 0.25–0.5 to prioritize impactful gaps, but disable it on lower timeframes (e.g., 1-minute) for more FVGs during high-volatility periods.
Enable mitigation removal to declutter the chart, reflecting ICT’s view that filled FVGs are less relevant unless inverted.
Use "Close" signal preference for conservative retest confirmation, switching to "Wick" for faster entries in aggressive setups.
Set alerts for “Bullish FVG Detected,” “Bearish FVG Detected,” “Bullish Signal,” and “Bearish Signal” to catch real-time opportunities.
Avoid timeframes ≥1 hour, as the minute-based filter may be unreliable, and heed the warning label to stay on lower timeframes for precision.
ICT Killzones & Pivots [TFO]shorten the date name
adjust to fit in JST time zone (fit for Japan based traders like me, who is early bird and can't trade at 10PM JST = NY open)
Swing Trading PRO - Moving averages + RSIWhat the Lines Mean ?
Orange Line (Fast EMA) = 20-period Exponential Moving Average
Blue Line (Slow EMA) = 50-period Exponential Moving Average
These are used to determine market trend:
If orange (EMA 20) is above blue (EMA 50) → Market is in an uptrend
If orange is below blue → Market is in a downtrend
Use on 4H or Daily timeframe for swing trades
Avoid using in sideways/choppy markets (when the EMAs are close together or crossing repeatedly)
Combine with support/resistance or Fibonacci retracements for more precise exits
CCI Cross Signal with RSI FilterThis indicator is made for educational purpose. Use it to predict the change of trend, it helps to saving wrong decisions in trading. Please use own analysis also
IU Inside out candlestick patternIU Inside Out Candlestick Pattern
This indicator identifies the Inside Out Candlestick Pattern — a unique 3-bar price action setup that captures strong market momentum and potential reversals with greater reliability than traditional patterns.
Pattern Logic:
The Inside Out pattern builds upon a classic engulfing setup by adding a breakout confirmation, making it a refined and filtered approach to candlestick analysis.
Bullish Inside Out Logic:
- Bar must be a bullish engulfing candle (engulfs previous bearish candle).
- Current bar must be bullish and must close above the high of the engulfing candle (a bullish breakout).
- When this setup is confirmed, a shaded green box is drawn around the range of the engulfing candle and its preceding bar.
Bearish Inside Out Logic:
- Bar must be a bearish engulfing candle (engulfs previous bullish candle).
- Current bar must be bearish and must close below the low of the engulfing candle (a bearish breakdown).
- When confirmed, a red box highlights the zone formed by the engulfing candle and its prior bar.
Why this is unique:
Unlike conventional candlestick indicators that trigger signals immediately after an engulfing pattern, this script adds a breakout condition to validate follow-through strength. This reduces false positives and gives traders a clearer edge. The pattern is also rare, which means it captures strong, decisive moves when it does appear.
How users can benefit:
- High-quality entries: Only shows patterns with proven follow-through, improving trade timing.
- Visual clarity: Boxes and labels highlight significant price zones for easy interpretation.
- Flexible use: Applicable across timeframes and instruments — ideal for both intraday and swing traders.
- Alerts included: Real-time alerts help traders stay updated without staring at charts all day.
This script is a powerful tool for price action traders looking to enhance pattern reliability and signal strength through structure-based breakout confirmation.
SuperFib Enhanced (Array Only)Key Changes:
Removed MAX_LINES and defined const int MAX_STORAGE_CAPACITY = 200 (You can adjust 200 higher or lower, but be mindful of the total drawings limit).
Removed all individual inputs (show1-show10, price1-price10, text1-text10) and their corresponding groups. The array input is now the only way to define levels.
Removed the useArrayInput boolean input, as it's no longer needed.
Initialized var hLines and var lineLabels arrays with MAX_STORAGE_CAPACITY.
Modified the array parsing loop to respect MAX_STORAGE_CAPACITY when adding parsed levels.
Modified the main drawing loop (if barstate.islast) to iterate from 0 up to
MAX_STORAGE_CAPACITY - 1. Inside the loop, it checks if i < parsedLevelsCount to determine if a line should exist at that index.
Modified the real-time update loop (if barstate.isrealtime) to also iterate up to MAX_STORAGE_CAPACITY - 1 to handle any potential drawing index within the indicator's capacity.
Updated the tooltips for the array inputs to reflect that this is the primary method and mention the (increased) capacity limit.
This version is more flexible for users who rely heavily on array input, allowing them to define up to 200 levels. Remember that while the indicator itself can manage 200, the total drawings on your chart from all sources still cannot exceed Pine Script's platform-wide limit.
Entropy [ScorsoneEnterprises]This indicator calculates the entropy of price log returns over a user-defined lookback period, providing insights into market complexity and unpredictability. Entropy measures the randomness or disorder in price movements, helping traders identify periods of high or low market uncertainty.
How It Works
The indicator computes the entropy of log returns (log(close/close )) using a histogram-based approach with customizable bins. Log returns are stored in an array of size N (lookback period), and entropy is calculated by:
Binning the returns into bins intervals based on their range.
Computing the probability distribution across bins.
Calculating entropy as -Σ(p * log(p)), where p is the probability of each bin.
A reference Simple Moving Average (SMA) of the entropy, with a separate lookback period (SMA_N), is plotted to highlight trends in market complexity. The entropy plot uses a gradient color scheme (red for lower entropy, teal for higher), while the SMA color shifts based on whether entropy is above (teal) or below (red) the SMA.
Key Features
Inputs:
Lookback Period (default: 50): Number of bars for calculating log returns.
Reference SMA Lookback Period (default: 100): Period for the entropy SMA.
Number of Bins (default: 20): Number of histogram bins for entropy calculation.
Plots:
Entropy: Gradient-colored line reflecting market randomness.
Reference SMA: Trend line to compare entropy against its average.
Interpretation
High Entropy: Indicates chaotic, unpredictable price movements, often during volatile or trendless markets.
Low Entropy: Suggests more predictable, ordered price behavior, often in trending or stable markets.
Compare entropy to its SMA to gauge whether current market complexity is above or below its recent average.
Usage
Use this indicator to assess market regimes. High entropy may signal choppy, range-bound conditions, while low entropy could indicate trending opportunities. Combine with price action or other indicators for confirmation.
Examples
We see on this PEPPERSTONE:COCOA chart that when entropy is low it signals a strong trend, either up or down. High entropy signals indecision and choppiness in the market. We can determine this by noticing when the value is above or below its recent average.
Entropy is used in high frequency trading often. It is a nice tool for lower time frames to determine how predictable and strong a trend is.
Inputs
Users can enter the lookback value for entropy, bin count, and the look back for the entropy moving average.
No tool is perfect, the Entropy value is also not perfect and should not be followed blindly. It is good to use any tool along with discretion and price action.
Origin + Surge Zone (v2 fixed)test inventory surge
Searches for 2 or more consecutive doji candles → marks this as "origin" (grey box).
Waits for 2 strong candles (bullish or bearish) → surge → records its high as TP.
Long-Term VWAP Mean Reversion SDCACore Idea:
This indicator is designed to support Strategic Dollar Cost Averaging (SDCA) for Bitcoin using a cumulative VWAP-based mean reversion model. It helps long-term investors identify high-conviction buy zones and overbought conditions using statistical deviation from the cumulative VWAP. This indicator evaluates how much price is stretched from the true market average price, weighted by cumulative volume over time.
Core Concepts and Formulas:
Cumulative VWAP (Volume Weighted Average Price):
VWAP cumulative = ∑(Price×Volume) / ∑Volume
A long-term anchor that reflects the average dollar cost of all market participants across all candles. This version does not reset daily, unlike intraday VWAP.
VWAP Deviation % :
Deviation% = Price - VWAP cumulative / VWAP cumulative x 100
Shows how far current price has diverged from the long-term fair value.
Z-Score of VWAP Deviation:
Z= (Price−VWAP)−μ / σ (lookback period: default 200)
SDCA Multiplier Mapping:
*Keep in mind in my Z-Score system, -2 represents the overbought level (white horizontal line) and +2 represents oversold (cyan horizontal line) conditions. So the scores on the Y axis and Z-score in the table are reversed.
| Z-Score Range | SDCA Multiplier |
---------------------------------------------
| ≤ -2 | 0.25×
| -1 to +1 | 1.0×
| > +2 | 2.0×
The pink line plots this multiplier. It’s meant to control buy weight at each time step.
How to Use This for SDCA:
-Buy normally when the multiplier is 1.0× (Z-score between -1 and +1)
-Accelerate buying when Z-score is deeply negative (price far below VWAP)
-Slow or pause buying when Z-score is high (price far above VWAP)
-Use the stats panel to track current Z-score, VWAP level, deviation %, and multiplier
-Watch the red/blue backgrounds as visual confirmation of oversold/overbought zones
Inputs:
Z-Score Lookback Length:
Default: 200 but can be adjusted.
Visuals:
Z-Score Line (cyan): shows current standardized deviation from VWAP
Multiplier Line (bright pink): your SDCA intensity signal
Background Zones: cyan = oversold, white = overbought
Horizontal Lines: +2 and -2 standard deviation thresholds
Stats Panel (bottom right): live values for Z-score, multiplier, price, VWAP, and the deviation formula
Suited For:
-Long-term Bitcoin investors
-SDCA Systems
-Mean reversion systems
-Macro-level buy/sell planning
ATR Trailing Stop Loss (True)ATR Trailing Stop – Sir Robrecht’s Edition
This is not your average trailing stop. This is my personal take — forged in the fires of trend following and designed to keep emotions on a leash. It uses the Average True Range to adaptively trail behind price, locking in profits as a trend unfolds and giving it just enough room to breathe. No random percentages. No guesswork. Just pure, calculated breathing space.
The stops rise with the trend but never fall. Once a new level is set, it stays put — protecting you when price inevitably decides to pull back. It doesn’t flinch. It doesn't chase. It waits. And when that pullback turns into a full reversal, it taps you on the shoulder and says, “Time to go.”
Why use this? Because it removes the psychological torture of ‘should I sell now?’ and replaces it with a clear, elegant line in the sand. You enter with purpose, you follow the trend, and you let this thing trail behind you like a loyal guard dog. No micromanaging. No impulse exits. Just mechanical, stress-free trend following.
Set it. Forget it. Watch the trend do the heavy lifting while you lean back and act like you’ve been here before.
Asian & London Session Highs/LowsAsian & London Session Highs/Lows with Extendable Lines
This TradingView script automatically marks the highs and lows of the Asian and London trading sessions for the most recent day, allowing traders to identify key levels during these active periods. The lines representing the high and low of each session are drawn at the exact price point where the high/low occurred, and they extend to the right for a customizable number of bars, helping to visualize how the price reacts to these key levels after the session ends.
Key Features:
Session High/Low Tracking: Automatically tracks the highest and lowest points for the Asian and London sessions.
Extendable Lines: Lines start at the exact bar where the high/low occurred and can be extended to the right for a specified number of bars.
Timezone Adjustment: Allows you to input a timezone offset to adjust session times based on your local time or desired market time zone.
Customizable Colors & Line Thickness: Adjust the color and thickness of the session high and low lines to suit your visual preferences.
Clear & Precise Levels: Helps identify important support and resistance levels, making it easier to spot market reactions around session highs and lows.
This indicator is perfect for day traders and those looking to trade during specific market hours, offering clear visual markers of session boundaries and critical price levels.
Daily Breakout + Daily Shadow By RouroThis script is a Pine v5 strategy designed to detect daily candle body breakouts and execute them on any intraday timeframe, while also providing:
Daily Data Retrieval
Using request.security(..., "D", ...) it fetches the OHLC and timestamp of the daily candle, regardless of the chart’s current timeframe.
Calculation of Yesterday’s and Day-Before-Yesterday’s Bodies
b1High and b1Low → the high/low of yesterday’s daily candle body
b2High and b2Low → the high/low of the previous day’s body
Detection of the First Intraday Bar After a New Day
By using ta.change(time("D")), it marks the start of each new trading day.
Drawing the Previous Day’s “Shadow” on the Chart
It overlays a box (box.new) and two wick lines (line.new) with configurable colors and transparency, so you can clearly see the full range of yesterday’s candle on any intraday chart.
Automatic End-of-Day Position Closure
It will automatically close any open position at the start of the next day to avoid unintended rollovers.
Entry Signals
On the very first intraday bar after the daily close:
Long if yesterday’s close broke above the body of the day before yesterday
Short if yesterday’s close broke below the body of the day before yesterday
…which triggers a strategy.entry at the intraday open.
Fully Customizable Stop-Loss and Take-Profit
SL options:
Opposite end of yesterday’s body
Fixed pips from entry
A risk-reward ratio on yesterday’s wick
Optional “safety SL” in fixed pips that overrides the above
TP options:
Fixed pips
Yesterday’s wick extreme (high/low)
Partial exit on the wick (TP1), then second exit (TP2) either:
At a multiplied RR
Or at the daily close (“Close of Day”)
You can also choose to move SL to breakeven after TP1 is hit.
Live Metrics Table
In the upper-right corner it displays in real time:
Start of backtest (date of first trade)
Number of ✅ Winning trades and ❌ Losing trades
Total number of trades
Win rate (%)
Profit Factor
All within a fixed table layout so it never runs out of rows or columns.
ORDERFLOW - CHOCH STATUS WITH MULTI TF PANNELThis code gives you the status of the orderflow direction (defined by the Choch theory, see Somstradamus for more information on how it is defined) in the form of barcolor for the current TF.
We also have a pannel which let you know the orderflow's status of different timeframes on 1 glances.
Major Trading SessionsThis script displays the trading sessions of the 3 markets that are relevant in crypto. US, UK, and Tokyo.
24 Hour Key LevelsIndicator automatically plots horizontal rays from yesterday high/low of day and current day premarket high/low. Levels are customizable in color and thickness.
Likidite Avı + Dönüş Stratejisi (TP/SL + Zaman Bazlı)Checks if the previous top/bottom is pinned.
Then it generates a signal as soon as a sharp and opposite candle comes.
It looks for a reactionary reversal, not a pullback.
It gives fewer but more meaningful signals.
✅ Previous top/bottom pin (liquidity hunt)
✅ Immediately followed by a strong reversal candle
✅ And there is a signal system that gives these conditions instantly, together with the candle closing.
[COW] Market DirectionA script that will plot a table on screen that shows your RSI and EMA directions for multiple timeframes. This will help determine your direction and bias for multiple timeframes. I have included some code that I have in a private library as well showing how I handle types with pine script and how they come in handy.
This indicator is useful to help determine chop, directional movement, and more!
OHLC Candles Overlay [Multi TF]- 3 CandlesMulti timeframe overlay candles for higher timeframe analysis on lower timeframes and vice versa.
Candlestick High/Low LabelsCandlestick High/Low Labels and OHLCV Dashboard with adjustable lookback period
HTF/LTF Boxes DRBBUpdated original script with gann box of previous hour and added second LTF box.
All credits to an author of an original code @smitty1021
Real Open/Close Ticks for Heiken Ashi CandlesJapanese candle open and close prices. Good if you're using a HeikenAshi chart and you want to see real opens and closes.