Indikatoren und Strategien
Three Simple Moving AveragesThis script provides three common Simple Moving Averages (SMAs) in a single indicator.
11 Trend-Based Buy/Sell Signals + Momentum)Pine Script Breakdown: 11 Trend-Based Buy/Sell Signals + Momentum
This Pine Script provides a comprehensive set of buy and sell signals based on various technical indicators and pattern recognition methods. The script uses 11 different possible conditions + momentum to determine when to trigger buy or sell signals, and the signals are visualized using custom shapes and momentum indicators. Below is a detailed breakdown of each section:
1. Exponential Moving Averages (EMA)
EMAs with periods of 8, 21, and 55 are calculated:
ema8: Short-term trend indicator (red).
ema21: Medium-term trend indicator (yellow).
ema55: Long-term trend indicator (blue).
These EMAs are used for trend direction and are plotted but not displayed on the chart by default. They can be turned on by the user.
2. MACD for Trend Confirmation
The MACD is calculated with standard parameters (12, 26, 9).
macd_bullish: True when MACD line is above the signal line.
macd_bearish: True when MACD line is below the signal line.
The MACD is used as an additional trend confirmation tool.
3. VWAP Calculation & Confirmation
The VWAP (Volume-Weighted Average Price) is calculated to help identify the general market trend.
above_vwap: True when the price is above the VWAP.
below_vwap: True when the price is below the VWAP.
This condition is used to filter trends for possible buy/sell opportunities.
VWAP is not displayed on the chart by default. It can be turned on by the user.
4. EMA Stacking & Reversal
EMA Stacking:
Bullish Stack: ema8 > ema21 > ema55 — Indicating an uptrend.
Bearish Stack: ema8 < ema21 < ema55 — Indicating a downtrend.
Reversals:
Bullish Reversal: Occurs when the EMA stack changes from bearish to bullish.
Bearish Reversal: Occurs when the EMA stack changes from bullish to bearish.
5. Pattern Recognition: Bull and Bear Flags
Bull Flag:
A higher high, higher low, and bullish candle form a trend continuation pattern. The breakout is confirmed if the price moves above a pullback and EMA8.
Bear Flag:
A lower high, lower low, and bearish candle form a continuation pattern for a downtrend. The breakdown is confirmed if the price moves below a pullback and EMA8.
6. Pattern Recognition: Triangle Patterns
Ascending Triangle:
Flat resistance and higher lows create a pattern suggesting upward price movement. A breakout above resistance is confirmed.
Descending Triangle:
Flat support and lower highs form a bearish pattern. A breakdown below support is confirmed.
7. Adjusted Volume Sensitivity
Relative Volume (rvol) is calculated by comparing current volume to the 50-period average volume.
High relative volume (high_rvol > 1.5) indicates increased market activity, which is important for momentum signals.
8. Overbought/Oversold Momentum Detection
The script calculates a momentum oscillator based on the smoothed relative price movements.
momentum_up: When momentum is increasing along with high volume.
momentum_down: When momentum is decreasing with high volume.
These conditions help detect shifts in market momentum.
9. Bollinger & Keltner Bands Calculation
Bollinger Bands and Keltner Bands are calculated to assess market volatility.
Squeeze Condition: When the Bollinger and Keltner Bands narrow, indicating a potential breakout.
Breakouts are confirmed when the price moves outside the bands.
10. Adjusted 3 Consecutive Candles Condition
The script checks for 3 consecutive candles with significant price movement (based on ATR), which can indicate strong momentum.
three_bullish_candles: Three consecutive bullish candles.
three_bearish_candles: Three consecutive bearish candles.
11. RSI Calculation
RSI (Relative Strength Index) is calculated with a 14-period lookback.
Buy signal: RSI crosses above 30 (oversold).
Sell signal: RSI crosses below 70 (overbought).
12. PPO (Percentage Price Oscillator) Condition
The PPO is calculated with 12, 26, and 9 periods. The PPO value is used to detect price momentum:
PPO Buy Signal: When the PPO crosses above its signal line.
PPO Sell Signal: When the PPO crosses below its signal line.
13. User Input for Conditions to Trigger Buy/Sell
User Input: The user can specify a minimum number of conditions (between 1 and 11) that must be met for a buy or sell signal to trigger. The script then checks if the number of conditions that meet the criteria equals or exceeds this threshold to activate the signal.
14. Buy/Sell Signal Adjustments with Patterns
Buy Signal Conditions: A combination of various conditions like bullish reversal, MACD bullish, price above VWAP, bull flags, ascending triangles, squeezebreakouts, momentum up, etc. The total number of conditions is counted.
Sell Signal Conditions: A combination of bearish reversal, MACD bearish, price below VWAP, bear flags, descending triangles, squeezebreakouts, momentum down, etc. The total number of conditions is similarly counted.
A buy signal is triggered when the number of conditions meets or exceeds the user-specified minimum. Similarly, a sell signal is triggered if the conditions for selling are met.
15. Plot Buy, Sell, and Momentum Signals
Buy and Sell Signals: Plotted below the candles as green (buy) and red (sell) triangle shapes, depending on the conditions.
Momentum Signals: Green and red circles are plotted below the candles to indicate momentum up (green) or down (red), based on high volume and the calculated momentum conditions.
16. Display Buy/Sell Signal Conditions
Signal Conditions: Each signal condition (from 1 to 11) is plotted as a number or symbol below the candles.
The number 1 through 9 is used.
A small star (✦) is used when 10 conditions are met.
A large star (✦) is used when all 11 conditions are met.
This gives a visual representation of how many conditions were met to trigger the buy or sell signal.
17. Display Buy and Sell Conditions as Labels
Buy and sell signals can also display a label showing the number of conditions that were met to trigger the signal, which can be helpful for understanding the strength of the signal.
18. Alerts for Automated Trading
Alerts are set up for trading and notifications:
Buy Alert: When the buy signal is triggered.
Sell Alert: When the sell signal is triggered.
Momentum Alert (Up/Down): When there is a momentum shift up or down, combined with high volume.
This script combines various indicators and pattern recognition methods to generate robust buy and sell signals, with options for user customization and alerts for trading.
Option Stop-Limit Calculator1. Indicator Overview
Purpose: Automates stop-loss calculations for call/put options by linking the underlying stock’s stop price to the option’s limit price using delta and a buffer percentage.
Key Features:
Plots a horizontal line for the stock’s stop price.
Displays real-time option limit prices in a table.
Supports alerts for stop triggers.
Complete Users Training Manual is embedded into the code of the indicator.
You may not use any portion of this code for monetization purposes.
The intent is to serve everyone in the community and hopefully make us all prosper.
Good Luck
UM Futures Dashboard with Moving Average DirectionUM Futures Dashboard with Moving Average Direction
Description :
This futures dashboard gives you quick glance of all “major” futures prices and percentage changes. The text color and trends are based on your configured moving average type and length. The dashboard will display LONG in green text when the configure MA is trending higher and SHORT in red when the configured MA is trending lower. The dashboard also includes the VIX futures roll yield and VIX futures status of Contango or Backwardation.
I have included the indicator twice on the sample chart to illustrate different table settings. I also included an 8 period WMA overlay on the price chart since this is the default of the dashboard. (The Moving Average color change is another one of my indicators titled “UM EMA SMA WMA HMA with Directional Color Change”)
Defaults and Configuration :
The default MA type is the Weighted Moving Average, (WMA) with a daily setting of 8. Choices include WMA, SMA, and EMA. The table location defaults to the upper right corner in landscape mode. It can also be set to “flip” to portrait mode. I have added the table to the chart twice to illustrate the table orientations.
Table location, orientation, timeframe, moving average type and length are user-configurable. The configured dashboard timeframe is independent of the chart timeframe. Percentage changes and Moving Averages are based on the configured dashboard timeframe.
Alerts :
Alerts can be configured on the directional change of the dashboard moving average. For example, if the daily 8 period weighted moving average begins trending higher it will turn from red to green. This color change would fire a LONG alert. A color trend change of the weighted moving average from green to red would fire a SHORT alert. Alerts are disabled by default but can be set for any or all of the futures contracts included.
Suggested Uses :
If you follow or trade futures, add this dashboard indicator to your chart layout. Configure your favorite moving average. Use this to quickly see where all the major futures are trading. This saved me from thumbing through the CNBC app on my phone.
One thing I do is to “stretch” moving average to a smaller timeframe. For example, if you like the 8 period WMA on the daily, try the 192 WMA on the hourly. ( The daily 8 period WMA is roughly a 192 WMA on an hourly chart) This can smooth out some of the violent price action and give better entries/exits.
Setup a FUTURES indicator template. I do this with the dashboard and couple other of my favorite indicators.
Suggested Settings :
Daily charts: 8 WMA
Exchange PrefixAllows users to show the exchange name of your currently-viewed ticker on the latest bars.
For example, viewing BTCUSDT on BINANCE would provide "BINANCE".
Similarly, viewing BTCUSDT on CRYPTO.COM would provide "CRYPTOCOM".
What is the purpose of this?
- Sometimes pine script coders would like to know the exact names of the exchanges. This script does the job.
Next Bar CountdownLittle script to show a countdown for the next candle (or the close of the actual candle) on the bottom right corner of the chart.
There is a countdown integrated in the scale, but it always changes the vertical position and sometimes it is hard to find between labels and often is cover by the mouse cursor etc. ...
I want a fixed position for that to reduce "mental overhead".
It is driven by ticks, if there are no ticks the counter will not update. This a limitation in the tv pine script. (at least this is what claude.ai says ;-) )
M2 Global Liquidity Index - X Days LeadThis custom indicator overlays the Bitcoin price chart with the Global Liquidity M2 chart, providing a unique perspective on how monetary supply might influence Bitcoin's price movements. The indicator distinguishes between past and future segments of the liquidity data using two distinct colors.
- Past Segment: The portion of the Global Liquidity M2 chart that has already passed is displayed in one color, allowing users to assess historical correlations with Bitcoin's price.
- Future Segment: The upcoming part of the liquidity chart is shown in a different color, offering insights into potential future impacts on Bitcoin's price trajectory.
by walkin
Engulfing 3x PatternDescription:
The "Engulfing 3x Pattern" indicator identifies bullish and bearish engulfing candlestick patterns where the engulfing candle's body is at least three times larger than the body of the previous candle. This highlights significant momentum shifts in the market, focusing solely on body size (open to close), ignoring wicks.
Bullish Engulfing: A bearish candle (close below open) is followed by a larger bullish candle (close above open) that fully engulfs the prior candle’s body and has a body at least 3x larger. Marked with a green triangle below the bar.
Bearish Engulfing: A bullish candle (close above open) is followed by a larger bearish candle (close below open) that engulfs the prior candle’s body and has a body at least 3x larger. Marked with a red triangle above the bar.
How It Works:
This indicator scans for engulfing patterns and applies a size filter to ensure the engulfing candle demonstrates strong conviction. It’s useful for traders looking for potential reversals or continuation signals backed by significant price movement. The 3x multiplier can be adjusted in the code (e.g., to 2x or 5x) for customization.
Usage Tips:
Best used with confirmation from support/resistance levels, trends, or other indicators.
More reliable on higher timeframes (e.g., daily, 4-hour).
Signals are purely price-based; consider volume or momentum indicators for additional context.
Supply & Demand Zones + Order Block (Pro Fusion) SuroLevel up your trading edge with this all-in-one Supply and Demand Zones + Order Block TradingView indicator, built for precision traders who focus on price action and smart money concepts.
🔍 Key Features:
Automatic detection of Supply & Demand Zones based on refined swing highs and lows
Dynamic Order Block recognition with customizable thresholds
Highlights Breakout signals with volume confirmation and trend filters
Built-in EMA 50 trend detection
Take Profit (TP1, TP2, TP3) projection levels
Clean visual labels for Demand, Supply, and OB zones
Uses smart box plotting with long extended zones for better zone visibility
🔥 Ideal for:
Traders who follow Smart Money Concepts (SMC)
Supply & Demand strategy practitioners
Breakout & Retest pattern traders
Scalpers, swing, and intraday traders using Order Flow logic
📈 Works on all markets: Forex, Crypto, Stocks, Indices
📊 Recommended timeframes: M15, H1, H4, Daily
✅ Enhance your trading strategy using this powerful zone-based script — bringing structure, clarity, and automation to your chart.
#SupplyAndDemand #OrderBlock #TradingViewScript #SmartMoney #BreakoutStrategy #TPProjection #ForexIndicator #SMC
DIR Pro (ʘ‿ʘ)ノMomentum System
Detection: Uses ta.barssince() to count consecutive closes above/below EMA25
Threshold: Requires ≥7 consecutive bars (momentum_length)
Output: Directional integer (-1/0/1) + duration count
Intensity Metric
pinescript
Copy
intensity = sum(last 3 bars' distance > historical reference) × 0.5
Comparison Window: Current vs momentum start period (3-bar rolling window)
Scaling: 0.5 points per confirmation (max 1.5)
Score Weighting
Copy
Total = (Base × 70%) + (Momentum × 20%) + (Intensity × 10%)
Base (70%): Long-term EMA25 positioning (144-period exponential decay)
Momentum (20%): Trend persistence confirmation
Intensity (10%): Short-term acceleration strength
Key Fixes Applied
NaN Protection: Added ternary checks (peso_total != 0 ?) in all metric calculations
Position Adjustment:
Horizontal: bar_index + 12 (moved 3cm right)
Vertical: high * 1.015 (moved 3cm up from price)
Metric Visibility: Explicit inclusion of AvgD/Body in Section A
Precision Formatting: #.0 format for 1-decimal consistency
Анализ Покупателей и Продавцов Mikhail BarulyaIndicator Description: "Buyer and Seller Analysis"
📌 Purpose of the Indicator
This indicator analyzes the balance of power between buyers and sellers, identifying which side dominates the market. It helps determine whether the market is controlled by bulls or bears and evaluates the potential direction of future price movements.
The indicator displays the strength of buyers and sellers, identifies dominance zones, and predicts trend shifts based on moving averages, volume, volatility, and trend filters.
📊 How the Indicator Works
The indicator analyzes each candle and calculates:
✅ Buyer and Seller Strength
If the candle closes above the open → buyer strength increases
If the candle closes below the open → seller strength increases
The higher the volume, the greater the impact on strength
✅ Adaptive ATR Filter
Filters abnormal price movements, reducing misleading signals about market strength
✅ Trend Filter
If the price is above SMA and VWAP → uptrend
If the price is below SMA and VWAP → downtrend
✅ RSI and CCI Indicators
RSI helps identify overbought/oversold conditions
CCI confirms trend strength
✅ Price Movement Forecast
Uses a weighted average of buyer/seller strength over upcoming candles
If the forecast signals an increase → higher probability of continued uptrend
If the forecast signals a decrease → higher probability of downtrend
📌 How to Use the Indicator
1. Buyer and Seller Strength Analysis
Green Line → Represents buyer strength
Red Line → Represents seller strength
If buyer strength is higher → bulls control the market 🐂
If seller strength is higher → bears control the market 🐻
2. Market Analysis Label
A label appears on the chart displaying:
✅ Current dominance: Buyers / Sellers / Equilibrium
✅ Forecasted market direction
✅ RSI and CCI values
📌 This helps traders understand who is in control and the most probable price movement.
📈 Application in Trading
🔹 Trend Analysis
Buyer and seller strength helps assess trend sustainability
Confirms trends using VWAP and SMA
🔹 Filtering Market Noise
Filters out abnormal movements with adaptive ATR
Avoids misleading signals using RSI and CCI
🔹 Market Balance Assessment
If buyer and seller strength is equal, the market is in a range
If one side dominates, the probability of movement in that direction increases
🔥 Key Takeaways
✅ Shows market power balance
✅ Identifies the dominant side
✅ Forecasts possible price movements
✅ Filters out abnormal volatility
🚀 Use this indicator to analyze market dynamics and identify strong trends!
Trade Ladder Pro: Compounding & Risk ManagerTrade Ladder Pro: Compounding & Risk Manager
Inspired by the popular $20 to $52,000 trading challenge, this tool is designed to help you scale your trading account using systematic compounding and enhanced risk management techniques. Whether you’re aiming for disciplined growth or fine-tuning your risk/reward, Trade Ladder Pro offers a flexible approach to visualizing your trade levels.
How to Use:
Inputs:
Compounding Mode:
Set your starting balance, final balance goal, number of trades, and current trade level. You can move to the next trade after a successful trade in settings. The entries are not signals. They are there to help manage risk.
The script calculates the necessary compounding factor to grow your balance across the defined trades.
Risk Management Mode:
In addition to the above, specify a risk percentage and risk/reward ratio.
Input an entry price (or leave it at 0 to use the current price) to automatically compute the stop loss and take profit levels.
Display Options:
Choose the table’s position on the chart (e.g., Top Right, Top Left, Bottom Right, Bottom Left).
Pick between a vertical or horizontal layout for a display that suits your workflow.
Results:
The table will display the trade level, starting balance, risk amount, entry price, take profit, and (if in Risk Management mode) stop loss along with the projected ending balance.
Community & Feedback:
Your feedback is invaluable! Please share any tips or report any errors you encounter so we can continue to improve this tool. Happy trading!
Supra BINANCE:BTCUSDT.P
Strategy Description:
This advanced trading strategy combines linear regression, volatility bands, and a Kalman filter to generate precise buy and sell signals, while incorporating robust risk management through fixed stop-loss and dynamic trailing stop mechanisms.
Core Features:
Trend Detection: A linear regression line is calculated to assess the market’s trend direction over a customizable period (default: 14 bars).
Mean Reversion: Volatility bands are constructed around an Exponential Moving Average (EMA) using a standard deviation multiplier (default: 2.3) to pinpoint overbought and oversold conditions.
Noise Reduction: A Kalman filter smooths price data with an adjustable gain (default: 21), improving signal reliability.
Risk Management: Features a fixed stop-loss (default: 2%) to cap losses and a trailing stop (default activation: 1%, trailing: 1%) to lock in profits as the price moves favorably.
Signal Logic:
Buy Signal: Triggered when the linear regression line crosses above the lower volatility band, indicating a potential upward reversal from an oversold state.
Sell Signal: Activated when the linear regression line crosses below the upper volatility band, with the closing price below the Kalman filter as confirmation, suggesting a downward reversal from an overbought state.
Position Management:
Closes any opposing position (e.g., a short position on a buy signal) to maintain a single directional stance.
Activates a trailing stop once the price moves favorably by a set percentage, dynamically adjusting to secure gains while allowing room for market fluctuations.
Visual Aids:
EMA Line: Blue line showing the exponential moving average (default period: 50).
Upper Band: Red line marking the upper volatility threshold.
Lower Band: Green line marking the lower volatility threshold.
Kalman Filter: Orange line displaying smoothed price data.
Linear Regression: White line illustrating the trend direction.
Signal Markers: Green upward triangles for buy signals, red downward triangles for sell signals.
Customization:
Tailor the strategy to your preferences by adjusting parameters like regression length, EMA period, band multiplier, Kalman gain, stop-loss percentage, and trailing stop settings to suit various markets and timeframes.
Disclaimer:
This strategy is designed for educational purposes. Thoroughly backtest and validate its performance in your chosen market before applying it to live trading. Use alongside other analysis for best results.
This description is concise yet detailed, making it easy for TradingView users to understand the strategy’s mechanics, purpose, and customization options while emphasizing the importance of testing. Let me know if you'd like any adjustments!
SuperTrader Trend Analysis and Trade Study DashboardSuperTrader Trend Analysis and Trade Study Dashboard
Overview
This script offers a multi-faceted look at market behavior. It combines signals from different momentum indicators, daily cross checks, and a specialized dashboard to reveal trend strength, potential divergences, and how far price has traveled from its recent averages.
Three Musketeers Method
This script uses a special set of three indicators (the “Three Musketeers”) to determine bullish or bearish pressure on the current chart.
Trend Condition – Compares fast vs. slow EMAs (50 and 200) and checks which side of the line price is favoring.
Mean Reversion Condition – Watches RSI crossing typical oversold or overbought thresholds (e.g., crossing above 30 or below 70).
Bollinger Condition – Checks whether price pushes above/below the Bollinger Bands (based on a 20 SMA + standard deviations).
When at least two out of these three conditions align in a bullish way, the script issues a Buy Signal . Conversely, if at least two align in a bearish way, a Sell Signal is triggered. This “Three Musketeers” synergy ensures multiple confirmations before calling a potential market turn.
Mag 8 Daily Performance
The script tracks eight highly influential stocks (AAPL, AMZN, GOOG, NFLX, NVDA, TSLA, META, MSFT) to see which are green (higher) or red (lower) compared to yesterday’s close. It then prints a quick tally – helpful in gauging overall market mood via these major players.
Golden / Death Cross Signals
On a daily time frame, the script notes when the 50-day SMA crosses above or below the 200-day SMA. A “Golden Cross” often signals rising momentum, while a “Death Cross” can hint at oncoming weakness.
RSI & Divergence Checks
RSI helps identify hidden turning points. Whenever a bullish or bearish divergence is spotted, the script updates you via a concise readout.
Hardcoded Settings
EMA lengths for trend checks, Bollinger parameters, etc., are locked in, letting you focus on adjusting only the pivotal study inputs (e.g., RSI length, VIDYA momentum).
VIDYA Trend Line & Fill
Built on an adaptive Variable Index Dynamic Average, it plots a line that quickly reacts to changing momentum. Users can set a “Trend Band Distance” to mark ATR-based thresholds around that line, identifying possible breakouts or breakdowns.
YoYo Distance
This concept measures how far price strays from SMA(10). If it’s too far, the script colors your display to indicate potential snapbacks.
Gap Up/Down Probability
By weighing volume, MACD signals, and whether price sits above/below its midrange, the script estimates probabilities of a gap up or down on the next daily candle.
Table Output & Trend Label
Turning on Show Table Widget reveals a quick dashboard on the chart detailing RSI, CCI, divergences, bull/bear scores, and more. A label on the last bar further summarizes overall trend, gap distance, and the Mag 8 snapshot – perfect for a fast read of current market posture.
Use this script to unify multiple signals in one place, see how far price has ventured from typical patterns, and get daily cross signals plus real-time bullish/bearish calls – all at a glance.
Short Selling DetectionExplanation of Candlestick Patterns:
Bearish Engulfing:
The previous candle is bullish (close > open), and the current candle is bearish (close < open).
The current candle's open is higher than the previous candle's close, and the current candle's close is lower than the previous candle's open.
Shooting Star:
The current candle is bearish (close < open).
The difference between the high and close is more than twice the difference between the open and close, and the close is above the low.
Dark Cloud Cover:
The current candle is bearish (close < open).
The close is below half the previous candle's body (open - (high - low) * 0.5).
The Shooting Star and Dark Cloud Cover patterns were manually defined as well.
You can set alerts based on the "Short Selling Signal" condition, which will notify you of potential short-selling opportunities.
Seçmeli İndikatör Stratejisi
It is a strategy formed with different indicators.
You can determine take profit and stop.
You can use it as a template and create your own strategies.
You can change the values of the indicators from the settings section.
Reversal + Confirm ZonesThis script is written in Pine Script (version 5) for TradingView and creates an indicator called **"Reversal + Confirm Zones"**. It overlays visual zones on a price chart to identify potential reversal points and confirmation signals for trading. The indicator combines **Bollinger Bands** and **RSI** to detect overbought/oversold conditions (reversal zones) and uses **EMA crosses** and **MACD zero-line crosses** to confirm bullish or bearish trends. Below is a detailed explanation:
---
### **1. Purpose**
- The script highlights:
- **Reversal Zones**: Areas where the price might reverse due to being overbought (green) or oversold (red).
- **Confirmation Zones**: Areas where a trend reversal is confirmed using EMA and MACD signals (green for bullish, red for bearish).
- It provides visual backgrounds and alerts to assist traders in spotting potential trade setups.
---
### **2. Components**
The script is divided into two main parts: **Reversal Logic** and **Confirmation Logic**.
---
### **3. Reversal Logic (Red & Green Zones)**
#### **Bollinger Bands**
- **Parameters**:
- Length: 20 periods.
- Source: Closing price (`close`).
- Multiplier: 2.0 (standard deviations).
- **Calculation**:
- `basis`: 20-period Simple Moving Average (SMA).
- `dev`: 2 times the standard deviation of the price over 20 periods.
- `upper`: `basis + dev` (upper band).
- `lower`: `basis - dev` (lower band).
- **Purpose**: Identifies when the price moves outside the normal range (beyond 2 standard deviations).
#### **Relative Strength Index (RSI)**
- **Parameters**:
- Length: 14 periods.
- Low Threshold: 30 (oversold).
- High Threshold: 70 (overbought).
- **Calculation**: `rsiValue = ta.rsi(close, rsiLength)`.
- **Purpose**: Measures momentum to confirm overbought or oversold conditions.
#### **Zone Conditions**
- **Red Zone (Oversold)**:
- Condition: `close < lower` (price below lower Bollinger Band) AND `rsiValue < rsiLowThreshold` (RSI < 30).
- Visual: Light red background (`color.new(color.red, 80)`).
- Alert: "Deep Oversold Signal triggered!".
- **Green Zone (Overbought)**:
- Condition: `close > upper` (price above upper Bollinger Band) AND `rsiValue > rsiHighThreshold` (RSI > 70).
- Visual: Light green background (`color.new(color.green, 80)`).
- Alert: "Deep Overbought Signal triggered!".
#### **Interpretation**
- Red Zone: Suggests the price is oversold and may reverse upward.
- Green Zone: Suggests the price is overbought and may reverse downward.
---
### **4. Confirmation Logic (EMA and MACD Crosses)**
#### **Exponential Moving Averages (EMAs)**
- **Parameters**:
- Short EMA Length: 9 periods (user adjustable).
- Long EMA Length: 21 periods (user adjustable).
- **Calculation**:
- `emaShort = ta.ema(close, emaShortLength)`.
- `emaLong = ta.ema(close, emaLongLength)`.
- **Conditions**:
- **Bullish EMA Cross**: `emaCrossBullish = ta.crossover(emaShort, emaLong)` (9 EMA crosses above 21 EMA).
- **Bearish EMA Cross**: `emaCrossBearish = ta.crossunder(emaShort, emaLong)` (9 EMA crosses below 21 EMA).
#### **MACD**
- **Parameters**:
- Fast Length: 12 periods (user adjustable).
- Slow Length: 26 periods (user adjustable).
- Signal Smoothing: 9 periods (user adjustable).
- **Calculation**:
- ` = ta.macd(close, macdFastLength, macdSlowLength, macdSignalSmoothing)`.
- Only the MACD line and signal line are used; the histogram is ignored (`_`).
- **Conditions**:
- **Bullish MACD Cross**: `macdCrossBullish = ta.crossover(macdLine, 0)` (MACD crosses above zero).
- **Bearish MACD Cross**: `macdCrossBearish = ta.crossunder(macdLine, 0)` (MACD crosses below zero).
#### **Combined Confirmation Conditions**
- **Bullish Confirmation**:
- Condition: `bullishConfirmation = emaCrossBullish and macdCrossBullish`.
- Visual: Very light green background (`color.new(color.green, 90)`).
- Meaning: A bullish trend is confirmed when the 9 EMA crosses above the 21 EMA AND the MACD crosses above zero.
- **Bearish Confirmation**:
- Condition: `bearishConfirmation = emaCrossBearish and macdCrossBearish`.
- Visual: Very light red background (`color.new(color.red, 90)`).
- Meaning: A bearish trend is confirmed when the 9 EMA crosses below the 21 EMA AND the MACD crosses below zero.
---
### **5. Visual Outputs**
- **Reversal Zones**:
- Red background for oversold conditions.
- Green background for overbought conditions.
- **Confirmation Zones**:
- Light green background for bullish confirmation.
- Light red background for bearish confirmation.
- Note: The script does not plot the Bollinger Bands, EMAs, or MACD lines—only the background zones are visualized.
---
### **6. Alerts**
- **Deep Oversold Alert**: Triggers when the red zone condition is met.
- **Deep Overbought Alert**: Triggers when the green zone condition is met.
- No alerts are set for the confirmation zones (EMA/MACD crosses).
---
### **7. How It Works**
1. **Reversal Detection**:
- The script uses Bollinger Bands and RSI to flag extreme price levels (red for oversold, green for overbought).
- These zones suggest potential reversals but are not confirmed yet.
2. **Trend Confirmation**:
- EMA crosses (9/21) and MACD zero-line crosses provide confirmation of a trend direction.
- Bullish confirmation (green) occurs when both indicators align upward.
- Bearish confirmation (red) occurs when both indicators align downward.
3. **Trading Strategy**:
- Look for a red zone (oversold) followed by a bullish confirmation for a potential long entry.
- Look for a green zone (overbought) followed by a bearish confirmation for a potential short entry.
---
### **8. How to Use**
1. Add the script to TradingView.
2. Adjust inputs (EMA lengths, MACD settings) if desired.
3. Monitor the chart:
- Red zones indicate oversold conditions—watch for a potential upward reversal.
- Green zones indicate overbought conditions—watch for a potential downward reversal.
- Light green/red backgrounds confirm the trend direction after a reversal zone.
4. Set up alerts for oversold/overbought conditions to catch reversal signals early.
---
### **9. Key Features**
- **Dual Purpose**: Combines reversal detection (Bollinger Bands + RSI) with trend confirmation (EMA + MACD).
- **Visual Simplicity**: Uses background colors instead of plotting lines, keeping the chart clean.
- **Customizable**: Allows users to tweak EMA and MACD periods.
- **Alerts**: Notifies users of extreme conditions for timely action.
---
### **10. Limitations**
- No plotted indicators (e.g., Bollinger Bands, EMAs, MACD) for visual reference—relies entirely on background shading.
- Confirmation signals (EMA/MACD) may lag behind reversal zones, potentially missing fast reversals.
- No alerts for confirmation zones, limiting real-time notification of trend confirmation.
This script is ideal for traders who want a straightforward way to spot potential reversals and confirm them with trend-following indicators, all overlaid on the price chart.
Moving Average Convergence DivergenceThis script is written in Pine Script (version 6) for TradingView and implements the **Moving Average Convergence Divergence (MACD)** indicator. The MACD is a popular momentum oscillator used to identify trend direction, strength, and potential reversals. This version includes customizable inputs, visual enhancements (like crossover markers), and alerts for key events. Below is a detailed explanation of the script:
---
### **1. Purpose**
- The script calculates and displays the MACD line, signal line, and histogram.
- It highlights key events such as MACD/signal line crossovers and zero-line crosses with shapes and colors.
- It provides alerts for changes in the histogram's direction (rising to falling or vice versa).
---
### **2. User Inputs**
- **Fast Length**: Period for the fast moving average (default: 12).
- **Slow Length**: Period for the slow moving average (default: 26).
- **Source**: Data input for calculation (default: closing price, `close`).
- **Signal Smoothing**: Period for the signal line (default: 9, range: 1–50).
- **Oscillator MA Type**: Type of moving average for MACD calculation (options: SMA or EMA, default: EMA).
- **Signal Line MA Type**: Type of moving average for the signal line (options: SMA or EMA, default: EMA).
---
### **3. MACD Calculation**
The MACD is calculated in three parts:
1. **MACD Line**: Difference between the fast and slow moving averages.
- Fast MA: Either SMA or EMA of the source over `fast_length`.
- Slow MA: Either SMA or EMA of the source over `slow_length`.
- Formula: `macd = fast_ma - slow_ma`.
2. **Signal Line**: A moving average (SMA or EMA) of the MACD line over `signal_length`.
- Formula: `signal = sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length)`.
3. **Histogram**: Difference between the MACD line and the signal line.
- Formula: `hist = macd - signal`.
---
### **4. Key Events Detection**
#### **MACD/Signal Line Crossovers**
- **Bullish Cross**: MACD crosses above the signal line (`ta.crossover(macd, signal)`).
- **Bearish Cross**: MACD crosses below the signal line (`ta.crossunder(macd, signal)`).
#### **Zero Line Crosses**
- **Cross Above Zero**: MACD crosses above 0 (`ta.crossover(macd, 0)`).
- **Cross Below Zero**: MACD crosses below 0 (`ta.crossunder(macd, 0)`).
---
### **5. Colors**
- **MACD Line**: Green (#089981) if MACD > signal (bullish), red (#f23645) if MACD < signal (bearish).
- **Signal Line**: White (`color.white`).
- **Histogram**:
- Positive (MACD > signal): Light green (#B2DFDB) if decreasing, darker green (#26A69A) if increasing.
- Negative (MACD < signal): Light red (#FFCDD2) if increasing in magnitude, darker red (#FF5252) if decreasing in magnitude.
- **Zero Line**: Gray with 50% transparency (`color.new(#787B86, 50)`).
---
### **6. Visual Outputs**
#### **Plotted Lines**
- **MACD Line**: Plotted with dynamic coloring based on its position relative to the signal line.
- **Signal Line**: Plotted in white.
- **Histogram**: Displayed as columns, with colors indicating direction and momentum.
- **Zero Line**: Horizontal line at 0 for reference.
#### **Shapes for Key Events**
- **Bullish Cross Below Zero**: Green circle on the MACD line when MACD crosses above the signal line while still below zero.
- **Bearish Cross Above Zero**: Red circle on the MACD line when MACD crosses below the signal line while still above zero.
- **Cross Above Zero**: Green upward label at the zero line when MACD crosses above 0.
- **Cross Below Zero**: Red downward label at the zero line when MACD crosses below 0.
---
### **7. Alerts**
- **Rising to Falling**: Triggers when the histogram switches from positive (or zero) to negative.
- Condition: `hist >= 0 and hist < 0`.
- Message: "MACD histogram switched from rising to falling".
- **Falling to Rising**: Triggers when the histogram switches from negative (or zero) to positive.
- Condition: `hist <= 0 and hist > 0`.
- Message: "MACD histogram switched from falling to rising".
---
### **8. How It Works**
1. **Trend Direction**:
- MACD above signal line (green) suggests bullish momentum.
- MACD below signal line (red) suggests bearish momentum.
2. **Momentum Strength**:
- Histogram height shows the strength of the momentum (larger bars = stronger momentum).
- Histogram color changes indicate whether momentum is increasing or decreasing.
3. **Reversal Signals**:
- Crossovers between MACD and signal lines often signal potential trend changes.
- Zero-line crosses indicate shifts between bullish (above 0) and bearish (below 0) territory.
---
### **9. How to Use**
1. Add the script to TradingView.
2. Adjust inputs (e.g., fast/slow lengths, MA types) to suit your trading style.
3. Monitor the chart:
- Green MACD and upward histogram bars suggest bullish conditions.
- Red MACD and downward histogram bars suggest bearish conditions.
- Watch for circles (crossovers) and labels (zero-line crosses) for trade signals.
4. Set up alerts to notify you of histogram direction changes.
---
### **10. Key Features**
- **Customization**: Flexible MA types and periods.
- **Visual Clarity**: Dynamic colors and shapes highlight key events.
- **Alerts**: Notifies users of momentum shifts via histogram changes.
- **Intuitive**: Combines all MACD components (line, signal, histogram) in one indicator.
This script is ideal for traders who rely on MACD for momentum analysis and want clear visual cues and alerts for decision-making.
Combined EMA Technical AnalysisThis script is written in Pine Script (version 5) for TradingView and creates a comprehensive technical analysis indicator called "Combined EMA Technical Analysis." It overlays multiple technical indicators on a price chart, including Exponential Moving Averages (EMAs), VWAP, MACD, PSAR, RSI, Bollinger Bands, ADX, and external data from the S&P 500 (SPX) and VIX indices. The script also provides visual cues through colors, shapes, and a customizable table to help traders interpret market conditions.
Here’s a breakdown of the script:
---
### **1. Purpose**
- The script combines several popular technical indicators to analyze price trends, momentum, volatility, and market sentiment.
- It uses color coding (green for bullish, red for bearish, gray/white for neutral) and a table to display key information.
---
### **2. Custom Colors**
- Defines custom RGB colors for bullish (`customGreen`), bearish (`customRed`), and neutral (`neutralGray`) signals to enhance visual clarity.
---
### **3. User Inputs**
- **EMA Colors**: Users can customize the colors of five EMAs (8, 20, 9, 21, 50 periods).
- **MACD Settings**: Adjustable short length (12), long length (26), and signal length (9).
- **RSI Settings**: Adjustable length (14).
- **Bollinger Bands Settings**: Length (20), multiplier (2), and proximity threshold (0.1% of band width).
- **ADX Settings**: Adjustable length (14).
- **Table Settings**: Position (e.g., "Bottom Right") and text size (e.g., "Small").
---
### **4. Indicator Calculations**
#### **Exponential Moving Averages (EMAs)**
- Calculates five EMAs: 8, 20, 9, 21, and 50 periods based on the closing price.
- Used to identify short-term and long-term trends.
#### **Volume Weighted Average Price (VWAP)**
- Resets daily and calculates the average price weighted by volume.
- Color-coded: green if price > VWAP (bullish), red if price < VWAP (bearish), white if neutral.
#### **MACD (Moving Average Convergence Divergence)**
- Uses short (12) and long (26) EMAs to compute the MACD line, with a 9-period signal line.
- Displays "Bullish" (green) if MACD > signal, "Bearish" (red) if MACD < signal.
#### **Parabolic SAR (PSAR)**
- Calculated with acceleration factors (start: 0.02, increment: 0.02, max: 0.2).
- Indicates trend direction: green if price > PSAR (bullish), red if price < PSAR (bearish).
#### **Relative Strength Index (RSI)**
- Measures momentum over 14 periods.
- Highlighted in green if > 70 (overbought), red if < 30 (oversold), white otherwise.
#### **Bollinger Bands (BB)**
- Uses a 20-period SMA with a 2-standard-deviation multiplier.
- Color-coded based on price position:
- Green: Above upper band or close to it.
- Red: Below lower band or close to it.
- Gray: Neutral (within bands).
#### **Average Directional Index (ADX)**
- Manually calculates ADX to measure trend strength:
- Strong trend: ADX > 25.
- Very strong trend: ADX > 50.
- Direction: Bullish if +DI > -DI, bearish if -DI > +DI.
#### **EMA Crosses**
- Detects bullish (crossover) and bearish (crossunder) events for:
- EMA 9 vs. EMA 21.
- EMA 8 vs. EMA 20.
- Visualized with green (bullish) or red (bearish) circles.
#### **SPX and VIX Data**
- Fetches daily closing prices for the S&P 500 (SPX) and VIX (volatility index).
- SPX trend: Bullish if EMA 9 > EMA 21, bearish if EMA 9 < EMA 21.
- VIX levels: High (> 25, fear), Low (< 15, stability).
- VIX color: Green if SPX bullish and VIX low, red if SPX bearish and VIX high, white otherwise.
---
### **5. Visual Outputs**
#### **Plots**
- EMAs, VWAP, and PSAR are plotted on the chart with their respective colors.
- EMA crosses are marked with circles (green for bullish, red for bearish).
#### **Table**
- Displays a summary of indicators in a customizable position and size.
- Indicators shown (if enabled):
- EMA 8/20, 9/21, 50: Green dot if bullish, red if bearish.
- VWAP: Green if price > VWAP, red if price < VWAP.
- MACD: Green if bullish, red if bearish.
- MACD Zero: Green if MACD > 0, red if MACD < 0.
- PSAR: Green if price > PSAR, red if price < PSAR.
- ADX: Arrows for very strong trends (↑/↓), dots for weaker trends, colored by direction.
- Bollinger Bands: Arrows (↑/↓) or dots based on price position.
- RSI: Numeric value, colored by overbought/oversold levels.
- VIX: Numeric value, colored based on SPX trend and VIX level.
---
### **6. Alerts**
- Triggers alerts for EMA 8/20 crosses:
- Bullish: "EMA 8/20 Bullish Cross on Candle Close!"
- Bearish: "EMA 8/20 Bearish Cross on Candle Close!"
---
### **7. Key Features**
- **Flexibility**: Users can toggle indicators on/off in the table and adjust parameters.
- **Visual Clarity**: Consistent use of green (bullish), red (bearish), and neutral colors.
- **Comprehensive**: Combines trend, momentum, volatility, and market sentiment indicators.
---
### **How to Use**
1. Add the script to TradingView.
2. Customize inputs (colors, lengths, table position) as needed.
3. Interpret the chart and table:
- Green signals suggest bullish conditions.
- Red signals suggest bearish conditions.
- Neutral signals indicate indecision or consolidation.
4. Set up alerts for EMA crosses to catch trend changes.
This script is ideal for traders who want a multi-indicator dashboard to monitor price action and market conditions efficiently.
Multi-Dimensional Momentum NavigatorMulti-Dimensional Momentum Navigator: A Comprehensive Guide
Description
The Multi-Dimensional Momentum Navigator is a sophisticated trading indicator designed to provide traders with an advanced and holistic view of market momentum. By incorporating multiple weighted features such as price levels, volume, moving averages, RSI, volatility, and rate of change, this indicator generates precise buy and sell signals. Additionally, it includes an enhanced volume-RSI momentum system with signal strength to improve market timing and trade execution.
How It Works
The script consists of two major components:
1. Optimized Trading Indicator
This section of the script calculates a trading signal using a weighted sum of various market features. It then defines buy and sell conditions based on the relative strength of the trading signal compared to its moving average.
2. Enhanced Volume RSI Momentum with Signal Strength
This section introduces volume-based momentum analysis using volume oscillators, RSI, and ADX (Average Directional Index). It identifies bullish and bearish conditions and includes an early warning system for predictive trading signals.
Input Fields and Recommended Values
Parameter, Function, and Recommended Values
Period - Defines the lookback length for calculations - 14
Open Weight - Weight assigned to the open price - 0.9433
High Weight - Weight assigned to the high price - 0.9273
Low Weight - Weight assigned to the low price - 0.9603
Close Weight - Weight assigned to the close price - 0.0334
Volume Weight - Weight assigned to volume - 0.1838
MA 14 Weight - Weight assigned to 14-period SMA - -0.1351
MA 20 Weight - Weight assigned to 20-period SMA - -0.7313
Volatility Weight - Weight assigned to market volatility - 0.0334
BB Middle Weight - Weight assigned to Bollinger Bands Middle Line - 0.0886
RSI Weight - Weight assigned to RSI - -0.8139
EMA Weight - Weight assigned to EMA - 0.2540
ROC Weight - Weight assigned to Rate of Change - 0.5541
VO Short Length - Lookback length for short-term Volume Oscillator - 1
VO Long Length Lookback length for long-term Volume Oscillator 5
RSI Length - Lookback length for RSI calculation - 7
VO Bullish Threshold (%) - Threshold for bullish volume oscillator - 55
VO Bearish Threshold (%) - Threshold for bearish volume oscillator - 55
RSI Bullish Condition - RSI level indicating a bullish signal - 25
RSI Bearish Condition - RSI level indicating a bearish signal - 50
Early Detection Percentage - Percentage of threshold required for early detection -20
ADX Early Threshold - Minimum ADX value for early signal detection - 15
How a Trader Can Use the Indicator
Traders can leverage this indicator for:
1. Identifying Market Trends: The trading signal, calculated from multiple weighted indicators, helps determine bullish and bearish trends.
2. Confirming Trade Entries: Buy and sell conditions are plotted directly on the chart, allowing for clear trade signals.
3. Early Warnings for Market Reversals: The enhanced volume-RSI momentum provides early bullish and bearish warnings before price movements.
4. Risk Management: The combination of ADX, RSI, and Volume Oscillators ensures that trade signals are backed by strong market conditions.
Understanding the Signals on the Chart
• Green Up Arrows: Buy signals, indicating a strong upward momentum.
• Red Down Arrows: Sell signals, indicating a strong downward momentum.
• Light Green Up Arrows (UP): Confirmation of a buy signal.
• Orange Down Arrows (DOWN): Confirmation of a sell signal.
• Blue Triangle Up: Early bullish warning, indicating potential upward momentum.
• Orange Triangle Down: Early bearish warning, indicating potential downward momentum.
How to Use the Indicator for Analysis and Trading Decisions
1. Trend Confirmation: Use the trading signal in conjunction with its moving average to confirm market direction.
2. Volume Analysis: Check if the volume oscillator is above or below its threshold to validate trade entries.
3. Momentum Strength: Use RSI and ADX readings to gauge market momentum before entering trades.
4. Early Entry & Exit: React to early warning signals for proactive market entries or exits.
5. Multi-Timeframe Analysis: Combine signals from different timeframes to strengthen trade conviction.
Uniqueness and Originality
What sets this indicator apart from traditional technical indicators:
1. Multi-Factor Analysis: Unlike single-indicator approaches, this combines multiple weighted factors for a holistic signal.
2. Dynamic Weighting System: Feature weights allow for customized optimization, making the indicator adaptable to different markets.
3. Predictive Early Warning System: Unlike traditional lagging indicators, this provides early trade warnings for better execution.
4. Enhanced Signal Confirmation: Incorporates multiple independent confirmations to reduce false signals and improve reliability.
5. User-Friendly Visualization: Clearly marked buy/sell and confirmation signals make it easy to interpret and act upon.
Conclusion
The Multi-Dimensional Momentum Navigator is a powerful, data-driven indicator that enhances trading decisions by leveraging multiple market factors. It provides traders with precise buy and sell signals, early warnings, and momentum confirmations to navigate market trends effectively. Its adaptability, predictive capabilities, and advanced feature integration make it an invaluable tool for any trader seeking a robust edge in the market.
PSP [Zinho`s indicator]The PSP - NQ ES YM indicator tracks the price movements of the NQ, ES, and YM futures to identify correlation and divergence between them.
If a candle closes green in NQ and ES closes red , you want that candle to be highlighted.
PSP candles are used as potential reversal points.
If the PSP is aligned with my trading bias, I utilize this indicator as a confirmation tool before taking a trade.
I hope you enjoy.