Normalized Mean ReversionA script that can help identify potential mean reversion opportunities using a Simple Moving Average (SMA) as the mean. This script will plot the SMA and highlight when the price deviates significantly from it, which could indicate a potential mean reversion setup.
Médias Móveis
NasyI## NasyI - Multi-Timeframe Technical Analysis Toolkit
### English Description
**NasyI** is a comprehensive technical analysis indicator designed to provide traders with a complete view of market dynamics across multiple timeframes. This indicator combines the power of Exponential Moving Averages (EMAs), Simple Moving Averages (MAs), Volume Weighted Average Price (VWAP), and key support/resistance levels to help traders identify trend direction, potential reversal points, and optimal entry/exit opportunities.
#### Key Features
1. **Multi-Timeframe Analysis System**
- 2-minute EMAs (13, 48) for ultra-short-term trend identification
- 5-minute EMAs (9, 13, 21, 48, 200) for short-term trend confirmation
- Daily EMAs (5, 13, 21, 48, 100, 200) and MAs (20, 50, 100, 200) for longer-term perspective
- Color-coded bands between key EMAs to visually identify trend strength and direction
2. **Advanced VWAP Integration**
- Daily VWAP for intraday support/resistance
- Weekly VWAP for medium-term price reference
- Monthly VWAP for long-term institutional price levels
- All VWAPs properly reset at their respective time period boundaries
3. **Critical Price Level Identification**
- Previous day high/low lines for identifying key breakout and breakdown levels
- Pre-market high/low tracking to identify potential intraday support/resistance zones
- All levels displayed with distinct line styles for easy identification
4. **Dynamic Trend Analysis**
- Color-coded bands between EMAs display trend strength and direction:
- Green bands indicate uptrend conditions (9 EMA > 21 EMA > 48 EMA)
- Red bands indicate downtrend conditions (9 EMA < 21 EMA < 48 EMA)
- Yellow bands indicate neutral/confused market conditions
- Visual representation makes trend changes immediately apparent
5. **Comprehensive Customization Options**
- Fully customizable colors for all indicators and bands
- Adjustable transparency settings for visual clarity
- Optional price labels with customizable placement and appearance
- Ability to show/hide specific components based on trading preferences
#### Trading Applications
This indicator is particularly valuable for:
1. **Day Trading & Scalping**: The 2-minute and 5-minute EMAs with color bands provide clear short-term trend direction and potential reversal signals.
2. **Swing Trading**: Daily EMAs and MAs offer perspective on the larger trend, helping to align short-term trades with the broader market direction.
3. **Gap Trading**: Previous day and pre-market levels help identify potential gap fill scenarios and breakout/breakdown opportunities.
4. **VWAP Trading Strategies**: Multiple timeframe VWAPs allow for identifying institutional participation levels and potential reversal zones.
5. **EMA Cross Systems**: The various EMAs can be used to identify golden crosses and death crosses across multiple timeframes.
#### How the Components Work Together
The power of NasyI comes from the integration of these different technical elements:
1. The short-timeframe EMAs (2m, 5m) provide immediate trend information, while the daily EMAs/MAs provide context about the larger market structure.
2. The color bands between EMAs offer instant visual confirmation of trend alignment or divergence across timeframes.
3. Previous day and pre-market levels add horizontal support/resistance zones to complement the dynamic moving averages.
4. Multiple timeframe VWAPs provide additional confirmation of institutional activity levels and potential reversal points.
By combining these elements, traders can develop a comprehensive market view that integrates price action, trend direction, and key support/resistance levels all in one indicator.
#### Usage Instructions
1. Apply the NasyI indicator to your chart (works best on intraday timeframes from 1-minute to 30-minute).
2. Observe the relationship between price and the various EMAs:
- Price above the 2m/5m EMAs with green bands indicates bullish short-term conditions
- Price below the 2m/5m EMAs with red bands indicates bearish short-term conditions
3. Use the daily EMAs/MAs and VWAPs as targets for potential price movements and reversal zones.
4. Previous day and pre-market high/low lines provide key levels to watch for breakouts or breakdowns.
5. Customize the appearance according to your preferences using the extensive settings options.
This indicator represents a unique approach to technical analysis by combining multiple timeframe perspectives into a single, visually intuitive display that helps traders make more informed decisions based on a comprehensive view of market conditions.
### 中文描述
**NasyI** 是一个全面的技术分析指标,旨在为交易者提供跨多个时间周期的完整市场动态视图。该指标结合了指数移动平均线(EMA)、简单移动平均线(MA)、成交量加权平均价格(VWAP)和关键支撑/阻力水平的力量,帮助交易者识别趋势方向、潜在反转点和最佳进出场机会。
#### 主要特点
1. **多时间周期分析系统**
- 2分钟EMAs(13,48)用于超短期趋势识别
- 5分钟EMAs(9,13,21,48,200)用于短期趋势确认
- 日线EMAs(5,13,21,48,100,200)和MAs(20,50,100,200)用于更长期的视角
- 关键EMAs之间的彩色带状区域直观显示趋势强度和方向
2. **高级VWAP整合**
- 日内VWAP作为日内支撑/阻力
- 周内VWAP作为中期价格参考
- 月内VWAP作为长期机构价格水平
- 所有VWAP在各自的时间周期边界正确重置
3. **关键价格水平识别**
- 前一交易日高点/低点线用于识别关键突破和跌破水平
- 盘前高点/低点跟踪用于识别潜在的日内支撑/阻力区域
- 所有水平以不同的线条样式显示,便于识别
4. **动态趋势分析**
- EMAs之间的彩色带状区域显示趋势强度和方向:
- 绿色带状区域表示上升趋势(9 EMA > 21 EMA > 48 EMA)
- 红色带状区域表示下降趋势(9 EMA < 21 EMA < 48 EMA)
- 黄色带状区域表示中性/混乱市场条件
- 视觉表示使趋势变化立即显现
5. **全面的自定义选项**
- 所有指标和带状区域的颜色完全可定制
- 可调节的透明度设置,提高视觉清晰度
- 可选的价格标签,带有可定制的位置和外观
- 能够根据交易偏好显示/隐藏特定组件
#### 交易应用
此指标对以下方面特别有价值:
1. **日内交易和短线交易**:2分钟和5分钟EMAs与色带提供清晰的短期趋势方向和潜在反转信号。
2. **摇摆交易**:日线EMAs和MAs提供对更大趋势的视角,帮助将短期交易与更广泛的市场方向对齐。
3. **缺口交易**:前一日和盘前水平帮助识别潜在的缺口填充情况和突破/跌破机会。
4. **VWAP交易策略**:多时间周期VWAP允许识别机构参与水平和潜在反转区域。
5. **EMA交叉系统**:各种EMAs可用于识别跨多个时间周期的黄金交叉和死亡交叉。
#### 组件如何协同工作
NasyI的强大之处在于这些不同技术元素的集成:
1. 短时间周期EMAs(2m,5m)提供即时趋势信息,而日线EMAs/MAs提供关于更大市场结构的背景。
2. EMAs之间的色带提供趋势对齐或跨时间周期分歧的即时视觉确认。
3. 前一日和盘前水平添加水平支撑/阻力区域,补充动态移动平均线。
4. 多时间周期VWAP提供机构活动水平和潜在反转点的额外确认。
通过结合这些元素,交易者可以发展出全面的市场视图,整合价格行动、趋势方向和关键支撑/阻力水平于一个指标中。
#### 使用说明
1. 将NasyI指标应用到您的图表上(最适合1分钟至30分钟的日内时间周期)。
2. 观察价格与各种EMAs之间的关系:
- 价格位于2m/5m EMAs之上,带有绿色带状区域,表示看涨的短期条件
- 价格位于2m/5m EMAs之下,带有红色带状区域,表示看跌的短期条件
3. 使用日线EMAs/MAs和VWAPs作为潜在价格移动和反转区域的目标。
4. 前一日和盘前高点/低点线提供需要关注的突破或跌破的关键水平。
5. 使用广泛的设置选项根据您的偏好自定义外观。
这个指标代表了一种独特的技术分析方法,将多个时间周期的视角结合到一个单一的、视觉直观的显示中,帮助交易者基于对市场条件的全面视图做出更明智的决策。
HRC TrendicatorDotted Line of HRC Trendicator used to track trend and slope trend.... trade long above, and short below
Davut Dayı Full EMA Stack StrategyEma stacking strategy for the honor of Davut Bilgili for his wisdom.
EMA's are generally stack to gether beware when the cross you should take action.
Smoothed Heiken Ashi Candles With Alternate Chart IntervalWhen trading, we tend to have one or more preferred chart time interval. If using HA candles for trend analysis, you may watch HA candles on each of those preferred interval, using multiple charts for a given symbol. However, having an indicator that plots HA candles for the given chart interval, as well the HA candles based on another interval on the same chart, provides the ability to watch HA reactions on multiple chart intervals more easily.
As an example, you like to watch the 5 minute chart with HA candles, but also prefer to use the 30 minute chart and HA candles for confirmation of a reversal/retrace. This indicator provides the convenience of monitoring your 5 minute chart, and setting alternate HA interval to 30 minute, thereby showing each set of the HA candles together on the same chart.
The alternate HA candles are calculated based on the selected chart interval, defaulting to 5 minutes.
The default HA and alternate HA candles are calculated and smoothed using the selected EMA length. Both default to 13.
3SMA +30 Stan Weinstein +200WMA +alert-crossingIndicator Description: Stan Weinstein Strategy + Key Moving Averages
🔹 Introduction
This indicator combines the Classic Stan Weinstein Strategy with a modern update based on the author’s latest recommendations. It includes key moving averages that help identify trends and potential entry or exit points in the market.
📊 Included Moving Averages (Fully Customizable)
All moving averages in this indicator have modifiable parameters, allowing users to adjust values in the input settings.
1️⃣ 30-Week SMA (Stan Weinstein): A long-term trend indicator defining the asset’s main trend.
2️⃣ 40-Week SMA (Weinstein Update): An adjusted version recommended by the author in his recent updates.
3️⃣ 10-Day SMA: Displays short-term price action and helps confirm trend changes.
4️⃣ 100-Day SMA: A medium-term trend measure used by traders to assess trend strength.
5️⃣ 200-Day WMA (Weighted Moving Average): A very long-term indicator that filters market noise and confirms solid trends.
🔍 How to Interpret It
✔️ 30/40-Week SMA in an uptrend → Confirms an accumulation phase or an upward price trend.
✔️ Price above the 200-WMA → Indicates a strong and healthy long-term trend.
✔️ 10-SMA crossing other moving averages → Can signal an early entry or exit opportunity.
✔️ 100-SMA vs. 200-WMA → A breakout of the 100-SMA above the 200-WMA may signal a new bullish phase.
🚨 Built-in Alerts (Key Crossovers)
The indicator includes automatic alerts to notify traders when key moving averages cross, allowing timely reactions:
🔔 10-SMA crossing the 40-SMA → Possible medium-term trend shift.
🔔 10-SMA crossing the 200-WMA → Confirmation of a stronger trend.
🔔 40-SMA crossing the 200-WMA → Long-term trend reversal signal.
💡 Customization: All moving average periods can be adjusted in the input settings, making the indicator flexible for different trading strategies.
Multi-Timeframe EMAs with PivotThis is a well-designed multi-timeframe EMA indicator with pivot points for TradingView. Here's a detailed analysis:
Core Components
Multi-Timeframe EMAs
Tracks 5, 20, and 48-period EMAs across 4 timeframes (1m, 5m, 15m, 1h)
Uses request.security() to fetch higher timeframe data accurately
Each EMA is toggleable via input settings
Pivot Point System
Calculates classic pivot point: (Prev High + Prev Low + Prev Close)/3
Flexible timeframe selection (default: Daily)
Displays as a yellow line with labeled value
Visual Design
Color-coded EMAs for easy identification
Clean plotting with na values for disabled EMAs
Dynamic pivot line that auto-centers on last bar
Combined + Reversal By DemirkanThis indicator is a comprehensive tool designed to identify potential trend reversals, trend direction, and entry/exit points by combining multiple technical analysis instruments. It includes the following components:
Two Reversal Lines (Based on Donchian Channel): Two lines with different periods indicate potential support/resistance levels and trend changes.
Hull Moving Average (HMA): A smoother, less lagging moving average helps determine trend direction and short-term momentum.
Fibonacci Level: A dynamic Fibonacci retracement level, calculated based on the highest high and lowest low over a specific period, serves as a potential support or area of interest.
Signal Generation: Produces Buy/Sell signals based on the crossovers and conditions of these components.
Visual Aids: Enhances interpretation by coloring the area between lines, coloring candlesticks, and adding labels.
Detailed Component Description:
Input Parameters (Settings):
Reversal Line 1 Length (Default: 100): The period (number of bars) used to calculate the first reversal line. Longer periods capture slower, more significant trends.
Reversal Line 2 Length (Default: 33): The period used to calculate the second reversal line. Shorter periods react to faster, shorter-term changes.
HMA Length (Default: 100): The period for calculating the Hull Moving Average.
Source (Default: close): The price source used for all calculations (close, open, high, low, etc.).
Reversal Line Bar Offset (Default: 3): Determines how many bars forward the Reversal Lines are shifted on the chart. This can make signals appear slightly earlier (or later, depending on the strategy). 0 means no shift.
Fibonacci Level (Default: 0.382): Specifies the Fibonacci retracement level (between 0.0 and 1.0). Common levels like 0.382, 0.5, 0.618 can be used.
Lookback Period (Default: 20): The period (number of bars) over which to look back for the highest high and lowest low to calculate the Fibonacci level.
Price Margin (Default: 0.005): Tolerance (as a percentage) determining how close the price needs to be to the Fibonacci level to be considered "at the level". E.g., 0.005 = 0.5%. If the price is within 0.5% of the calculated Fibonacci level, the condition is met.
Calculations:
donchian(len) Function: Calculates the average (math.avg) of the highest high (ta.highest) and lowest low (ta.lowest) over a specific period (len). This is effectively the midline of a classic Donchian Channel and is used here as the "Reversal Line".
Reversal Lines (conversionLine1, conversionLine2): Calculated using the donchian function based on the user-defined conversionPeriods1 and conversionPeriods2 lengths.
Hull Moving Average (hullMA): Calculated using the hma function. This function uniquely combines Weighted Moving Averages (WMA) to achieve less lag.
Fibonacci Level Calculation (fibLevel1, isAtFibLevel): Finds the highest high and lowest low within the lookbackPeriod, calculates the range (priceRange). fibLevel1 is determined by subtracting priceRange * fibLevel from the highest high (representing a retracement level). isAtFibLevel checks if the current closing price is within the priceMargin tolerance of the calculated fibLevel1.
Visual Elements (Plots/Drawing):
plot(conversionLine1 , ...): Plots the first reversal line in blue, shifted forward by barOffset.
plot(conversionLine2 , ...): Plots the second reversal line in black, shifted forward by barOffset.
plot(hullMA, ...): Plots the Hull Moving Average in orange.
plot(fibLevel1, ...): Plots the calculated Fibonacci level as a light blue, dashed line.
fill(...): Fills the area between the two (shifted) reversal lines. The area is colored blue if conversionLine1 > conversionLine2 (often interpreted as bullish) and red otherwise (bearish). The color transparency is set to 90 (almost opaque).
label.*: Adds labels at trend change points. A "Buy" label appears when the area turns blue (Line 1 crosses above Line 2), and a "Sell" label appears when it turns red (Line 1 crosses below Line 2). Labels appear once when the trend starts and are updated/deleted when the trend changes.
plotshape(...): Plots shapes (arrows/labels) on the chart when specific conditions are met:
Reversal Crossover Signals: A green up arrow (shape.labelup) appears when conversionLine2 crosses above conversionLine1 (Buy Signal - buySignal). A red down arrow (shape.labeldown) appears when conversionLine1 crosses below conversionLine2 (Sell Signal - sellSignal).
Hull MA Signals: A green up arrow (hullBuySignal) appears when the price closes above the HMA after being below it. A red down arrow (hullSellSignal) appears when the price closes below the HMA after being above it.
Fibonacci Buy Signal: A purple up arrow (fibBuySignal) appears when both the price is near the calculated Fibonacci level (isAtFibLevel) and a Hull MA Buy signal (hullBuySignal) occurs simultaneously. This signifies a "confluence" signal.
barcolor(...): Changes the color of the candlesticks. Bars turn blue on a Hull MA Buy signal (hullBuySignal) and red on a Hull MA Sell signal (hullSellSignal). Otherwise, the bar color remains the default chart color.
How to Use / Interpret:
Trend Direction:
Observe the color of the filled area between the reversal lines (Blue = Uptrend, Red = Downtrend).
Note whether the price is above or below the Hull MA.
Consider the slope of the Hull MA (upward or downward).
Entry/Exit Signals:
Aggressive: Use the crossovers of the reversal lines (buySignal, sellSignal). Green arrow suggests buy, red arrow suggests sell.
Trend Following: Use the HMA crossovers (hullBuySignal, hullSellSignal). Green arrow suggests buy, red arrow suggests sell. The bar colors also confirm these signals visually.
Confirmed Buy: Look for the Fibonacci Buy Signal (Purple arrow). When the price reaches a potential support level (Fibonacci) and simultaneously gets an HMA Buy signal, it can be considered a stronger buy indication.
Support/Resistance:
The reversal lines themselves can act as dynamic support/resistance levels.
The plotted Fibonacci level (fibLevel1) can be monitored as a potential retracement and support zone.
Strategy:
Confluence (multiple signals aligning) can increase confidence. For example, a buySignal or hullBuySignal occurring while the HMA is pointing up and the fill area is blue might be considered stronger.
Adjust the barOffset parameter to fine-tune the timing of the visual signals according to your trading style.
Use the Fibonacci Buy signal to potentially find entry points after pullbacks in an uptrend or near potential bottoms after a decline.
Important Notes:
No single indicator provides 100% accurate signals. It's crucial to use this indicator in conjunction with other analysis methods (price action, chart patterns, volume, etc.) and sound risk management strategies.
The indicator's performance might vary in different market conditions (trending, sideways) and across different timeframes. Backtesting before live trading is recommended.
The barOffset value shifts the plotting of the lines forward visually but does not change the time at which the underlying calculation occurs (it's still based on the data up to the current closing bar).
EREMA SignalsOverview
The EREMA Signals indicator is a specialized overlay tool designed to display precise buy and sell signals directly on your price chart. Working as a companion to the main Ehlers Reverse EMA indicator, it brings powerful momentum-based signals to your trading strategy without cluttering your chart with additional indicator panels.
Key Features
On-Chart Signal Visualization: Clear buy/sell arrows appear directly on the price chart
Dynamic Signal Positioning: Signals automatically adjust their distance from price using ATR for optimal visibility
Multiple Signal Types: Choose from three distinct signal generation methods
Clean Chart Interface: Displays only the essential signals, maintaining chart clarity
Signal Types
Zero Cross: Generates signals when the Ehlers Reverse EMA crosses above/below the zero line
MA Cross: Identifies when the Ehlers Reverse EMA crosses its own moving average
Zero & MA Cross: The strictest filter, requiring both zero line and MA crossovers for signal generation
How To Use
Setup
First add the main "Ehlers Reverse EMA" indicator to your chart
Then add this "EREMA Signals" indicator as an overlay
Configure both indicators with identical settings for alpha, MA type, and signal method
Reading Signals
Green Triangles (below price): Buy signals indicating potential upward momentum
Red Triangles (above price): Sell signals indicating potential downward momentum
Trading Applications
Trend Identification: Zero cross signals help identify changes in overall trend direction
Momentum Trading: MA cross signals can identify shorter-term momentum shifts
Confirmation Tool: Use alongside other technical indicators or price action strategies
Multiple Timeframe Analysis: Apply to different timeframes for more robust trading decisions
Best Practices
Consider using longer timeframes (4H, Daily) for more reliable signals
The combined "Zero & MA Cross" setting provides fewer but higher-quality signals
For tighter entries, use the "MA Cross" option in established trends
Adjust the Alpha parameter to match your trading style (lower for longer-term, higher for shorter-term)
This indicator works seamlessly with the main Ehlers Reverse EMA indicator while maintaining a clean chart interface, making it ideal for traders who prefer visual simplicity without sacrificing analytical power.
Ehlers Reverse EMAOverview
The Ehlers Reverse EMA is an advanced momentum indicator designed by John Ehlers and implemented here with additional features for improved trading decision-making. This indicator helps identify trend direction, potential reversals, and generates precise buy/sell signals based on multiple confirmation methods.
What Makes It Unique
Unlike conventional EMAs, the Ehlers Reverse EMA uses a sophisticated reverse-engineering approach to provide smoother, more responsive signals with reduced lag. The indicator combines a proprietary EMA calculation with optional moving average confirmation to filter out market noise and highlight meaningful price movements.
Features
Dynamic Color Coding: Green when momentum is positive, red when negative
Moving Average Overlay: Optional MA with selectable types (SMA, EMA, WMA, VWMA)
Multiple Signal Generation Methods:
Zero-Line Crossovers: Signals when momentum shifts from positive to negative or vice versa
MA Crossovers: Signals when the Ehlers EMA crosses its own moving average
Combined Confirmation: Requires both zero-line and MA crossovers for highest probability signals
On-Chart Signal Visualization: Clear buy/sell arrows directly on the price chart
Customizable Parameters: Adjust alpha value, MA type, and signal generation to suit your trading style
How To Use
Add the main "Ehlers Reverse EMA" indicator to your chart
Add the companion "EREMA Signals" indicator to display buy/sell signals on the price chart
Ensure both indicators have matching settings for consistency
Signal Interpretation
Buy Signals (Green Triangles): Appear below price bars when conditions are met
Sell Signals (Red Triangles): Appear above price bars when conditions are met
Recommended Timeframes
Works well on all timeframes from 5-minute to daily charts. For swing trading, 4H or daily timeframes often provide the most reliable signals.
Strategy Applications
Trend Following: Use zero-line crossovers to enter with the trend
Momentum Trading: Use MA crossovers for entry and exit points
Confirmation Tool: Combine with price action or other indicators for higher-probability trades
Divergence Analysis: Compare indicator movement with price action to spot potential reversals
Parameter Settings
Alpha (Default: 0.1): Lower values create smoother lines but more lag; higher values increase responsiveness but may increase false signals
MA Length (Default: 14): Adjust based on your trading timeframe and style
This versatile indicator helps identify high-probability trading opportunities while filtering out market noise, making it valuable for both novice and experienced traders alike.
SublimeDubs EMA CloudShoutout Ripster for open-sourcing his code! This is a slight improvement/update to his code. A lot is customizable via settings instead of in the script. You can change the colors more easily now. I also added lines with price labels for the clouds and offset them by x amount of bar lengths. I can't do much about the vertical spacing but at least you can move it horizontally.
ISSU_LevelMonthly, weekly, daily level
Quarter session
EMA 20,50
Daily close level
IST 10:30am Level
Double MACD Overlay [NLR]This indicator plots two MACD signals directly on your price chart to help you spot trends and shifts in momentum more clearly:
🔹 Main MACD - The classic MACD with customizable Fast, Slow, and Signal lengths. Great for confirming broader trend direction.
🔹 Short MACD - A faster MACD with an option to smooth the input, helping you catch early signals or identify short-term momentum changes.
Each MACD is visualized as:
A line showing the moving average
A colored histogram showing the MACD minus the signal
A zero line for reference
Why use this?
By comparing a short-term MACD with a longer-term one, you get early signals without losing the big picture. Use it for confirmation, divergence spotting, or just cleaner trend visualization.
Best For:
✅ Trend-followers
✅ Momentum traders
✅ Anyone who wants more context from their MACD signals
Recommended Settings:
Here are some ideal settings to get the most out of this indicator:
On a 5-Minute Chart:
Compare your current MACD with the 15-minute MACD.
- MACD Multiplier: 3
On a 1-Minute Chart:
Spot short-term moves while comparing them to the 5-minute MACD.
- MACD Multiplier: 5
- Use Smoothed Source (Short MACD): ON (for a cleaner short MACD signal)
Happy trading! 💹
EMA Price Range by tuanduongEMA Price Range Indicator – Dynamic Range Analysis with Custom EMA (tuanduong2511)
Overview
The EMA Price Range Indicator is designed to help traders visualize the distance between price action and a key Exponential Moving Average (EMA). This indicator dynamically calculates the range from each candle to a user-defined EMA and displays it in a real-time table. By understanding the relationship between price and the EMA, traders can better gauge potential support, resistance, and overextension in the market.
Key Features
✅ Customizable EMA – Allows users to choose the EMA period that best suits their strategy (default: 144).
✅ Real-Time Range Calculation – Computes the absolute difference between the EMA and the price (using the high or low, depending on whether the candle is above or below the EMA).
✅ Minimalist UI – The EMA is plotted directly on the chart, while a small table in the bottom-right corner provides numerical insights, reducing chart clutter.
✅ Versatile Use Cases – Suitable for trend-following traders (identifying pullbacks to EMA) and mean-reversion traders (spotting extended price movements).
How It Works
User-Defined EMA:
The script calculates an Exponential Moving Average (EMA) based on the selected period.
EMA adapts dynamically, giving more weight to recent price movements.
Range Calculation:
If the price is above the EMA, the range is measured from the high point of the candle to the EMA.
If the price is below the EMA, the range is measured from the low point of the candle to the EMA.
This approach ensures that we’re measuring the most relevant distance for price interaction.
Live Table Display:
The current EMA value and the distance (range) from the price are displayed in a small table in the bottom-right corner of the chart.
How to Use It
📌 Trend Traders: Use the indicator to track pullbacks to key EMAs (e.g., EMA 50, 144, or 200). When the price is far from the EMA, it may indicate an overextended trend or potential retracement zone.
📌 Mean Reversion Traders: Look for extreme deviations between price and the EMA. Large distances can signal potential price snapbacks to the mean.
📌 Scalping & Day Trading: Short-term traders can use it with fast EMAs (e.g., EMA 21 or 34) to measure quick price movements relative to short-term momentum.
Why This Indicator?
Unlike traditional EMA indicators, which only plot a moving average, this script provides quantifiable price distance to the EMA, helping traders make data-driven decisions. It allows traders to answer:
✅ Is the price stretched too far from the EMA?
✅ Should I wait for a pullback before entering?
✅ Is the trend strong, or is the price losing momentum?
By integrating EMA-based range analysis, traders gain a clearer understanding of market conditions and can improve their entry, exit, and risk management strategies.
Média de Volume - VXX & UVXY (Colorido)Explanation:
The code takes the daily volume of VXX and UVXY.
Calculates the average of the two volumes.
Plots a blue histogram, similar to the traditional volume indicator.
Adds a reference line at zero.
The histogram bars turn green when the price is above the 20 SMA and red when it is below.
Ryna 3 EMA Multi-Timeframe Indicator**EMA Multi-Timeframe Strategy (Pine Script v6)**
This TradingView indicator is designed to assist traders using a **multi-timeframe trend-following strategy** based on Exponential Moving Averages (EMAs).
**Core Functionality**
- **Trend Identification:**
Uses a configurable **EMA (e.g., EMA 50)** on a **higher timeframe** (e.g., H1, D1, W1) to determine the market bias:
- If price is **above** the trend EMA → **Long bias**
- If price is **below** the trend EMA → **Short bias**
- **Entry Signals:**
Uses two EMAs (fast & slow, e.g., EMA 8 & EMA 21) on either:
- The **current chart timeframe**, or
- A **separately selected timeframe** (e.g., entry on M15, trend on H1)
→ Signals are generated based on **EMA crossovers**:
- **Bullish crossover** (fast crosses above slow) → Long signal
- **Bearish crossover** (fast crosses below slow) → Short signal
- Only when aligned with the higher-timeframe trend
- **Visual Output:**
- Optional display of entry EMAs when sourced from the trend timeframe
- Always displays the trend EMA
- Entry signals shown with triangle markers on the chart
- **Info Panel (Top Center):**
- Shows selected timeframes and EMA settings
- Indicates current trend bias (LONG / SHORT / NEUTRAL)
- Notes if entry EMAs are hidden due to settings
- **Alerts:**
- Optional alerts for long and short entry signals based on EMA crossovers
#### **User Inputs**
- **Trend Timeframe & EMA Length**
- **Entry Timeframe & EMA Fast/Slow Lengths**
- **Option to show/hide entry EMAs when using the trend timeframe**
- **Option to show/hide Infobox on Chart**
EMA CloudIt's provide the area of value between 2 EMA. Additional 1 EMA long term for determine the market status.
Multi-Timeframe MA DashboardThis indicator monitors 5 timeframes: 5min, 15min, 1hr, 4hr, and Daily. It displays fast and slow moving averages for each timeframe, along with the current price. The trend direction is color-coded: green for bullish (fast MA above slow MA) and red for bearish (fast MA below slow MA).
The dashboard also shows the last crossover signal (Buy/Sell) for each timeframe.
Visual arrows are plotted on the chart for the current timeframe. A green up arrow indicates a potential bullish crossover (Buy signal), while a red down arrow indicates a potential bearish crossover (Sell signal).
The dashboard is elegant and professional, with alternating row colors for better readability. It can be placed in any corner of the screen and customized with user-defined colors for bullish and bearish trends.
Alerts are triggered when a crossover occurs on any timeframe. These alerts include the timeframe and signal type (e.g., "5min: ↑ BUY").
How to Read the Indicator
The dashboard displays the following for each timeframe:
Fast MA: The value of the fast moving average.
Slow MA: The value of the slow moving average.
Price: The current price for the timeframe.
Trend: The current trend direction (Bullish or Bearish).
Signal: The last crossover signal (↑ BUY or ↓ SELL).
On the chart, green up arrows indicate a bullish crossover (Fast MA crosses above Slow MA), while red down arrows indicate a bearish crossover (Fast MA crosses below Slow MA).
Green text in the dashboard indicates a bullish trend or signal, while red text indicates a bearish trend or signal.
How to Use the Indicator
Use the dashboard to monitor the trend direction across multiple timeframes. Look for confluence (agreement) between timeframes to identify stronger trends. Observe the "Signal" column in the dashboard for the last crossover on each timeframe. Use the arrows on the chart to identify potential crossover points for the current timeframe.
Enable alerts to be notified of crossover signals on any timeframe. Alerts include the timeframe and signal type for easy reference.
Adjust the fast and slow moving average lengths to suit your trading style. Choose between EMA, SMA, or WMA for the moving average type. Customize the dashboard placement and colors for better visibility.
Important Notes
This indicator is not a buy or sell recommendation. It is a tool to assist traders in their analysis. Always use this indicator in conjunction with other tools, such as support/resistance levels, volume analysis, and price action. Past performance of moving averages does not guarantee future results.
How to Add the Indicator
Add the indicator to your chart from the TradingView library. Configure the inputs:
Fast MA Length: Default is 20.
Slow MA Length: Default is 50.
MA Type: Choose between EMA, SMA, or WMA.
Dashboard Placement: Select the corner of the screen where the dashboard will appear.
Colors: Customize the colors for bullish and bearish trends.
Monitor the dashboard and chart for trends and signals.
Disclaimer
This indicator is for educational and informational purposes only. It does not provide financial, investment, or trading advice. Always perform your own analysis and consult with a financial advisor before making trading decisions.
Uptrick: Z-Score FlowOverview
Uptrick: Z-Score Flow is a technical indicator that integrates trend-sensitive momentum analysi s with mean-reversion logic derived from Z-Score calculations. Its primary objective is to identify market conditions where price has either stretched too far from its mean (overbought or oversold) or sits at a statistically “normal” range, and then cross-reference this observation with trend direction and RSI-based momentum signals. The result is a more contextual approach to trade entry and exit, emphasizing precision, clarity, and adaptability across varying market regimes.
Introduction
Financial instruments frequently transition between trending modes, where price extends strongly in one direction, and ranging modes, where price oscillates around a central value. A simple statistical measure like Z-Score can highlight price extremes by comparing the current price against its historical mean and standard deviation. However, such extremes alone can be misleading if the broader market structure is trending forcefully. Uptrick: Z-Score Flow aims to solve this gap by combining Z-Score with an exponential moving average (EMA) trend filter and a smoothed RSI momentum check, thus filtering out signals that contradict the prevailing market environment.
Purpose
The purpose of this script is to help traders pinpoint both mean-reversion opportunities and trend-based pullbacks in a way that is statistically grounded yet still mindful of overarching price action. By pairing Z-Score thresholds with supportive conditions, the script reduces the likelihood of acting on random price spikes or dips and instead focuses on movements that are significant within both historical and current contextual frameworks.
Originality and Uniquness
Layered Signal Verification: Signals require the fulfillment of multiple layers (Z-Score extreme, EMA trend bias, and RSI momentum posture) rather than merely breaching a statistical threshold.
RSI Zone Lockout: Once RSI enters an overbought/oversold zone and triggers a signal, the script locks out subsequent signals until RSI recovers above or below those zones, limiting back-to-back triggers.
Controlled Cooldown: A dedicated cooldown mechanic ensures that the script waits a specified number of bars before issuing a new signal in the opposite direction.
Gradient-Based Visualization: Distinct gradient fills between price and the Z-Mean line enhance readability, showing at a glance whether price is trading above or below its statistical average.
Comprehensive Metrics Panel: An optional on-chart table summarizes the Z-Score’s key metrics, streamlining the process of verifying current statistical extremes, mean levels, and momentum directions.
Why these indicators were merged
Z-Score measurements excel at identifying when price deviates from its mean, but they do not intrinsically reveal whether the market’s trajectory supports a reversion or if price might continue along its trend. The EMA, commonly used for spotting trend directions, offers valuable insight into whether price is predominantly ascending or descending. However, relying solely on a trend filter overlooks the intensity of price moves. RSI then adds a dedicated measure of momentum, helping confirm if the market’s energy aligns with a potential reversal (for example, price is statistically low but RSI suggests looming upward momentum). By uniting these three lenses—Z-Score for statistical context, EMA for trend direction, and RSI for momentum force—the script offers a more comprehensive and adaptable system, aiming to avoid false positives caused by focusing on just one aspect of price behavior.
Calculations
The core calculation begins with a simple moving average (SMA) of price over zLen bars, referred to as the basis. Next, the script computes the standard deviation of price over the same window. Dividing the difference between the current price and the basis by this standard deviation produces the Z-Score, indicating how many standard deviations the price is from its mean. A positive Z-Score reveals price is above its average; a negative reading indicates the opposite.
To detect overall market direction, the script calculates an exponential moving average (emaTrend) over emaTrendLen bars. If price is above this EMA, the script deems the market bullish; if below, it’s considered bearish. For momentum confirmation, the script computes a standard RSI over rsiLen bars, then applies a smoothing EMA over rsiEmaLen bars. This smoothed RSI (rsiEma) is monitored for both its absolute level (oversold or overbought) and its slope (the difference between the current and previous value). Finally, slopeIndex determines how many bars back the script compares the basis to check whether the Z-Mean line is generally rising, falling, or flat, which then informs the coloring scheme on the chart.
Calculations and Rational
Simple Moving Average for Baseline: An SMA is used for the core mean because it places equal weight on each bar in the lookback period. This helps maintain a straightforward interpretation of overbought or oversold conditions in the context of a uniform historical average.
Standard Deviation for Volatility: Standard deviation measures the variability of the data around the mean. By dividing price’s difference from the mean by this value, the Z-Score can highlight whether price is unusually stretched given typical volatility.
Exponential Moving Average for Trend: Unlike an SMA, an EMA places more emphasis on recent data, reacting quicker to new price developments. This quicker response helps the script promptly identify trend shifts, which can be crucial for filtering out signals that go against a strong directional move.
RSI for Momentum Confirmation: RSI is an oscillator that gauges price movement strength by comparing average gains to average losses over a set period. By further smoothing this RSI with another EMA, short-lived oscillations become less influential, making signals more robust.
SlopeIndex for Slope-Based Coloring: To clarify whether the market’s central tendency is rising or falling, the script compares the basis now to its level slopeIndex bars ago. A higher current reading indicates an upward slope; a lower reading, a downward slope; and similar readings, a flat slope. This is visually represented on the chart, providing an immediate sense of the directionality.
Inputs
zLen (Z-Score Period)
Specifies how many bars to include for computing the SMA and standard deviation that form the basis of the Z-Score calculation. Larger values produce smoother but slower signals; smaller values catch quick changes but may generate noise.
emaTrendLen (EMA Trend Filter)
Sets the length of the EMA used to detect the market’s primary direction. This is pivotal for distinguishing whether signals should be considered (price aligning with an uptrend or downtrend) or filtered out.
rsiLen (RSI Length)
Defines the window for the initial RSI calculation. This RSI, when combined with the subsequent smoothing EMA, forms the foundation for momentum-based signal confirmations.
rsiEmaLen (EMA of RSI Period)
Applies an exponential moving average over the RSI readings for additional smoothing. This step helps mitigate rapid RSI fluctuations that might otherwise produce whipsaw signals.
zBuyLevel (Z-Score Buy Threshold)
Determines how negative the Z-Score must be for the script to consider a potential oversold signal. If the Z-Score dives below this threshold (and other criteria are met), a buy signal is generated.
zSellLevel (Z-Score Sell Threshold)
Determines how positive the Z-Score must be for a potential overbought signal. If the Z-Score surpasses this threshold (and other checks are satisfied), a sell signal is generated.
cooldownBars (Cooldown (Bars))
Enforces a bar-based delay between opposite signals. Once a buy signal has fired, the script must wait the specified number of bars before registering a new sell signal, and vice versa.
slopeIndex (Slope Sensitivity (Bars))
Specifies how many bars back the script compares the current basis for slope coloration. A bigger slopeIndex highlights larger directional trends, while a smaller number emphasizes shorter-term shifts.
showMeanLine (Show Z-Score Mean Line)
Enables or disables the plotting of the Z-Mean and its slope-based coloring. Traders who prefer minimal chart clutter may turn this off while still retaining signals.
Features
Statistical Core (Z-Score Detection):
This feature computes the Z-Score by taking the difference between the current price and the basis (SMA) and dividing by the standard deviation. In effect, it translates price fluctuations into a standardized measure that reveals how significant a move is relative to the typical variation seen over the lookback. When the Z-Score crosses predefined thresholds (zBuyLevel for oversold and zSellLevel for overbought), it signals that price could be at an extreme.
How It Works: On each bar, the script updates the SMA and standard deviation. The Z-Score is then refreshed accordingly. Traders can interpret particularly large negative or positive Z-Score values as scenarios where price is abnormally low or high.
EMA Trend Filter:
An EMA over emaTrendLen bars is used to classify the market as bullish if the price is above it and bearish if the price is below it. This classification is applied to the Z-Score signals, accepting them only when they align with the broader price direction.
How It Works: If the script detects a Z-Score below zBuyLevel, it further checks if price is actually in a downtrend (below EMA) before issuing a buy signal. This might seem counterintuitive, but a “downtrend” environment plus an oversold reading often signals a potential bounce or a mean-reversion play. Conversely, for sell signals, the script checks if the market is in an uptrend first. If it is, an overbought reading aligns with potential profit-taking.
RSI Momentum Confirmation with Oversold/Overbought Lockout:
RSI is calculated over rsiLen, then smoothed by an EMA over rsiEmaLen. If this smoothed RSI dips below a certain threshold (for example, 30) and then begins to slope upward, the indicator treats it as a potential sign of recovering momentum. Similarly, if RSI climbs above a certain threshold (for instance, 70) and starts to slope downward, that suggests dwindling momentum. Additionally, once RSI is in these zones, the indicator locks out repetitive signals until RSI fully exits and re-enters those extreme territories.
How It Works: Each bar, the script measures whether RSI has dropped below the oversold threshold (like 30) and has a positive slope. If it does, the buy side is considered “unlocked.” For sell signals, RSI must exceed an overbought threshold (70) and slope downward. The combination of threshold and slope helps confirm that a reversal is genuinely in progress instead of issuing signals while momentum remains weak or stuck in extremes.
Cooldown Mechanism:
The script features a custom bar-based cooldown that prevents issuing new signals in the opposite direction immediately after one is triggered. This helps avoid whipsaw situations where the market quickly flips from oversold to overbought or vice versa.
How It Works: When a buy signal fires, the indicator notes the bar index. If the Z-Score and RSI conditions later suggest a sell, the script compares the current bar index to the last buy signal’s bar index. If the difference is within cooldownBars, the signal is disallowed. This ensures a predefined “quiet period” before switching signals.
Slope-Based Coloring (Z-Mean Line and Shadow):
The script compares the current basis value to its value slopeIndex bars ago. A higher reading now indicates a generally upward slope, while a lower reading indicates a downward slope. The script then shades the Z-Mean line in a corresponding bullish or bearish color, or remains neutral if little change is detected.
How It Works: This slope calculation is refreshingly straightforward: basis – basis . If the result is positive, the line is colored bullish; if negative, it is colored bearish; if approximately zero, it remains neutral. This provides a quick visual cue of the medium-term directional bias.
Gradient Overlays:
With gradient fills, the script highlights where price stands in relation to the Z-Mean. When price is above the basis, a purple-shaded region is painted, visually indicating a “bearish zone” for potential overbought conditions. When price is below, a teal-like overlay is used, suggesting a “bullish zone” for potential oversold conditions.
How It Works: Each bar, the script checks if price is above or below the basis. It then applies a fill between close and basis, using distinct colors to show whether the market is trading above or below its mean. This creates an immediate sense of how extended the market might be.
Buy and Sell Labels (with Alerts):
When a legitimate buy or sell condition passes every check (Z-Score threshold, EMA trend alignment, RSI gating, and cooldown clearance), the script plots a corresponding label directly on the chart. It also fires an alert (if alerts are set up), making it convenient for traders who want timely notifications.
How It Works: If rawBuy or rawSell conditions are met (refined by RSI, EMA trend, and cooldown constraints), the script calls the respective plot function to paint an arrow label on the chart. Alerts are triggered simultaneously, carrying easily recognizable messages.
Metrics Table:
The optional on-chart table (activated by showMetrics) presents real-time Z-Score data, including the current Z-Score, its rolling mean, the maximum and minimum Z-Score values observed over the last zLen bars, a percentile position, and a short-term directional note (rising, falling, or flat).
Current – The present Z-Score reading
Mean – Average Z-Score over the zLen period
Min/Max – Lowest and highest Z-Score values within zLen
Position – Where the current Z-Score sits between the min and max (as a percentile)
Trend – Whether the Z-Score is increasing, decreasing, or flat
Conclusion
Uptrick: Z-Score Flow offers a versatile solution for traders who need a statistically informed perspective on price extremes combined with practical checks for overall trend and momentum. By leveraging a well-defined combination of Z-Score, EMA trend classification, RSI-based momentum gating, slope-based visualization, and a cooldown mechanic, the script reduces the occurrence of false or premature signals. Its gradient fills and optional metrics table contribute further clarity, ensuring that users can quickly assess market posture and make more confident trading decisions in real time.
Disclaimer
This script is intended solely for informational and educational purposes. Trading in any financial market comes with substantial risk, and there is no guarantee of success or the avoidance of loss. Historical performance does not ensure future results. Always conduct thorough research and consider professional guidance prior to making any investment or trading decisions.
Advanced HFT Detection with VWAP & SpreadsExplanation of the HFT Detection Strategy
🔹 1. Key Indicators Used in the Strategy
It's works by combining VWAP, moving averages (SMA), volume spikes, and price jumps to detect potential HFT activity.
✅ (A) VWAP (Volume Weighted Average Price)
VWAP acts as a benchmark price that professional traders and institutions use to execute large orders.
If price is above VWAP, buyers are in control → Bullish trend
If price is below VWAP, sellers are in control → Bearish trend
HFT algorithms often place buy orders above VWAP and sell orders below VWAP to follow momentum.
➡️ Why VWAP? It ensures that signals follow the institutional trading trend.
✅ (B) Moving Averages (SMA)
Moving averages smooth out price data and help in detecting short-term momentum changes.
Fast Moving Average (5-period SMA): Reacts quickly to price changes
Slow Moving Average (20-period SMA): Identifies trend direction
➡️ Why SMA? It filters noise and confirms short-term trend shifts.
✅ (C) Volume Spike Detection
High-frequency trading is often accompanied by large volume surges. We define a volume spike as:
📌 Current Volume > 2× Average Volume of last 20 bars
➡️ Why Volume? HFTs execute rapid buy/sell orders when they detect liquidity, leading to sudden volume bursts.
✅ (D) Price Jump Detection (Sudden Volatility)
HFT algorithms often exploit quick price movements. We check if the price has moved more than twice the ATR (Average True Range) in the last 5 bars.
➡️ Why ATR? It helps to detect abnormal price movements compared to normal volatility.
🔹 2. Trading Signal Logic
Now that we have VWAP, moving averages, volume, and price movement filters, we generate buy and sell signals based on conditions.
✅ (A) Buy Signal Condition
A BUY signal is triggered when:
✔ Fast SMA crosses above Slow SMA → Short-term trend is turning bullish
✔ Volume spike occurs → HFTs are active
✔ Sudden price jump detected → High volatility
✔ Price is above VWAP → Confirms bullish trend
➡️ Why this works? It confirms that institutional traders & HFTs are buying aggressively.
✅ (B) Sell Signal Condition
A SELL signal is triggered when:
✔ Fast SMA crosses below Slow SMA → Short-term trend is turning bearish
✔ Volume spike occurs → HFTs are selling aggressively
✔ Sudden price drop detected → High volatility
✔ Price is below VWAP → Confirms bearish trend
➡️ Why this works? It confirms that institutional traders & HFTs are selling aggressively.
🔹 3. Visual Representation (Plotting Signals & VWAP)
Once we detect buy and sell signals, we mark them on the chart.
✅ (A) Buy/Sell Markers
🟢 Buy → Green upward arrow below the candle
🔴 Sell → Red downward arrow above the candle
✅ (B) VWAP Line on Chart
We also plot VWAP as a blue line to visualize trend direction.
✅ (C) Highlighting Volume Spikes
To easily spot HFT activity, we highlight volume spike bars with a blue background.
🔹 4. How to Use This Strategy?
1️⃣ Apply this script on a 1-minute or 5-minute intraday chart.
2️⃣ Look for BUY signals above VWAP and SELL signals below VWAP.
3️⃣ Verify that the volume spikes before taking action.
4️⃣ Use stop-loss & risk management (e.g., stop-loss at recent low/high).
🚀 Summary: Why This Strategy Works?
✅ VWAP ensures we follow institutional traders
✅ Volume spikes confirm sudden liquidity inflows
✅ Price jumps detect fast market moves caused by HFT bots
✅ Moving averages smooth out short-term trend shifts
Multiple VWMATradingView Indicator: Multiple VWMA
This TradingView indicator allows you to display up to five separate Volume Weighted Moving Averages (VWMAs) directly on your price chart.
What it does:
Plots 5 VWMAs: It calculates and draws five distinct VWMA lines (or other styles) on the chart.
Volume Weighting: Unlike simple moving averages, a VWMA gives more weight to prices where trading volume was higher, potentially offering a clearer picture of the trend strength confirmed by volume.
Highly Customizable: Each of the five VWMAs can be configured independently through the indicator's settings panel. For each one, you can set:
Length: The lookback period (number of bars) used for the calculation.
Source: The price data to use (e.g., close, open, high, low, hl2, etc.).
Timeframe: You can calculate each VWMA based on a different timeframe than the one currently displayed on your chart (e.g., view daily VWMAs on an hourly chart). Leave blank to use the chart's timeframe.
Offset: Shift the VWMA line forwards or backwards on the chart by a specific number of bars.
Style: Choose how each VWMA is displayed (Line, Histogram, or Cross).
Overlay: The VWMAs are plotted directly over the price bars for easy comparison.
Purpose:
This indicator is useful for traders who want to analyze trends using multiple volume-weighted perspectives simultaneously. By comparing VWMAs of different lengths or based on different timeframes, you can gain insights into short-term vs. long-term trends, potential support/resistance levels, and the significance of price movements based on accompanying volume.