Linear Mean Reversion Strategy📘 Strategy Introduction: Linear Mean Reversion with Fixed Stop
This strategy implements a simple yet powerful mean reversion model that assumes price tends to oscillate around a dynamic average over time. It identifies statistically significant deviations from the moving average using a z-score, and enters trades expecting a return to the mean.
🧠 Core Logic:
A z-score is calculated by comparing the current price to its moving average, normalized by standard deviation, over a user-defined half-life window.
Trades are entered when the z-score crosses a threshold (e.g., ±1), signaling overbought or oversold conditions.
The strategy exits positions either when price reverts back near the mean (z-score close to 0), or if a fixed stop loss of 100 points is hit, whichever comes first.
⚙️ Key Features:
Dynamic mean and volatility estimation using moving average and standard deviation
Configurable z-score thresholds for entry and exit
Position size scaling based on z-score magnitude
Fixed stop loss to control risk and avoid prolonged drawdowns
🧪 Use Case:
Ideal for range-bound markets or assets that exhibit stationary behavior around a mean, this strategy is especially useful on assets with mean-reverting characteristics like currency pairs, ETFs, or large-cap stocks. It is best suited for traders looking for short-term reversions rather than long-term trends.
Indicators and strategies
Entry HelperEntry Helper is a precision tool designed to enhance clarity and support decision-making in fast-paced trading environments.
It adapts intelligently to different timeframes, offering visual guidance based on your chosen context — without the need to manually adjust settings.
Specially optimized for scalping assets like XAUUSD, NASDAQ, and SP500, it delivers exactly what you need, when you need it.
⚡ Just switch the chart… and it adjusts itself.
Developed by WAKEUP | Maggifx
Central Pivot Range DWMCentral pivot range with camarilla cpr along with previous day high low
you can use the indicator for daily weekly monthly and future ranges
change the setting to get your desire ranges
Buy Sell Sniper Entry Background (based on EP Script by RedK)
Is this one of the most precise Buy Sell Indicators?
Only you can tell!
Based on the EP script by RedK EVEREX this indicator will color your background directly in your chart. Clean, easy, simple.
I did not alter any of their logic, nothing.
Looking for an even more precise entry option?
How about combining it with my first Background Indicator based on Williams Alligator.
The Candle coloring is based on this TUE ADX script
Happy Sniper Trading!
Multi-Timeframe MA 200Multi-Timeframe MA 200
This powerful tool plots the 200-period Moving Average across multiple timeframes (5m, 15m, 30m, 1h, 4h, Daily) directly on your active chart. You can switch between SMA (Simple Moving Average) and EMA (Exponential Moving Average) for all timeframes at once.
Key features:
✅ 100% accurate calculation using the original timeframe
✅ Option to choose SMA or EMA
✅ Visual smoothing for cleaner display
✅ Floating labels showing the origin timeframe
✅ Clean interface – no clutter or legends
✅ Ideal for scalping, intraday, and swing traders
Developed by BELOTTO TRADER, founder of the CLUBE DO GAIN – one of the most engaged trading communities in the Portuguese-speaking world.
Time-Price Velocity [QuantAlgo]🟢 Overview
The Time-Price Velocity indicator uses advanced velocity-based analysis to measure the rate of price change normalized against typical market movement, creating a dynamic momentum oscillator that identifies market acceleration patterns and momentum shifts. Unlike traditional momentum indicators that focus solely on price change magnitude, this indicator incorporates time-weighted displacement calculations and ATR normalization to create a sophisticated velocity measurement system that adapts to varying market volatility conditions.
This indicator displays a velocity signal line that oscillates around zero, with positive values indicating upward price velocity and negative values indicating downward price velocity. The signal incorporates acceleration background columns and statistical normalization to help traders identify momentum shifts and potential reversal or continuation opportunities across different timeframes and asset classes.
🟢 How It Works
The indicator's key insight lies in its time-price velocity calculation system, where velocity is measured using the fundamental physics formula:
velocity = priceChange / timeWeight
The system normalizes this raw velocity against typical price movement using Average True Range (ATR) to create market-adjusted readings:
normalizedVelocity = typicalMove > 0 ? velocity / typicalMove : 0
where "typicalMove = ta.atr(lookback)" provides the baseline for normal price movement over the specified lookback period.
The Time-Price Velocity indicator calculation combines multiple sophisticated components. First, it calculates acceleration as the change in velocity over time:
acceleration = normalizedVelocity - normalizedVelocity
Then, the signal generation applies EMA smoothing to reduce noise while preserving responsiveness:
signal = ta.ema(normalizedVelocity, smooth)
This creates a velocity-based momentum indicator that combines price displacement analysis with statistical normalization, providing traders with both directional signals and acceleration insights for enhanced market timing.
🟢 How to Use
1. Signal Interpretation and Threshold Zones
Positive Values (Above Zero): Time-price velocity indicating bullish momentum with upward price displacement relative to normalized baseline
Negative Values (Below Zero): Time-price velocity indicating bearish momentum with downward price displacement relative to normalized baseline
Zero Line Crosses: Velocity transitions between bullish and bearish regimes, indicating potential trend changes or momentum shifts
Upper Threshold Zone: Area above positive threshold (default 1.0) indicating strong bullish velocity and potential reversal point
Lower Threshold Zone: Area below negative threshold (default -1.0) indicating strong bearish velocity and potential reversal point
2. Acceleration Analysis and Visual Features
Acceleration Columns: Background histogram showing velocity acceleration (the rate of change of velocity), with green columns indicating accelerating velocity and red columns indicating decelerating velocity. The interpretation depends on trend context: red columns in downtrends indicate strengthening bearish momentum, while red columns in uptrends indicate weakening bullish momentum
Acceleration Column Height: The height of each column represents the magnitude of acceleration, with taller columns indicating stronger acceleration or deceleration forces
Bar Coloring: Optional price bar coloring matches velocity direction for immediate visual trend confirmation
Info Table: Real-time display of current velocity and acceleration values with trend arrows and change indicators
3. Additional Features:
Confirmed vs Live Data: Toggle between confirmed (closed) bar analysis for stable signals or current bar inclusion for real-time updates
Multi-timeframe Adaptability: Velocity normalization ensures consistent readings across different chart timeframes and asset volatilities
Alert System: Built-in alerts for threshold crossovers and direction changes
🟢 Examples with Preconfigured Settings
Default : Balanced configuration suitable for most timeframes and general trading applications, providing optimal balance between sensitivity and noise filtering for medium-term analysis.
Scalping : High sensitivity setup with shorter lookback period and reduced smoothing for ultra-short-term trades on 1-15 minute charts, optimized for capturing rapid momentum shifts and frequent trading opportunities.
Swing Trading : Extended lookback period with enhanced smoothing and higher threshold for multi-day positions, designed to filter market noise while capturing significant momentum moves on 1-4 hour and daily timeframes.
Power candle_v3.......Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3................Power candle_v3.........
トレンドフォローBUY&SELL ver1.1Indicator Description
This indicator displays three moving averages (MAs) and generates buy and sell signals based on their crossovers. It’s designed to help traders easily follow the trend and avoid counter-trend trades.
1. Three Moving Averages
MA1 (Default: 7) – Short-term trend (Yellow)
MA2 (Default: 50) – Medium-term trend (Blue)
MA3 (Default: 200) – Long-term trend (Red), also used as a filter
2. Signal Types
(A) MA1 and MA3 Crossovers (Yellow Signals)
Golden Cross (BUY): MA1 crosses above MA3
Dead Cross (SELL): MA1 crosses below MA3
→ Helps identify shifts between short-term and long-term trends.
(B) MA1 and MA2 Crossovers (Green & Red Signals)
BUY (Green): MA1 and MA2 cross, and both are above MA3
SELL (Red): MA1 and MA2 cross, and both are below MA3
→ Only trend-aligned signals are shown (buy only above MA3, sell only below MA3).
(C) Gray Signals (Filtered-Out Signals)
If MA1 and MA2 cross but don’t meet the MA3 condition, a gray signal is displayed.
Example: “BUY” below MA3 or “SELL” above MA3 appears as gray.
→ This feature is ON by default but can be turned OFF in the settings.
3. Alerts
Alerts can be triggered for:
MA1 × MA3 Golden Cross / Dead Cross
MA1 × MA2 BUY / SELL (with MA3 filter)
This allows you to receive notifications when valid trade setups occur.
4. Key Benefits
Visualize short-, medium-, and long-term trends at the same time
Trade only in the direction of the 200MA trend using the built-in filter
Optionally view filtered-out (gray) signals for extra context
Set alerts to avoid missing trading opportunities
With this indicator, you can focus on trading with the trend—buying above the 200MA and selling below it—while staying informed of all crossover events.
このインジケーターは 3本の移動平均線(MA) と、
それらのクロスに基づいた 売買シグナル を表示するツールです。
1. 3本の移動平均線
MA1(デフォルト7):短期のトレンドを把握するための線(黄色)
MA2(デフォルト50):中期のトレンドを把握するための線(青)
MA3(デフォルト200):長期のトレンド(赤)。フィルターとしても使用
2. シグナルの種類
(A) MA1とMA3のクロス(黄色シグナル)
ゴールデンクロス(BUY):MA1がMA3を上抜け
デッドクロス(SELL):MA1がMA3を下抜け
→ 長期トレンドと短期の変化を確認するための参考シグナル
(B) MA1とMA2のクロス(緑・赤シグナル)
BUY(緑):MA1とMA2がクロスし、両方がMA3より上にある
SELL(赤):MA1とMA2がクロスし、両方がMA3より下にある
→ 200MAを基準に「上なら買い、下なら売り」のトレンド方向に沿ったシグナルだけを表示
(C) グレーシグナル(フィルター除外)
MA1とMA2がクロスしたが、MA3の条件を満たさなかった場合にグレー表示
例えば「MA3より下でBUY」「MA3より上でSELL」はグレー
→ 初期設定ではONになっていますが、オフにすることも可能
逆張りの指標や、トレンド転換のサインにもなる
3. アラート機能
MA1×MA3のゴールデンクロス/デッドクロス
MA1×MA2のBUY/SELL(MAフィルターあり)
→ これらが発生したタイミングでTradingViewのアラートを出せる
4. 使い方のポイント
短期・中期・長期のトレンドを同時に把握できる
200MAを基準にフィルターすることで「逆張りシグナル」を排除
フィルターで外れたシグナルもグレーで確認できる(任意)
アラートを設定すれば、チャンスを逃さずにエントリー可能
このインジケーターを使うことで、「200MAの上では買いのみ」「下では売りのみ」というシンプルでトレンドに沿ったトレードができるようになります。
Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2Power candle_V2
London Breakout + FVG Strategy [GBPJPY] - with SL/TPMarks the London open high and low on 15 min time frame, ads fvg on 5 min for orders
Adaptive Market Profile – Auto Detect & Dynamic Activity ZonesAdaptive Market Profile is an advanced indicator that automatically detects and displays the most relevant trend channel and market profile for any asset and timeframe. Unlike standard regression channel tools, this script uses a fully adaptive approach to identify the optimal period, providing you with the channel that best fits the current market dynamics. The calculation is based on maximizing the statistical significance of the trend using Pearson’s R coefficient, ensuring that the most relevant trend is always selected.
Within the selected channel, the indicator generates a dynamic market profile, breaking the price range into configurable zones and displaying the most active areas based on volume or the number of touches. This allows you to instantly identify high-activity price levels and potential support/resistance zones. The “most active lines” are plotted in real-time and always stay parallel to the channel, dynamically adapting to market structure.
Key features:
- Automatic detection of the optimal regression period: The script scans a wide range of lengths and selects the channel that statistically represents the strongest trend.
- Dynamic market profile: Visualizes the distribution of volume or price touches inside the trend channel, with customizable section count.
- Most active zones: Highlights the most traded or touched price levels as dynamic, parallel lines for precise support/resistance reading.
- Manual override: Optionally, users can select their own channel period for full control.
- Supports both linear and logarithmic charts: Simple toggle to match your chart scaling.
Use cases:
- Trend following and channel trading strategies.
- Quick identification of dynamic support/resistance and liquidity zones.
- Objective selection of the most statistically significant trend channel, without manual guesswork.
- Suitable for all assets and timeframes (crypto, stocks, forex, futures).
Originality:
This script goes beyond basic regression channels by integrating dynamic profile analysis and fully adaptive period detection, offering a comprehensive tool for modern technical analysts. The combination of trend detection, market profile, and activity zone mapping is unique and not available in TradingView built-ins.
Instructions:
Add Adaptive Market Profile to your chart. By default, the script automatically detects the optimal channel period and displays the corresponding regression channel with dynamic profile and activity zones. If you prefer manual control, disable “Auto trend channel period” and set your preferred period. Adjust profile settings as needed for your asset and timeframe.
For questions, suggestions, or further customization, contact Julien Eche (@Julien_Eche) directly on TradingView.
Advanced Multi-Time B-Candle (ZLEMA + Volume + Trend)Key Improvements
Multi-Timeframe Trend Confirmation
Uses 15-min ZLEMA + 5-min ZLEMA → higher accuracy trend filter.
ZLEMA for Faster Signals
More responsive to price changes than standard EMA.
Dual-Side Signals
Detects both bullish and bearish reversal patterns.
Breakout Filter
Confirms breakout by checking close above/below previous candle’s high/low.
Volume Surge Confirmation
Requires volume spike (configurable multiplier & lookback).
RISK MANAGEMENT CALCULATOR V3📊 RISK MANAGEMENT CALCULATOR – Lot Size, Profit & R:R Tool
This script is designed to help traders instantly calculate lot size, expected profit, and risk/reward ratio based on their trade plan.
✅ Features:
Input your Risk Amount ($), Entry, Stop Loss, and up to 3 Take Profits
Calculates:
✅ Lot Size based on risk
✅ Split profits per TP level (equally weighted)
✅ Total Profit & Risk/Reward (R:R)
Displays everything in a clean bottom-right table
Optimized for both:
🖥️ Desktop mode (larger layout)
📱 Mobile mode (toggle compact view)
💡 How to Use:
Enter your planned Entry, Stop Loss, and Risk Amount
Set any TP1, TP2, or TP3 prices (set TP to 0 if not used)
The system will auto-compute your ideal lot size and show estimated profits
🔧 Parameters:
Risk Amount ($) – how much you’re willing to lose
Entry Price – your trade entry
Stop Loss Price – your SL level
Take Profit 1/2/3 – optional TP targets
Pip Value – profit/loss per point for 1 standard lot
📱 Mobile Mode – compact the table for small screens
🔐 Notes:
No trades are executed – this is a risk planning tool only
Designed for all markets (forex, gold, indices, crypto)
TP profits are equally split (e.g. 2 TP = 50% / 50%)
RISK MANAGEMENT CALCULATOR📊 RISK MANAGEMENT CALCULATOR – Lot Size, Profit & R:R Tool
This script is designed to help traders instantly calculate lot size, expected profit, and risk/reward ratio based on their trade plan.
✅ Features:
Input your Risk Amount ($), Entry, Stop Loss, and up to 3 Take Profits
Calculates:
✅ Lot Size based on risk
✅ Split profits per TP level (equally weighted)
✅ Total Profit & Risk/Reward (R:R)
Displays everything in a clean bottom-right table
Optimized for both:
🖥️ Desktop mode (larger layout)
📱 Mobile mode (toggle compact view)
💡 How to Use:
Enter your planned Entry, Stop Loss, and Risk Amount
Set any TP1, TP2, or TP3 prices (set TP to 0 if not used)
The system will auto-compute your ideal lot size and show estimated profits
🔧 Parameters:
Risk Amount ($) – how much you’re willing to lose
Entry Price – your trade entry
Stop Loss Price – your SL level
Take Profit 1/2/3 – optional TP targets
Pip Value – profit/loss per point for 1 standard lot
📱 Mobile Mode – compact the table for small screens
🔐 Notes:
No trades are executed – this is a risk planning tool only
Designed for all markets (forex, gold, indices, crypto)
TP profits are equally split (e.g. 2 TP = 50% / 50%)
Lorentzian Key Support and Resistance Level Detector [mishy]🧮 Lorentzian Key S/R Levels Detector
Advanced Support & Resistance Detection Using Mathematical Clustering
The Problem
Traditional S/R indicators fail because they're either subjective (manual lines), rigid (fixed pivots), or break when price spikes occur. Most importantly, they don't tell you where prices actually spend time, just where they touched briefly.
The Solution: Lorentzian Distance Clustering
This indicator introduces a novel approach by using Lorentzian distance instead of traditional Euclidean distance for clustering. This is groundbreaking for financial data analysis.
Data Points Clustering:
🔬 Why Euclidean Distance Fails in Trading
Traditional K-means uses Euclidean distance:
• Formula: distance = (price_A - price_B)²
• Problem: Squaring amplifies differences exponentially
• Real impact: One 5% price spike has 25x more influence than a 1% move
• Result: Clusters get pulled toward outliers, missing real support/resistance zones
Example scenario:
Prices: ← flash spike
Euclidean: Centroid gets dragged toward 150
Actual S/R zone: Around 100 (where prices actually trade)
⚡ Lorentzian Distance: The Game Changer
Our approach uses Lorentzian distance:
• Formula: distance = log(1 + (price_difference)² / σ²)
• Breakthrough: Logarithmic compression keeps outliers in check
• Real impact: Large moves still matter, but don't dominate
• Result: Clusters focus on where prices actually spend time
Same example with Lorentzian:
Prices: ← flash spike
Lorentzian: Centroid stays near 100 (real trading zone)
Outlier (150): Acknowledged but not dominant
🧠 Adaptive Intelligence
The σ parameter isn't fixed,it's calculated from market disturbance/entropy:
• High volatility: σ increases, making algorithm more tolerant of large moves
• Low volatility: σ decreases, making algorithm more sensitive to small changes
• Self-calibrating: Adapts to any instrument or market condition automatically
Why this matters: Traditional methods treat a 2% move the same whether it's in a calm or volatile market. Lorentzian adapts the sensitivity based on current market behavior.
🎯 Automatic K-Selection (Elbow Method)
Instead of guessing how many S/R levels to draw, the indicator:
• Tests 2-6 clusters and calculates WCSS (tightness measure)
• Finds the "elbow" - where adding more clusters stops helping much
• Uses sharpness calculation to pick the optimal number automatically
Result: Perfect balance between detail and clarity.
How It Works
1. Collect recent closing prices
2. Calculate entropy to adapt to current market volatility
3. Cluster prices using Lorentzian K-means algorithm
4. Auto-select optimal cluster count via statistical analysis
5. Draw levels at cluster centers with deviation bands
📊 Manual K-Selection Guide (Using WCSS & Sharpness Analysis)
When you disable auto-selection, use both WCSS and Sharpness metrics from the analysis table to choose manually:
What WCSS tells you:
• Lower WCSS = tighter clusters = better S/R levels
• Higher WCSS = scattered clusters = weaker levels
What Sharpness tells you:
• Higher positive values = optimal elbow point = best K choice
• Lower/negative values = poor elbow definition = avoid this K
• Measures the "sharpness" of the WCSS curve drop-off
Decision strategy using both metrics:
K=2: WCSS = 150.42 | Sharpness = - | Selected =
K=3: WCSS = 89.15 | Sharpness = 22.04 | Selected = ✓ ← Best choice
K=4: WCSS = 76.23 | Sharpness = 1.89 | Selected =
K=5: WCSS = 73.91 | Sharpness = 1.43 | Selected =
Quick decision rules:
• Pick K with highest positive Sharpness (indicates optimal elbow)
• Confirm with significant WCSS drop (30%+ reduction is good)
• Avoid K values with negative or very low Sharpness (<1.0)
• K=3 above shows: Big WCSS drop (41%) + High Sharpness (22.04) = Perfect choice
Why this works:
The algorithm finds the "elbow" where adding more clusters stops being useful. High Sharpness pinpoints this elbow mathematically, while WCSS confirms the clustering quality.
Elbow Method Visualization:
Traditional clustering problems:
❌ Price spikes distort results
❌ Fixed parameters don't adapt
❌ Manual tuning is subjective
❌ No way to validate choices
Lorentzian solution:
☑️ Outlier-resistant distance metric
☑️ Entropy-based adaptation to volatility
☑️ Automatic optimal K selection
☑️ Statistical validation via WCSS & Sharpness
Features
Visual:
• Color-coded levels (red=highest resistance, green=lowest support)
• Optional deviation bands showing cluster spread
• Strength scores on labels: Each cluster shows a reliability score.
• Higher scores (0.8+) = very strong S/R levels with tight price clustering
• Lower scores (0.6-0.7) = weaker levels, use with caution
• Based on cluster tightness and data point density
• Clean line extensions and labels
Analytics:
• WCSS analysis table showing why K was chosen
• Cluster metrics and statistics
• Real-time entropy monitoring
Control:
• Auto/manual K selection toggle
• Customizable sample size (20-500 bars)
• Show/hide bands and metrics tables
The Result
You get mathematically validated S/R levels that focus on where prices actually cluster, not where they randomly spiked. The algorithm adapts to market conditions and removes guesswork from level selection.
Best for: Traders who want objective, data-driven S/R levels without manual chart analysis.
Credits: This script is for educational purposes and is inspired by the work of @ThinkLogicAI and an amazing mentor @DskyzInvestments . It demonstrates how Lorentzian geometrical concepts can be applied not only in ML classification but also quite elegantly in clustering.
Previous VWAP Levels by Riotwolftrading The "Previous VWAP" indicator calculates and displays the previous session's Volume Weighted Average Price (VWAP) for five timeframes (Daily, Weekly, Monthly, Quarterly, Yearly).
Each VWAP is plotted as a horizontal line extending to the right edge of the chart, with customizable labels at the right to identify each level. The indicator is designed for traders who want to visualize key price levels from prior periods without cluttering the chart with current VWAPs or additional metrics like standard deviations.
**Functionality**:
- **Calculates Previous VWAPs**: Computes the VWAP for the previous session of each timeframe (Daily, Weekly, Monthly, Quarterly, Yearly) based on the input source (default: `hlc3`) and volume.
- **Visual Style** : Uses `line.new` to draw horizontal lines from five bars back to the current bar, ensuring the lines extend to the right edge of the chart. Labels are placed at the right edge using `label.new` for clear identification.
- **Customization** : Allows users to toggle visibility, adjust line styles, widths, colors, and label sizes, and choose between abbreviated or full label text.
- **Minimalist Design**: Focuses solely on previous VWAPs, omitting current VWAPs, rolling VWAPs, and standard deviation bands to keep the chart clean.
**Intended Use**: This indicator is useful for traders who rely on historical VWAP levels as support/resistance or reference points for trading decisions, particularly in strategies involving mean reversion or breakout trading.
---
### Rules and Features
*VWAP Calculation**:
- The VWAP is calculated as the cumulative sum of price (`src`) multiplied by volume (`sumSrcVol`) divided by the cumulative volume (`sumVol`) for each timeframe.
- The "previous VWAP" is the VWAP value from the prior session, captured when a new session begins (e.g., new day, week, month, etc.).
- The indicator uses the `hlc3` (average of high, low, close) as the default source, but users can modify this in the settings.
**Timeframes**:
- **Daily**: Previous day's VWAP.
- **Weekly**: Previous week's VWAP.
- **Monthly**: Previous month's VWAP.
- **Quarterly**: Previous quarter's VWAP (3 months).
- **Yearly**: Previous year's VWAP (12 months).
- New sessions are detected using `ta.change(time(period))` for each timeframe.
**Line Drawing**:
- Lines are drawn using `line.new` from `time ` (five bars back) to the current bar (`time`), ensuring they extend to the right edge of the chart.
- Lines are updated only on the last confirmed bar (`barstate.islast`) to optimize performance and avoid repainting.
- Previous lines are deleted (`line.delete`) to prevent overlapping or clutter.
**Labels**:
- Labels are drawn at the right edge (`x=time`, `xloc=xloc.bar_time`) with `label.new`.
- Users can choose between abbreviated labels (e.g., "pvD" for Previous Daily VWAP) or full labels (e.g., "Prev Daily VWAP").
- Label sizes are customizable (`tiny`, `small`, `normal`, `large`, `huge`).
- Labels are deleted (`label.delete`) on each update to maintain a clean chart.
5. **Customization Options**:
- **Visibility**: Toggle each VWAP (Daily, Weekly, Monthly, Quarterly, Yearly) on or off.
- **Colors**: Individual color settings for each VWAP line and label (default colors: Daily=#E12D7B, Weekly=#F67B52, Monthly=#EDCD3B, Quarterly=#3BBC54, Yearly=#2665BD).
- **Line Style**: Choose from `solid`, `dotted`, or `dashed` lines.
- **Line Width**: Adjustable from 1 to 4 pixels.
- **Label Settings**: Enable/disable labels, abbreviate text, and select label size.
- **Source**: Customize the price source (default: `hlc3`).
**Performance Optimization**:
- The indicator only updates lines and labels on the last confirmed bar to minimize computational overhead.
- Uses `var` to initialize variables and avoid unnecessary recalculations.
- Deletes previous lines and labels to prevent chart clutter.
---
### Usage Instructions
1. **Add to Chart**:
- In TradingView, go to the Pine Editor, paste the script, and click "Add to Chart."
- The indicator will overlay on the price chart, showing previous VWAP lines and labels.
2. **Configure Settings**:
- Open the indicator settings to customize:
- Toggle visibility of each VWAP timeframe.
- Adjust colors, line style, and width.
- Enable/disable labels, choose abbreviation, and set label size.
- Modify the source if needed (e.g., use `close` instead of `hlc3`).
3. **Interpretation**:
- **Previous VWAPs**: Act as dynamic support/resistance levels based on the prior session's volume-weighted price.
- **Timeframes**: Use shorter timeframes (Daily, Weekly) for intraday/swing trading, and longer timeframes (Monthly, Quarterly, Yearly) for positional trading.
- **Labels**: Identify each VWAP level at the right edge of the chart for quick reference.
4. **Best Practices**:
- Use on charts with sufficient volume data, as VWAP relies on volume (a warning is triggered if no volume data is available).
- Combine with other indicators (e.g., moving averages, RSI) for confirmation in trading strategies.
- Adjust line styles and colors to avoid visual overlap with other chart elements.
---
### Example Use Case
A trader using a 1-hour chart can add the "Previous VWAP" indicator to identify key levels from the prior day, week, or month. For example:
- The Previous Daily VWAP might act as a support level for a bullish trend.
- The Previous Weekly VWAP could serve as a target for a swing trade.
- Labels at the right edge make it easy to identify these levels without cluttering the chart.
This indicator provides a clean, customizable way to visualize previous VWAPs, making it ideal for traders who want historical price context with minimal chart noise. For the complete Pine Script code, refer to the artifact provided in the previous response.
TZtraderTZtrader
This is a TrendZones version with features to set stoploss and targets in short and long positions meant for use in intraday charts. It aims to provide signals for opening and closing long and short positions. In the comments under the TrendZones publication several people expressed a need for features for a short position similar to those for a long position as implemented in TrendZones, some want to use it for scalping, some asked for alerts. When I proposed to create a version for day trading with target lines based on ATR, several people liked the idea.
Full disclosure: I don’t do day trading, because, after I lost a lot of money, I had to promise my wife to stay away from it. I restrict myself to long term investing in stocks which are in uptrend. However I understand what a day trader needs. I gather from my experience that day trading or scalping is an attempt to earn something by opening a position in the morning and close, reopen and close it again during the day with a profit. It is usually done with leveraged instruments like CFD’s, futures, options, and what have you. Opening and closing positions is done within minutes, so the trader needs a quick and efficient way to set proper stoploss and target. TZtrader supports this by showing only three or four numbers on the price bar: The price of the instrument, The logical stop level (gray or green or maroon dots), and the target level (navy). All other numbers are suppressed to prevent mistakes. Also a clear feedback for current settings at the top-center of the pane and an alert feedback at bottom that flashes alerts during the development of the current bar and gives suppression status.
The script
First I made a bare bones version of TrendZones to which I added code for long and short trading setups and a bare setup for no position. The code for the logical stops in long setup had to be reviewed, after which this became the basis for stops in short setup.
Then I added code for 10 alert messages, which was a hassle, because this is the first time I coded alerts and the first time I used an array as a stack to avoid a complicated if-then construction. During testing the array caused a runtime error which I solved by adding ‘array.clear’ to the code, also I discovered that in TradingView separate alerts have to be created for all three setups - short, long and bare. Flipping setups is done in the inputs with a dropdown menu because Pine Script has no function for a clickable button.
One visual with three setups.
The visual has the TrendZones structure: Three near parallel very smooth curves, which border the moderate uptrend (green) and downtrend (orange) zone over and under the curve in the middle, the COG (Center Of Gravity). Where the price breaks out of these curves, strong trend zones show up over and under the curves, respectively strong uptrend (blue) and strong downtrend (red).
Three setups were made clearly different to avoid confusion and to provide oversight in case of multiple trades going on simultaneously which I imagine are monitored in one screen. You have to see which one is long, which short and which have no position. The long setup should not trigger short signals, nor should the short trigger long signals nor the bare setup exclusive long or short signals.
The Long setup is default, shown on the example chart. In this setup the Stoploss suggestions (green, gray and maroon dots) are under the price bars and the target line (navy) at a set distance above the High Border. A zone with a width of 1 ATR is drawn under the Low Border. In this setup 5 specific alerts are provided
The Short setup has the Stoploss suggestions over the price bars, the target line at a set distance under the Low Border. A zone with a width of 1 ATR is drawn above the High Border. This setup also has 5 specific alerts.
The Bare setup has no Stoploss suggestions, no target line and supports 4 alerts, 2 in common with the Long setup and 2 with Short.
The table below gives a summary of scripted alerts:
Setup = Where = When = Purpose
Long, Bare = Green Zone = Bars come from lower zones = Uptrend starts
Long, Bare = Green Zone = Sideways ends in uptrend = Uptrend resumes
Long = COG = First crossing = Uptrend might end warning
Long = Orange Zone = Bars come from higher zones = Uptrend ended take care
Long = Red Zone = Bars come from higher zones = Strong downtrend->close Long
Short, Bare = Orange Zone = Bars come from higher zones = Downtrend starts
Short, Bare = Orange Zone = Sideways ends in downtrend = Downtrend resumes
Short = COG = First crossing = Downtrend might end warning
Short = Green Zone = Bars come from lower zones = Downtrend ended take care
Short = Blue Zone = Bars come from lower zones = Strong uptrend -> close short
You can use script alerts in TradingView by clicking the clock in the sidebar, then ‘create alert’ or plus, as condition you choose ‘Tztrader’ in the dialog box, then the “Any alert() function call” option (the first item in the list). The script lets the valid alert trigger by TradingView after the bar is completed, this can differ from the flashed messages during its formation.
When you create alerts in Tradingview, I advice to do that for each setup, then to make only the alert active which matches the current setup, pause the other ones.
Suppressing false and annoying signals
The script has two ways to suppress such signals, which have to do with the numbers in the alert feedback. The numbers left and right of the message with a colored background, depict the zones in which the previous (left) and current (right) bar move. 1 is the strong downtrend zone (red), 2 the moderate downtrend zone (orange), 3 the sideways zones (gray), 4 the COG (gray), 5 the moderate uptrend zone (green), 6 the strong uptrend zone (blue), 7 something went wrong with assigning a zone (black). In extensive testing the number 7 never occurs, because I catch that error in the code. The idea is that an alert is only triggered if the previous bar was in a different zone. When the bars are in the same zone, no alert is possible. This way all annoying signals are suppressed and long, short and bare get the appropriate alerts.
The third number is a counter. It counts how often the COG is crossed without touching the outer curves. The counter will reset to zero when the upper or lower curve is touched. When the count is 1 you have zone situation 4 and appropriate alerts are flashed. When the count is 2 or higher, a sideways situation (3) is called and while the recrossings are going on, no alerts can be flashed. This suppresses false signals. The ATR zone and curves are brownish-gray where sideways happens(ed). When the channel is narrowed down to just the three curves, some false signals still might occur.
Inputs
“Setup”, default is long, drop down menu provides long, short and bare.
“Target ATR”, default is 2, sets the amount of ATR for the target line. In 1 minute charts 4 seems an appropriate setting, you have to learn by experience which setting works.
“show feedback …” default is on, This creates two feedback labels, a Setup feedback on top of the pane, which shows charted instrument, Setup type, Trend and timeframe of the chart. Background color of Trend feedback is green when it matches the setup, red when mismatches and gray when no match. The alert feedback at the bottom of the pane shows a number, a message and two numbers. The numbers will be explained in the chapter about false and annoying signals below. During formation of the bar, valid alerts are flashed with a blue background, otherwise the message ‘alerts for current bar suppressed’.
Logical Stops
The curves are the logical place to put stops, because, as these are averages of the high and low border of a Donchian channel, they signify the ‘natural’ current highest, lowest and main level in the lookback period that fit the monitored trend setup. A downtrend turns into an uptrend when a breakout of the upper curve occurs. If you are short, that is where you want to close position, so the logical place for the stoploss is the upper curve. Vice versa, when you are long, the logical stop is on the lower curve. The stops show up as green or gray dots on the curves, the green dots signify a nice entry level, the gray stops are there to suggest levels where unrealized profits might be secured, the maroon dots indicate that the trend mismatches the setup.
COG versus other lines
Any line used to identify a trend, be it some MA or some other line, is interpreted the same way: When the bars move above the line there is an uptrend and when below, a downtrend. COG is not different in that sense. If you put such a line in the same chart as TZtrader, you can see situations in which the other line shows uptrend or downtrend earlier than COG, also some other lines, e.g. Hull MA, are very good at showing tops and bottoms, while COG ignores these. On the other hand the other lines are usually a little nervous and let you shake out of position too soon. Just like the other lines, COG gives false signals when it is near horizontal. The advantage of the placement COG is the tolerance for pull backs. This way TZtrader keeps you longer in the trend. Such pull backs are often ‘flags’ which are interpreted in TA as confirming the trend. Tztrader aims to get you in position reasonably soon when a trend begins and out of position as soon as the trend turns against you. The placement of COG is done with a fundamentally different algorithm than other lines as it is not an average of prices, but the middle of two averages of borders of a Donchian channel. This gives the two zones between the curves the same quality as the two zones above and below the middle line of a standard Donchian Channel.
A multi timeframe application.
In this scenario you put a 5 minutes and 1 minute chart with Tztrader side by side. If the 5 minutes shows uptrend, set the 1 minute on long trading and open positions when the trend matches uptrend en close when it mismatches. Don’t open short positions. Once the 5 minute changes to downtrend, set Tztrader in the 1 minute to short trading and open positions when the trend matches downtrend and close when it mismatches.
The idea is that in a long ‘context’, provided by the 5 minutes, the uptrends in the 1 minute will last longer and go further, vice versa for the short ‘context’. This way you do swing trading in the 5 minute in a smart way, maximizing profits.
You can do this with any timeframe pairs with a proportion of around 5:1, 4:1, 6:1, like e.g. 60 minutes and 15 minutes or weeks and days (5 trading days in a week).
Dear day-traders, may this tool be helpful and may your days be blessed.
Take care
Simple Trend Indicator (Heikin-Ashi) | Lyro RSSimple Trend Indicator (Heikin-Ashi)
A momentum oscillator using Heikin-Ashi smoothed data to filter trend direction with zero-line crosses.
This indicator calculates the normalized deviation of Heikin-Ashi OHLC values from their Simple Moving Average (SMA), then averages these deviations into a single oscillator. It simplifies trend detection by:
Reducing noise via Heikin-Ashi smoothing.
Highlighting momentum shifts through a zero-line cross system (bullish/bearish).
Providing clear visual signals with color-coded plots and directional dots.
Originality:
Unlike standard momentum oscillators, this tool uniquely combines:
Heikin-Ashi normalization for cleaner trend analysis.
Multi-component averaging (high, open, low, close) to balance sensitivity.
Minimalist design for clutter-free charting.
How It Works:
Data Input: Fetches Heikin-Ashi OHLC values using request.security().
Momentum Calculation: For each Heikin-Ashi component:
Computes % deviation from its SMA: (value − SMA(value, length)) / SMA(value, length) * 100.
Oscillator: Averages deviations of all four components into one line (sum).
Signals:
Bullish: Oscillator > 0 (green).
Bearish: Oscillator < 0 (red).
Cross Confirmation: Dots (⦿) mark zero-line crosses.
Usage:
Trend Following: Enter long/short on sustained oscillator breaks above/below zero.
Reversal Watch: Zero-line crosses may hint at weakening momentum.
Filter: Combine with volume or support/resistance levels.
⚠️Disclaimer: This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
Footprint-Style Order Flow by Kalibea📊 Indicator: "Footprint-Style Order Flow by Kalibea"
Simplified Order Flow Analysis for TradingView
This indicator was created by Kalibea to bring you the power of Order Flow analysis in a clear, practical way—without technical complexity and fully compatible with TradingView.
While TradingView doesn’t support traditional footprint charts, this tool simulates institutional market reading using a smart calculation of estimated volume delta, helping you make more informed trading decisions.
🔍 What does this indicator do?
Estimated Delta: Calculates the difference between buying and selling pressure per candle, based on price movement and volume.
Smart Visual Signals:
🔼 Green Triangle: Potential buy entry (buyer dominance).
🔽 Red Triangle: Potential sell entry (seller dominance).
Delta Histogram: Displays whether each candle was driven more by buyers or sellers.
Live Labels: Shows real-time delta values above each candle for quick interpretation.
🧠 How does it help your trading?
Detects real-time market imbalances (who's in control: buyers or sellers).
Improves entry and exit timing, especially on lower timeframes.
Helps you confirm other strategies such as supply/demand zones, support/resistance, or candlestick patterns.
Provides an institutional-style reading simplified for use within TradingView.
⚙️ Fully Customizable to Your Style
Adjust the delta sensitivity to suit any market: Forex, Crypto, Indices, and more.
Turn on/off visual signals and histogram as needed.
🔑 Recommended by Kalibea for:
✅ Intraday traders and scalpers
✅ Traders looking to take the next step into institutional-style analysis
✅ Those seeking precise entries without overcomplicating their charts
💬 “Order Flow is the market’s internal voice. This indicator helps you hear it—no expensive footprint software required.”
— Kalibea
CGPT Golden Cross / Death Cross AlertThis custom indicator identifies Golden Cross (Gx) and Death Cross (Dx) events using either EMA or SMA moving averages. A Golden Cross occurs when a short-term MA (e.g., 50) crosses above a long-term MA (e.g., 200), signaling potential bullish momentum. A Death Cross signals potential bearish momentum, with the short-term MA crossing below the long-term MA.
It includes:
📈 Customizable MA types (EMA or SMA)
⚙️ Adjustable fast & slow MA lengths
🟢🔴 Chart labels for Gx (green) and Dx (red)
🎯 Background highlights for visual trend shifts
🔔 Built-in alert conditions for real-time notifications
Ideal for crypto, stocks, or forex swing and trend trading
Mara JPY Strength (USDJPY+EURJPY+GBPJPY)/3 + DXYJPY, USDJPY, EURJPY, GBPJPY, smart money, bias, index, forex indicator, DXY, strength meter, professional, trading tool, price action
Mara JPY Bias ProMara JPY Bias Pro™ is a precision tool built for serious traders who focus on JPY and USD pairs.
This synthetic index combines USDJPY + EURJPY + GBPJPY, generating a smooth and dynamic representation of JPY strength or weakness. When the line turns green, JPY is weakening — time to look for LONG setups on XXX/JPY pairs. When red, JPY is strengthening — ideal moment for SHORT trades.
Built-in bias logic with adjustable MA-based trend detection or slope/momentum view lets you customize signals based on your strategy.
Plus, we’ve included a normalized DXY overlay, so you can track USD strength in parallel — perfect for traders working with EUR/USD, GBP/USD, USD/JPY and JPY crosses.
💡 Designed for day traders, scalpers, and smart money traders looking for clean confluence.
✅ Features:
Visual color-coded JPY bias (Green = Long / Red = Short)
Optional USD (DXY) strength overlay
Customizable MA length and bias logic
Built-in alerts for bias shifts & momentum flips
🔔 Alert-ready – never miss a reversal.
Trade smarter. Cut the noise. Stay on the right side of the move.