Alligator Oscillator | TramaAlligator Oscillator | Trama
The Alligator Oscillator | Trama (ATO | Trama) is a momentum-based trading indicator that utilizes Smoothed Moving Averages (SMMA) to measure market trends. Inspired by Bill Williams’ Alligator Indicator, it focuses on the relationship between the Jaw and Lips moving averages, calculating their percentage difference to identify bullish and bearish conditions.
Key Features:
✔ Jaw & Lips SMMA Calculation: Measures the spread between two smoothed moving averages.
✔ Threshold-Based Trading Signals: Identifies trend shifts using customizable long/short thresholds.
✔ Optional Smoothing: Enhances signal reliability with SMA, EMA, HMA, or RMA.
✔ Dynamic Color Modes: Choose between "Cool," "Classic," and "Blue" for visual clarity.
How It Works:
SMMA Calculation:
The Jaw (Long SMMA) is a 15-period smoothed moving average.
The Lips (Short SMMA) is a 4-period smoothed moving average.
Percentage Difference Computation:
Calculates the percentage gap between Lips and Jaw for trend analysis.
Adjusts polarity to maintain consistency in signal direction.
Signal Interpretation:
-Bullish Signal (Cyan, Green, or Light Blue): When percentage difference crosses above the long threshold.
-Bearish Signal (Magenta, Red, or Dark Blue): When percentage difference falls below the short threshold.
-Optional Smoothing:Users can smooth the percentage difference using SMA, EMA, HMA, or RMA for enhanced clarity.
-Dynamic Color Coding:The indicator colors candles based on trend detection.
This indicator is ideal for traders who:
📈 Want a trend-following strategy with clear entry/exit signals.
🔍 Prefer filtered signals with optional smoothing to reduce noise.
⚡ Seek momentum confirmation in combination with other indicators (e.g., RSI, MACD).
Customization Options:
-Threshold Levels: Adjustable long and short levels for fine-tuning sensitivity.
-Smoothing Settings: Choose from SMA, EMA, HMA, RMA or disable smoothing.
-Color Modes: Adapt the visual style to match personal preferences.
Disclaimer:
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always apply proper risk management when trading.
Trendanalyse
Volume Delta Imbalance Index [PhenLabs]📊 Volume Delta Imbalance Index (VDII)
Version: PineScript™ v6
Description
The Volume Delta Imbalance Index is an advanced technical analysis tool that combines volume profile analysis with price movement dynamics to identify significant market imbalances. It features a sophisticated analysis system that weighs recent versus historical volume delta imbalance patterns, providing traders with insights into potential market reversals and trend continuation scenarios.
Points of Innovation:
Custom volume delta calculation incorporating price and volume relationships
Adaptive smoothing system based on market volatility
Multi-component analysis combining flow, acceleration, and strength metrics
Real-time volume profile integration with historical context
🔧 Core Components
Volume Profile Analysis: Dynamic volume delta imbalance distribution assessment
Flow Imbalance Detection: Buy/sell pressure evaluation
Strength Analysis: Composite market strength measurement
Acceleration Framework: Volume movement dynamics
Statistical Bands: Adaptive threshold system
🚨 Key Features 🚨
The indicator provides comprehensive analysis through:
Volume Delta: Up to date volume imbalance measurement
Market Structure: Support/resistance level identification
Flow Analysis: Buy/sell pressure visualization
Acceleration Signals: Movement momentum detection
Adaptive Bands: Dynamic overbought/oversold levels
📈 Visualization
Color-coded Columns: Shows direction and strength of imbalance
Signal Lines: Strong buy/sell level indicators
Statistical Bands: Shows normal trading ranges
Gradient Fills: Indicates extreme market conditions
Dynamic Opacity: Reflects trend strength
📌 Usage Guidelines
The indicator offers several customization options:
Basic Settings:
Lookback Period: Analysis timeframe adjustment
Sensitivity Level: Signal response calibration
History Depth: Historical context range
Memory Setting: Recent vs. historical data weight
Visual Settings:
Color Scheme: Bullish/bearish signal colors
Signal Levels: Strong buy/sell thresholds
Band Display: Statistical range visualization
✅ Best Use Cases / Things To Look For:
Wait for establishment in the initial trend when the VDII comes back towards zero and the color of the volume becomes more faint
Once this is established and the VDII pushes through to the other side look for small retracements above the zero line on the VDII leading you to believe it is a likely area for price to retrace and continue in its prior direction
Make sure you see the volume bars become more faint in color to give yo further confluence price will continue in its priorly established direction
⚠️ Limitations
Requires sufficient volume data
Most effective in liquid markets
Historical depth affects calculation speed
Possible lag in highly volatile conditions
What Makes This Unique
Composite Volume Analysis: Combines multiple volume metrics
Adaptive Calculation: Adjusts to market volatility
Profile Integration: Incorporates volume profile analysis
Multi-component Scoring: Weighted analysis system
Memory-efficient Design: Optimized for real-time analysis
🔧 How It Works
The indicator processes market data through four main components:
1. Volume Profile Analysis:
Creates dynamic volume delta distribution profiles
Weights recent versus historical data
Identifies significant price levels
2. Flow Imbalance Detection:
Analyzes buying versus selling pressure
Calculates normalized flow ratios
Determines market bias
3. Strength Analysis:
Measures composite market strength
Incorporates volume-weighted movements
Provides trend strength indication
4. Final Score Calculation:
Combines all components with weighted importance
Applies volatility-based smoothing
Generates final signal output
5. VDII Potential Reversal Confluences
Bars between signal confluence is default set to 10 but you can change it to whatever you’d prefer
Signals are a compiled look at the indicator as a whole determining where it think reversals or retracements are likely
💡 Note:
The indicator performs best in markets with consistent volume and clear trending or ranging conditions. Its sophisticated volume analysis provides valuable insights into market dynamics beyond traditional price-based indicators.
Cross Market AdvancedEnglish Description:
Cross Market Advanced is a TradingView indicator designed for intermarket analysis between two tickers. It compares the price of the primary market (the chart’s ticker) with a secondary market (user-selectable) by calculating their ratio—optionally with a configurable time delay. This feature is especially useful for markets such as oil and gold. Statistical studies show that the gold price typically lags behind the oil price by about 140–150 days, meaning that an oil rally can potentially trigger a gold rally after approximately 145 days.
Key features include:
• Intermarket Comparison: Analyzes the relationship between two different markets.
• Customizable Ratio Calculation: Choose between EMA and SMA smoothing, set evaluation periods, and apply a time delay for the secondary ticker. This delay can be tailored to match market-specific relationships, like the oil-to-gold lag.
• Overbought & Oversold Levels: Visual cues are provided with horizontal reference lines at 70 (overbought) and 30 (oversold), with a shaded zone between, helping to identify extreme market conditions.
• Divergence Detection: Identifies potential divergences between the ticker price and the scaled index. Divergence signals are color-coded (red for bearish, green for bullish) as a rough guide—note that this does not replace detailed technical analysis.
• Additional Plots: Optionally display the raw ratio and z‑score.
• Visual Aids: The indicator displays the selected tickers on the chart along with clear reference levels.
This tool is ideal for traders looking to explore cross-market relationships, identify early signs of potential market reversals, and incorporate time delay effects—particularly in markets like oil and gold.
Deutsche Beschreibung:
Cross Market Advanced ist ein TradingView-Indikator, der eine Intermarket-Analyse zwischen zwei Tickern ermöglicht. Er vergleicht den Kurs des primären Marktes (dem im Chart dargestellten Ticker) mit einem sekundären Markt (frei wählbar), indem er deren Verhältnis berechnet – optional mit einem einstellbaren Zeitversatz. Dieser Zeitversatz ist besonders nützlich, wenn beispielsweise Öl und Gold verglichen werden. Statistischen Untersuchungen zufolge läuft der Goldpreis etwa 140–150 Tage hinter dem Ölpreis her, was bedeuten kann, dass eine Öl-Rallye zu einer Gold-Rallye mit einem Verzögerungsfaktor von etwa 145 Tagen führen kann.
Wichtige Funktionen im Überblick:
• Intermarket-Vergleich: Analyse der Beziehung zwischen zwei unterschiedlichen Märkten.
• Anpassbare Verhältnis-Berechnung: Auswahl zwischen EMA und SMA, Festlegung der Evaluationsperiode sowie Anwendung eines Zeitversatzes für den zweiten Ticker. Dieser Versatz kann an marktspezifische Zusammenhänge angepasst werden, wie z.B. das Öl-Gold-Verhältnis.
• Überkauft & Überverkauft: Mit horizontalen Referenzlinien bei 70 (Überkauft) und 30 (Überverkauft) wird die aktuelle Marktlage visualisiert – der dazwischen liegende, hervorgehobene Bereich hilft, extreme Marktbedingungen zu erkennen.
• Divergenzerkennung: Ermittelt mögliche Divergenzen zwischen dem Ticker-Kurs und dem skalierten Index. Divergenzsignale werden farblich hervorgehoben (rot für bärisch, grün für bullisch) und dienen als grobe Orientierung – sie ersetzen jedoch keine ausführliche charttechnische Analyse.
• Zusatzplots: Optionale Darstellung des Rohwerts des Verhältnisses sowie des z‑Scores.
• Visuelle Hilfen: Der Indikator zeigt die ausgewählten Ticker im Chart sowie die klaren Referenzniveaus an.
Dieser Indikator eignet sich ideal für Trader, die Cross-Market-Beziehungen untersuchen, frühzeitig Hinweise auf mögliche Trendumkehrungen erkennen und auch Verzögerungseffekte – wie etwa beim Öl-Gold-Verhältnis – in ihre Analyse einbeziehen möchten.
SyakDan FX (Clear Version)**SyakDan FX (Clear Version) - Indicator Description**
### Overview:
SyakDan FX (Clear Version) is a comprehensive TradingView indicator designed for account management, trend identification, and automated trading signals. This script utilizes multiple moving averages, ATR-based stop-loss calculations, and Fibonacci-based pivot points to assist traders in making informed trading decisions.
### Features:
1. **Account Management Calculation:**
- The indicator dynamically adapts to the current timeframe.
- Customizable moving average (MA) types, including EMA, SMA, WMA, and HMA.
- ATR-based trailing stop and volatility assessment.
2. **Moving Averages & Trend Identification:**
- Configurable EMA lengths for three different moving averages.
- Dynamic selection of MA types (SMA, EMA, WMA, HMA) for flexibility.
- Different EMA lengths for low and high timeframes.
- Automatic detection of EMA crossovers and trend changes.
3. **Entry, Stop-Loss, and Take-Profit Calculation:**
- Enables automatic calculation of entry, stop-loss, and take-profit levels.
- ATR-based stop-loss placement.
- Multi-level take-profit targets (TP1, TP2, TP3, and Max TP).
- Visual representation of SL/TP levels using dynamic lines and labels.
4. **Alerts & Notifications:**
- Alerts for EMA crossovers (Buy & Sell signals).
- Additional alerts when EMA 2 crosses EMA 3, indicating strong signals.
5. **Pivot Point Calculations:**
- Calculates daily and weekly pivot points using Fibonacci and traditional methods.
- Helps traders identify key support and resistance levels.
### How It Works:
- The indicator plots three customizable moving averages on the chart.
- It detects crossovers between these moving averages to identify potential buy and sell signals.
- ATR (Average True Range) is used to set dynamic stop-loss and take-profit levels.
- Traders can enable or disable automatic SL/TP plotting.
- Alerts notify users when key trade signals occur.
- Fibonacci and traditional pivot points provide additional confluence for trading decisions.
### Customization Options:
- **MA Type Selection:** Choose from SMA, EMA, WMA, or HMA for each moving average.
- **EMA Length Adjustments:** Modify the lengths for short-term and long-term trends.
- **SL/TP Settings:** Enable or disable SL/TP plotting and customize their multipliers.
- **Alert Preferences:** Enable or disable alerts for trend crossovers.
### Ideal Usage:
- Traders using trend-following strategies based on moving averages.
- Those who want automated SL/TP placement for risk management.
- Anyone looking to integrate pivot points into their trading decisions.
This indicator provides a clean, structured approach to trading with automated analysis, reducing the need for manual calculations while offering strong risk management tools.
ORB-5Min + Adaptive 12/48 EMA + PDH/PDL
Overview:
This indicator combines the 5-Minute Opening Range Breakout (ORB), Adaptive 12/48 Exponential Moving Averages (EMAs), and Previous Day High/Low (PDH/PDL) levels to help traders identify key intraday levels and market trends.
Key Components and Logic:
5-Minute Opening Range Breakout (ORB):
Displays the high and low from the first 5-minute candle of the trading session.
Includes customizable opacity for the range fill.
Helps traders spot breakout opportunities and key support/resistance zones.
Adaptive 12/48 EMA System:
Displays EMAs for 9, 12, 48, and 200 periods.
The 12 EMA changes color based on whether the price is entirely above or below it.
The 48 EMA changes color depending on its relationship with the 12 EMA.
Provides dynamic trend identification and potential entry/exit signals.
Previous Day High/Low (PDH/PDL):
Displays the previous day’s high and low levels.
Useful for tracking key intraday support/resistance levels and potential reversal points.
Summary:
This script stands out by blending three popular intraday tools into a single comprehensive indicator. The combined visualization provides a layered market context that assists traders in making informed decisions quickly. The color-adaptive EMAs add clarity to trend direction, while the ORB and PDH/PDL levels highlight significant price zones for breakout or reversal trades.
How to Use:
Breakout Trades: Watch for price breaks above the ORB high or below the ORB low, especially when supported by EMA trends.
Trend Confirmation: Use the color-adaptive 12/48 EMA system to gauge momentum and market direction.
Reversal or Continuation: Observe how price reacts around PDH/PDL levels, especially if confluence with EMAs occurs.
This indicator is suitable for day traders seeking a clear and efficient way to track market structure, identify trends, and spot potential trade opportunities during regular market hours.
ATR Volatility Expansion FilterThe ATR Volatility Expansion indicator helps traders identify when market volatility is increasing.
It compares two ATR values: the Baseline ATR, which tracks long-term volatility, and the Current ATR, which measures recent price movements.
The core concept is that when short-term volatility significantly surpasses the long-term average, it signals a period of heightened price movement. Traders can use this information to adjust their strategies accordingly.
Baseline ATR (blue): Represents long-term volatility, serving as a benchmark.
Current ATR (orange): Measures short-term volatility, highlighting recent market shifts.
Threshold ATR (red): A customizable multiplier of the Baseline ATR, setting the threshold for volatility expansion.
When the Current ATR exceeds the Threshold ATR, the background turns green, indicating volatility expansion. This provides traders with ability to get involved in moving markets or avoid choppy conditions.
The indicator is fully customizable, allowing you to adjust the ATR lengths, timeframe, and threshold multiplier to align with your trading strategy.
GMA-F | TramaGMA-F | TRAMA Indicator
The GMA-F | TRAMA is an advanced Geometric Moving Average (GMA) indicator for TradingView, incorporating a for loop to refine trend signals. This tool enhances market analysis by detecting price momentum shifts with a mathematically weighted approach.
Key Features:
-Geometric Moving Average (GMA): Unlike standard moving averages, the GMA calculates the geometric mean of past prices for a more balanced and adaptive trend measurement.
-For Loop-Based Signal Processing: Iteratively evaluates price movements over a user-defined range, enhancing signal precision.
-Customizable Thresholds: Users can set long and short triggers to align with their preferred trading strategies.
-Color-Coded Signals: Choose between three distinct visualization modes (Cool, Classic, Blue) for easier interpretation.
For Loop Logic:
-Accumulates trend signals based on past price movements.
-Dynamically adapts to different market conditions.
-Filters out noise by applying a structured evaluation process.
Trading Signals:
-Bullish Signal (Cyan, Green, or Light Blue): The loop calculation exceeds the long threshold, indicating an upward trend.
-Bearish Signal (Magenta, Red, or Dark Blue): The loop calculation drops below the short threshold, signaling a downward trend.
Graphical Visualization:
-Loop Signal Plot: Displays the computed GMA loop signal with dynamic coloring.
-Threshold Markers: Clearly indicate bullish and bearish levels for quick reference.
-Colored Candlesticks: Change color based on detected market conditions, offering instant visual confirmation.
Operational Use:
The GMA-F | TRAMA is ideal for traders aiming to:
✔ Identify trend strength through an alternative moving average calculation.
✔ Reduce market noise by leveraging iterative signal refinement.
✔ Customize parameters to optimize entries and exits.
Disclaimer:
This indicator is for informational and educational purposes only and does not constitute financial advice. Traders should use this tool alongside other market analysis methods and risk management strategies before making trading decisions. Investing in financial markets involves significant risks.
Normalized RSI Oscillator with DivergencesNormalized RSI with Divergences {A Next-Level Trading Tool}
The Normalized RSI with Divergences indicator is a powerful and innovative tool designed to enhance your trading precision. By normalizing the Relative Strength Index (RSI) and detecting divergences between the standard and normalized RSI, this script helps traders identify potential trend reversals and continuations with remarkable clarity.
Key Features
🔹 Advanced RSI Normalization
• Transforms the traditional RSI into a normalized range of , making overbought and oversold conditions more intuitive.
• Utilizes a dynamic lookback period to adapt to market conditions.
🔹 Divergence Detection for Smarter Trading
• Identifies Bullish, Hidden Bullish, Bearish, and Hidden Bearish divergences by analyzing RSI pivot points.
• Provides early signals of trend reversals and continuations for better trade execution.
🔹 Clear & Visual Trade Signals
• Divergences are automatically labeled on the chart:
o Bullish Divergence: 🟢 “Bull” (Green) – Possible upward reversal.
o Hidden Bullish Divergence: 🟢 “Hid.” (Lime) – Continuation of an uptrend.
o Bearish Divergence: 🔴 “Bear” (Red) – Possible downward reversal.
o Hidden Bearish Divergence: 🟠 “Hid.” (Orange) – Continuation of a downtrend.
🔹 Fully Customizable Inputs
• Adjust RSI period, normalization lookback, and divergence parameters to fit your strategy.
• Tailor the indicator to your preferred trading style and market conditions.
________________________________________
How It Works
🔹 RSI Normalization Formula:
Norm=2×(RSI−MinMax−Min)−1\text{Norm} = 2 \times \left(\frac{\text{RSI} - \text{Min}}{\text{Max} - \text{Min}}\right) - 1Norm=2×(Max−MinRSI−Min)−1
• Min & Max represent the lowest and highest RSI values over the selected lookback period.
🔹 Divergence Detection Process:
• Identifies pivot points in both the normalized RSI and the standard RSI.
• Compares their directions to detect potential trading signals.
🔹 Real-Time Chart Labeling:
• Uses label.new to visually highlight divergence points for quick and efficient decision-making.
________________________________________
Input Parameters
• Source: Price source for RSI calculation (Default: hlc3).
• Signal Period: RSI calculation period (Default: 50).
• Lookback Range: Normalization period (Default: 200, Max: 5000).
• Trend Length: Smoothing period for normalized RSI (Default: 5).
• Band Width: Center line & bands calculation period (Default: 34).
• Divergence Range: Lookback period for divergence detection (Default: 5).
________________________________________
How to Use
1. Add the script to your trading chart.
2. Customize the settings to match your trading approach.
3. Watch for divergence labels to identify potential market moves:
o 🟢 Bullish Divergence: Possible upward reversal.
o 🟢 Hidden Bullish Divergence: Continuation of an uptrend.
o 🔴 Bearish Divergence: Possible downward reversal.
o 🟠 Hidden Bearish Divergence: Continuation of a downtrend.
________________________________________
Why Use This Indicator?
✅ Enhanced RSI Analysis: Normalization simplifies overbought/oversold conditions.
✅ Crystal-Clear Divergence Signals: Instantly spot key trend shifts.
✅ Fully Customizable: Adjust settings for your specific strategy.
✅ Improve Trade Accuracy: Gain an edge with precise divergence detection.
________________________________________
⚠️ Disclaimer
This script is for educational and informational purposes only. It does not constitute financial advice. Always conduct thorough research and backtesting before using it in live trading.
📜 License
This script is released under the Mozilla Public License 2.0.
Enjoy the Normalized RSI with Divergences indicator, and happy trading! 🚀📈
— Kerem Ertem
Dual HTF Candle Boxes with PDH/PDL/PWH/PWLThis Pine Script code for TradingView creates an indicator that displays dual higher timeframe (HTF) candle boxes along with Previous Day High (PDH), Previous Day Low (PDL), Previous Week High (PWH), and Previous Week Low (PWL) lines. Let's break down what this code does:
Core Functionality:
Dual HTF Candle Boxes: The script overlays two sets of candle boxes on the main chart, each representing a different higher timeframe. This allows traders to visualize price action on larger timeframes without switching charts. For example, you can see 15-minute and 1-hour candles overlaid on your current chart.
Customizable Timeframes: You can define the specific higher timeframes you want to see for each set of candles. The script provides input options to select these timeframes.
Color Customization: The colors of the candle bodies, wicks, and boxes are customizable. You can set different colors for bullish and bearish candles for each of the two higher timeframes.
Box and Body Display Options: You can choose to display both the box outlines and the candle bodies, or just the bodies, or just the boxes (high/low range). This allows you to customize the visual representation to your liking.
Midline: An optional midline can be displayed within each HTF candle box, representing the midpoint between the high and low.
Range in Pips/Percentage: The script can display the range of each HTF candle in pips or as a percentage of the total range.
PDH/PDL/PWH/PWL Lines: The script also plots horizontal lines representing the Previous Day High, Previous Day Low, Previous Week High, and Previous Week Low. These are common support and resistance levels.
PDH/PDL/PWH/PWL Customization: You can customize the colors and line styles (solid or dashed) of the PDH/PDL/PWH/PWL lines.
Code Breakdown:
indicator(): Defines the script as an indicator with a title and other properties.
input.*: Defines user input options for customizing the indicator. This is how you configure the timeframes, colors, and other settings.
timeframe.period: Gets the current chart's timeframe.
request.security(): Used to request data from higher timeframes. This is how the script gets the high, low, open, and close prices for the HTF candles.
box.new(): Creates the candle box objects on the chart.
line.new(): Creates the PDH/PDL/PWH/PWL lines.
label.new(): Creates the labels for the pip/percentage range and PDH/PDL/PWH/PWL.
array.new_box(), array.new_label(), array.new_line(): These arrays are used to store the created boxes, labels, and lines so they can be managed and deleted if the color settings are changed. This is a crucial improvement for performance and prevents the chart from becoming cluttered with old objects.
f_draw_htf_boxes(): This function handles the drawing of the HTF candle boxes. It takes the timeframe, colors, and other parameters as input.
ta.change(time(Interval)): Detects when a new HTF candle has formed.
Key Improvements in this Version:
Object Management: The use of arrays to store and manage the boxes, labels, and lines is a significant improvement. This prevents the accumulation of objects on the chart, which can slow down TradingView and make the chart unreadable. The script now properly deletes old objects when colors are changed.
Color Change Detection: The script now detects when the user changes the color inputs and clears the existing objects before drawing new ones with the new colors.
Clearer Code Structure: The code is organized into functions, making it easier to read and understand.
How to Use:
Open TradingView.
Open a chart for any symbol.
Open the Pine Editor.
Copy and paste this code into the editor.
Add the indicator to the chart.
Use the input options to customize the indicator to your preferences.
This script provides a powerful way to visualize higher timeframe price action and key support/resistance levels directly on your chart, enhancing your trading analysis. Remember that proper use and interpretation of these indicators are crucial for successful trading. This script is a tool, and like any tool, its effectiveness depends on the user's skill and understanding.
Peak Reaction Zones [BigBeluga]Peak Reaction Zones is an advanced Smart Money Concept (SMC) indicator that identifies the most recent swing high and swing low zones, helping traders determine premium and discount areas for optimal trade positioning.
🔵 Key Features:
Swing High & Low Zones:
Automatically detects the latest swing high and swing low levels.
Helps traders identify key reaction points where price is likely to respond.
Premium & Discount Concept:
The high zone represents a premium area, where price is overextended and may reverse.
The low zone represents a discount area, where price is undervalued and may bounce.
The midline dynamically marks the equilibrium of the range.
Adjustable Zone Width:
Users can fine-tune the width of the zones to match their trading style.
Wider zones capture broader reaction ranges, while narrower zones focus on precise levels.
Zone Retest Signals:
Blue markers appear when price retests the lower reaction zone, signaling potential support.
Orange markers appear when price retests the upper reaction zone, indicating possible resistance.
Price Labels for Key Levels:
Displays the price value of the swing high, swing low, and midline for quick reference.
Helps traders recognize major reaction points at a glance.
🔵 Usage:
Smart Money Trading: Utilize the premium and discount concept to align trades with institutional order flow.
Zone Reactions: Watch for price tests of reaction zones and use the retest signals to confirm potential reversals.
Midline Confirmation: If price holds above or below the midline, it can indicate directional bias.
Scalping & Swing Trading: Short-term traders can look for zone rejections, while swing traders can use the levels for trend continuation setups.
Peak Reaction Zones is a must-have tool for traders looking to trade with Smart Money Concepts, allowing for precise entries and exits based on key liquidity areas and market structure.
Pivot Points DWMWhat Is a Pivot Point?
A pivot point is a price level calculated from previous prices. It's used to indicate potential areas of support or resistance that offer attractive reward-to-risk setups for trades. The pivot point itself is simply the average of the intraday high and low and the closing price from the previous trading day. Trading above the pivot point on the subsequent day is thought to indicate ongoing bullish sentiment. Trading below the pivot point indicates bearish sentiment.
Non-Repainting
Candlestick Pattern Detector - Vijay PrasadOverview:
This Pine Script v6 indicator is designed to detect and label key candlestick patterns on TradingView charts. It provides real-time visual markers for major bullish and bearish reversal signals, aiding traders in decision-making.
Usefulness:
✅ Saves time by automating candlestick pattern detection.
✅ Reduces manual chart analysis errors.
✅ Works across all markets & timeframes.
✅ Enhances trading strategies with accurate signals.
Candlestick Patterns Recognises:
Bullish Engulfing – A strong bullish reversal pattern.
Bearish Engulfing – Indicates a potential downtrend.
Hammer – Suggests a market bottom or reversal.
Shooting Star – A bearish reversal signal at the top of an uptrend.
Doji – Signals market indecision and possible trend change.
Key Functions:
Automated Pattern Visible
Identifies candlestick patterns dynamically and plots them on the chart.
Visual Labels for Patterns
Labels to indicate specific candlestick formations.
Labels appear only when a valid pattern is detected, avoiding unnecessary clutter.
Buy/Sell Signal
Plots buy signals at bullish patterns and sell signals at bearish patterns.
Helps traders recognize trend reversals and entry/exit points.
Bullish Engulfing Pattern (Green Label)
What it means: A bullish engulfing pattern typically signals a potential reversal from a downtrend to an uptrend. The current candle fully engulfs the previous candle, signaling strong buying interest.
Identifying Candlestick Patterns on the Chart
How to use it:
Entry: Look for a green label (bullish engulfing) at the bottom of the chart. When it appears, consider entering a long position (buy).
Confirmation: To increase reliability, wait for confirmation by observing if price moves above the high of the bullish engulfing candle.
Exit: Exit when the trend shows signs of reversing or take profit at predefined levels (e.g., resistance or a risk-to-reward ratio).
Bearish Engulfing Pattern (Red Label)
What it means: A bearish engulfing pattern is a signal of a potential reversal from an uptrend to a downtrend. The current candle fully engulfs the previous candle, signaling strong selling pressure.
How to use it:
Entry: Look for a red label (bearish engulfing) at the top of the chart. When it appears, consider entering a short position (sell).
Confirmation: Wait for the price to move below the low of the bearish engulfing candle to confirm the bearish trend.
Exit: Close the trade when the price reaches support levels or the trend shows signs of reversing.
Doji Pattern (Blue Circle)
What it means: A Doji candle signals market indecision. It represents a balance between buyers and sellers, often marking a potential reversal or consolidation point.
How to use it:
Entry: If the Doji appears after a strong trend (bullish or bearish), wait for the next candle to break above or below the Doji's high or low. This can signal a continuation or reversal.
Confirmation: You can look for additional indicators like moving averages, RSI, or MACD for confirmation before taking any action.
Exit: Exit when the price shows clear momentum in your entry direction.
Hammer Pattern (Orange Triangle)
What it means: The hammer pattern is a bullish reversal pattern that appears after a downtrend. It suggests that sellers pushed the price down during the session, but buyers managed to push the price back up.
How to use it:
Entry: When a hammer appears, consider entering a long position (buy). The price should move above the hammer's high for confirmation.
Confirmation: Look for strong volume and a follow-up bullish candle to confirm the reversal.
Exit: Set a target based on the next resistance level, or use a trailing stop to lock in profits.
Using Candlestick Patterns with Other Indicators
To increase your chances of success, combine candlestick patterns with other technical indicators.
Here are some ideas:
RSI (Relative Strength Index): Use RSI to check whether the market is overbought or oversold. A bullish engulfing in an oversold market could indicate a stronger buy signal, and a bearish engulfing in an overbought market could indicate a stronger sell signal.
Moving Averages (e.g., 50 EMA, 200 EMA): Confirm trend direction. If the candlestick pattern aligns with the direction of the moving averages, it can give a stronger signal.
MACD (Moving Average Convergence Divergence): Use MACD to confirm momentum and potential trend changes. If a candlestick pattern aligns with a MACD crossover, it strengthens the signal.
Volume: Look for higher-than-average volume when a pattern appears. This can give you additional confirmation that the market is reacting strongly.
Practice and Refine
It's important to practice using the candlestick patterns in a demo account or backtest them to see how they perform under different market conditions. Over time, you can adjust the settings and patterns to fit your trading style and preferences.
TradFi Fundamentals: Momentum Trading with Macroeconomic DataIntroduction
This indicator combines traditional price momentum with key macroeconomic data. By retrieving GDP, inflation, unemployment, and interest rates using security calls, the script automatically adapts to the latest economic data. The goal is to blend technical analysis with fundamental insights to generate a more robust momentum signal.
Original Research Paper by Mohit Apte, B. Tech Scholar, Department of Computer Science and Engineering, COEP Technological University, Pune, India
Link to paper
Explanation
Price Momentum Calculation:
The indicator computes price momentum as the percentage change in price over a configurable lookback period (default is 50 days). This raw momentum is then normalized using a rolling simple moving average and standard deviation over a defined period (default 200 days) to ensure comparability with the economic indicators.
Fetching and Normalizing Economic Data:
Instead of manually inputting economic values, the script uses TradingView’s security function to retrieve:
GDP from ticker "GDP"
Inflation (CPI) from ticker "USCCPI"
Unemployment rate from ticker "UNRATE"
Interest rates from ticker "USINTR"
Each series is normalized over a configurable normalization period (default 200 days) by subtracting its moving average and dividing by its standard deviation. This standardization converts each economic indicator into a z-score for direct integration into the momentum score.
Combined Momentum Score:
The normalized price momentum and economic indicators are each multiplied by user-defined weights (default: 50% price momentum, 20% GDP, and 10% each for inflation, unemployment, and interest rates). The weighted components are then summed to form a comprehensive momentum score. A horizontal zero line is plotted for reference.
Trading Signals:
Buy signals are generated when the combined momentum score crosses above zero, and sell signals occur when it crosses below zero. Visual markers are added to the chart to assist with trade timing, and alert conditions are provided for automated notifications.
Settings
Price Momentum Lookback: Defines the period (in days) used to compute the raw price momentum.
Normalization Period for Price Momentum: Sets the window over which the price momentum is normalized.
Normalization Period for Economic Data: Sets the window over which each macroeconomic series is normalized.
Weights: Adjust the influence of each component (price momentum, GDP, inflation, unemployment, and interest rate) on the overall momentum score.
Conclusion
This implementation leverages TradingView’s economic data feeds to integrate real-time macroeconomic data into a momentum trading strategy. By normalizing and weighting both technical and economic inputs, the indicator offers traders a more holistic view of market conditions. The enhanced momentum signal provides additional context to traditional momentum analysis, potentially leading to more informed trading decisions and improved risk management.
The next script I release will be an improved version of this that I have added my own flavor to, improving the signals.
Pivot Candles with MFI Opacity (No Plot)How to Use the Pivot Candles with MFI Opacity Indicator for Trade Entries and Position Management
Overview
This indicator is designed not only to display key pivot levels (support and resistance) and Money Flow Index (MFI) signals on your chart, but also to help you structure systematic order entries and position management. By combining pivot levels with dynamic MFI-based candle opacity, the indicator provides a visual framework that technical analysts and quants can use to time buy and sell stop orders as well as to pyramid positions or take profits.
Trade Entry with Pivot Levels
Buy Stop Orders Above R1:
Concept: In many technical setups, resistance levels such as R1 are viewed as potential breakout points. A buy stop order placed just above R1 allows you to enter a long position only when price decisively breaks the prior resistance, confirming bullish momentum.
How It Works:
The indicator calculates pivot levels based on the previous higher‑timeframe bar, so R1 is “locked in” for the current period.
When the current candle closes above R1, it may signal a breakout.
Technical analysts often place a buy stop order slightly above R1 (for example, a few ticks or pips above the level) to confirm the move.
Practical Application:
Quants and systematic traders can program their models to monitor when the current close exceeds R1.
Once this condition is met, a buy stop order is triggered to capture the breakout move, ensuring that you only participate if the price decisively moves upward.
Sell Stop Orders Below S1:
Concept: Conversely, S1 acts as a support level. A sell stop order placed just below S1 is designed to capture a breakdown. This order is activated when price closes below S1, indicating that selling pressure may be overwhelming.
How It Works:
With pivot levels fixed from the previous higher‑timeframe bar, S1 provides a reference for potential support.
A close below S1 can be interpreted as a sign of a bearish reversal or a continuation of a downtrend.
Practical Application:
Quants set up their systems to watch for a break below S1.
A sell stop order is positioned just below S1 to ensure that if the support level fails, the system can quickly initiate a short position to capture the downward move.
Using MFI for Position Management
Pyramiding and Profit Taking:
Dynamic Candle Opacity:
The Money Flow Index (MFI) in this indicator not only provides overbought/oversold alerts but also controls the opacity of your candlesticks. When MFI readings are high, the candles become more opaque, indicating strong buying pressure. Conversely, lower MFI values lead to more transparent candles, suggesting reduced momentum.
Pyramiding Long Positions:
Strategy:
In a strong trend, technical analysts might choose to add to a winning position gradually—a process known as pyramiding.
Implementation:
As long as the price remains above R1 and MFI readings are supportive (high and consistent), you may consider adding to your long position incrementally.
Each new buy stop order can be set above R1 with slightly adjusted trigger levels to capture further breakout strength.
Risk Management:
Quants use the MFI reading as a risk filter; if MFI begins to drop or the candles become significantly more transparent, it may be a cue to stop pyramiding or even begin taking profits.
Taking Profit Using MFI and Pivot Reversals:
Profit Targeting:
When price reaches higher resistance levels (e.g., R2 or R3) or shows signs of overextension in conjunction with extreme MFI levels (for instance, a sudden drop in MFI after a strong rally), you can begin taking partial profits.
Systematic Exit:
A systematic strategy might include scaling out of the position as the price approaches the next resistance level or when the MFI indicates that buying momentum is waning.
Similarly, for short positions entered below S1, profit targets might be set near subsequent support levels, with exits triggered if MFI suggests a reversal.
Summary
Entry Orders:
Place buy stop orders just above R1 to capture breakouts.
Place sell stop orders just below S1 to capture breakdowns.
Position Management with MFI:
Use MFI-based candle opacity as a visual indicator of momentum.
Pyramid positions in the direction of the trend when MFI confirms strength.
Consider partial exits if MFI readings start to reverse or if the price nears the next pivot level.
By following this systematic approach, technical analysts and quants can use the indicator not only as a visual tool but as an integral part of an automated or semi-automated trading system that emphasizes disciplined entries, pyramiding, and profit-taking.
Midnight Range Standard DeviationsCredit to Lex Fx for the basic framework of this script
This indicator is designed to assist traders in identifying potential trading opportunities based on the Intraday Concurrency Technique (ICT) concepts, specifically the midnight range deviations and their relationship to Fibonacci levels. It builds upon the work of Lex-FX, whom we gratefully acknowledge for the original concept and inspiration for this indicator.
Core Concept: ICT Midnight Range
The core of this indicator revolves around the concept of the midnight range. According to ICT, the high and low formed in a specific time window (typically the first 30 minutes after midnight, New York Time) can serve as a key reference point for intraday price action. The indicator identifies this range and projects potential support and resistance levels based on deviations from this range, combined with Fibonacci ratios.
How ICT Uses Midnight Range Deviations
ICT methodology often involves looking for price to move away from the initial midnight range, then return to it, or deviate beyond it, as key areas for potential entries.
Range Identification: The indicator automatically identifies the high and low of the midnight range (00:00 - 00:30 NY Time).
Deviation Levels: The indicator calculates and displays deviation levels based on multiples of the initial midnight range. These levels are often used to identify potential areas of support and resistance, as well as potential targets for price movement. These levels can be set in the additional fib levels section, which can be configured in increments of .5 deviations all the way up to 12 deviations.
Fibonacci Confluence: ICT often emphasizes the confluence of multiple factors. This indicator adds Fibonacci levels to the midnight range deviations. This allows traders to identify areas where Fibonacci retracements or extensions align with the deviation levels, potentially creating stronger areas of support or resistance.
Looking for Sweeps: ICT often uses these levels to look for times that the high and low are swept as potential areas of liquidity, indicating the start of potential continuations.
Time-Based Analysis: The time at which price interacts with these levels can also be significant in ICT. The indicator provides options to extend the range lines to specific times (e.g., 3 hours, 6 hours, 10 hours, 12 hours, or a custom defined time) after midnight, allowing traders to focus on specific periods of the trading day.
Indicator Settings Explained:
Time Zone (TZ): Defines the time zone used for calculating the midnight range. The default is "America/New_York".
Range High Color, Range Low Color, Range Mid Color: Customize the colors of the high, low, and mid-range lines.
Range Fill Color: Sets the fill color for the area between the range high and low.
Line Style: Choose the style of the range lines (solid, dashed, dotted).
Range Line Thickness: Adjust the thickness of the range lines for better visibility.
Show Fibonacci Levels: Enable or disable the display of Fibonacci deviation levels.
Fib Up Color, Fib Down Color: Customize the colors of the Fibonacci levels above (up) and below (down) the midnight range.
Show Trendline: Enables a trendline that plots the close price, colored according to whether the price is above the high, below the low, or within the midnight range.
Show Range Lines, Show Range Labels: Toggles the visibility of the range lines and their associated labels.
Label Size: Adjust the size of the labels for better readability.
Hide Prices: Option to display only the deviation values on labels, hiding price values.
Place Fibonacci Labels on Left Side: Option to switch label position from right side to left side.
Extend Range To (Hours from Midnight): This section gives you a wide variety of options on how far you want to extend the range to, you can do 3,6,10,12, and 23 hours. Alternatively, you can select the "Use Custom Length" and set a specific time in hours.
Additional Fib Levels: This section allows the trader to set additional deviation points in increments of .5 deviations from .5 all the way up to 12 deviations
TradingView Community Guidelines Compliance:
This indicator description adheres to the TradingView community guidelines by:
Being educational: It explains the ICT methodology and how the indicator can be used in trading.
Being transparent: It clearly describes all the indicator's settings and their purpose.
Providing credit: It acknowledges Lex-FX as the original author of the concept.
Avoiding misleading claims: It does not guarantee profits or imply that the indicator is a "holy grail."
Disclaimer: Usage of this indicator and the information provided is at your own risk. The author is not responsible for any losses incurred as a result of using this indicator.
Important Considerations:
This indicator is intended for educational purposes and to assist in applying the ICT methodology.
It should not be used as a standalone trading system.
Always combine this indicator with other forms of technical analysis and risk management techniques.
Backtest thoroughly on your chosen market and timeframe before using in live trading.
Trading involves risk. Only trade with capital you can afford to lose.
Candle Partition Statistics with IQV and Chi2NOTE: THE FORMULA IN THE CHART IS NOT PART OF THE CODE
This Pine Script calculates statistical measures for candle partitions based on whether a candle is bullish or bearish and whether the price is above or below an EMA. It evaluates statistical properties such as the Index of Qualitative Variation (IQV) and the Chi-Square (χ²) statistic to assess variations in price action.
Concept of Index of Qualitative Variation (IQV)
IQV is a statistical measure used to quantify the diversity or dispersion of categorical variables. In this script, it is used to measure how evenly the four categories of candles (green above EMA, red above EMA, green below EMA, red below EMA) are distributed.
Purpose of IQV in the Script:
IQV ranges from 0 to 1, where 0 indicates no variation (one category dominates) and 1 indicates maximum variation (categories are equally distributed).
A high IQV suggests balanced distributions of bullish/bearish candles above/below the EMA, indicating market uncertainty or mixed sentiment.
A low IQV suggests dominance of a particular candle type, indicating a strong trend.
Concept of Chi-Square (χ²) Test
Chi-square (χ²) is a statistical test that measures the difference between expected and observed frequencies of categorical data. It assesses whether short-term price behavior significantly deviates from historical trends.
Purpose of Chi-Square in the Script:
A high χ² value means that short-term candle distributions are significantly different from historical patterns, indicating potential trend shifts.
If χ² exceeds a predefined significance threshold (chi_threshold), an alert (Chi² Alert!) is triggered.
It helps traders identify periods where recent price behavior deviates from historical norms, possibly signaling trend reversals or market regime changes.
Key Takeaways:
IQV helps measure the diversity of price action, detecting whether the market is balanced or trending.
Chi-square (χ²) identifies significant deviations in short-term price behavior compared to long-term trends.
Both metrics together provide insights into whether the market is stable, trending, or shifting.
The Nasan C-score enhances trend strength by incorporating volatility. It is calculated as:
enhanced_t_s =(𝑡𝑠 × avg_movement x 100)/SMA(𝑐lose)
Key Components:
𝑡𝑠 : Measures trend strength based on price movements relative to EMA.
ts=green_EMAup_a+0.5×red_EMAup_a−(0.5×green_EMAdown_a+red_EMAdown_a)
avg_movement: The SMA of absolute close-open differences, capturing volatility.
Normalization: The division by SMA(close) adjusts the score relative to price levels.
Purpose of the Nasan C-score
Enhanced Trend Strength
It amplifies the trend strength value by factoring in volatility (price movement).
If price volatility is high, trend strength variations have a greater impact.
Volatility-Adjusted Momentum
By scaling 𝑡𝑠 with average movement, the score adjusts to changing price dynamics.
Higher price fluctuations lead to a higher score, making trend shifts more prominent.
How It Can Be Used in Trading
Higher values of Nasan C-score indicate strong bullish or bearish trends.
Comparing it with past values helps determine whether momentum is increasing or fading.
Thresholds can be set to identify significant trend shifts based on historical highs and lows.
Relative Strength Portfolio [AlphaAlgos]🚀 Relative Strength Matrix Portfolio - Advanced Multi-Asset Rotation Strategy
This institutional-grade portfolio rotation system represents a culmination of sophisticated quantitative research methodologies, delivering a comprehensive approach to systematic crypto-asset selection and portfolio management. Through advanced relative strength analysis and multi-factor filtering, the system identifies optimal trading opportunities while maintaining strict risk management protocols.
The Matrix Foundation
At its core, the system employs an intricate relative strength matrix that evaluates each asset against every other asset in the universe through RSI calculations. This creates a robust scoring framework where assets accumulate points based on their relative performance, generating a detailed picture of market leadership and strength. The matrix calculations account for the complex interrelationships between assets, ensuring a thorough understanding of relative performance.
Multi-Factor Filtering Framework
Beyond the foundational matrix, the system incorporates sophisticated filtering mechanisms that analyze multiple aspects of asset behavior:
Alpha and Beta Analysis examines each asset's performance characteristics relative to the broader market, identifying those that demonstrate superior risk-adjusted returns while maintaining favorable volatility profiles.
The GunzoTrendSniper algorithm provides specialized trend analysis, ensuring selected assets maintain positive directional bias. This combines with momentum calculations that evaluate price action characteristics across multiple timeframes.
Risk-adjusted performance metrics including Sharpe, Sortino, and Omega ratios undergo continuous calculation, offering deep insight into the quality of returns. These metrics ensure selected assets not only perform well but do so with favorable risk characteristics.
Market Regime Analysis
The system maintains constant awareness of broader market conditions through analysis of total cryptocurrency market capitalization (TOTAL). This crucial overlay determines whether market conditions warrant active positions or defensive positioning. When market trends or valuations deteriorate beyond critical thresholds, the system enters a protective cash state, preserving capital during adverse conditions.
Scoring Integration
The comprehensive scoring mechanism integrates all analyzed factors into a unified ranking system. Assets must demonstrate strength across multiple categories to qualify for selection, ensuring well-rounded technical characteristics rather than isolated metric strength.
Position Selection & Management
Final asset selection emerges from a rigorous evaluation process where candidates must:
- Rank highly in the relative strength matrix
- Display favorable alpha and beta metrics
- Maintain strong momentum characteristics
- Demonstrate superior risk-adjusted returns
- Pass the GunzoTrendSniper criteria
- Meet minimum threshold requirements across all metrics
Performance Analytics
The sophisticated dashboard provides real-time performance tracking, comparing strategy results against traditional buy-and-hold approaches. This includes:
- Risk-adjusted return metrics
- Maximum drawdown analysis
- Comparative performance ratios
- Real-time equity curves
- Current system state indication
- Active position monitoring
Timeframe Flexibility
While optimized for daily analysis, the system's mathematical framework adapts seamlessly across timeframes. The core logic maintains effectiveness whether deployed for intraday trading or longer-term position management.
Professional Applications
This system serves multiple roles in professional trading environments:
- Portfolio managers seeking systematic rotation strategies
- Risk managers requiring market state evaluation
- Quantitative analysts conducting relative strength assessment
- Long-term investors pursuing systematic exposure
- Active traders requiring comprehensive market analysis
Financial Advisor Disclaimer
This indicator is for informational and educational purposes only and should not be considered financial advice or a recommendation to buy, sell, or hold any investment or security. The creator is not a registered investment advisor. Trading and investing in financial markets carries significant risk, including the potential loss of principal. Past performance does not indicate future results. Users must conduct their own due diligence and consult with licensed financial advisors, accountants, or attorneys for professional advice regarding their specific situation before making any investment decisions. The user assumes all responsibility and liability for their trading and investment decisions.
Majors Rotation [AlphaAlgos]Majors Rotation System
---
Overview
The Majors Rotation System is a trend-following strategy designed to dynamically allocate capital to the strongest-performing assets in the market. By leveraging long-term, medium-term, and equity curve trend filters, this system identifies the top assets and rotates between them based on prevailing market conditions. The system is defaulted for Bitcoin (BTC), Ethereum (ETH), and Solana (SOL) but is fully customizable and can be applied to any asset, trading pair, or asset class across various timeframes.
How It Works
At the core of this strategy are three key trend filters that help determine which assets to allocate capital to:
1. Long-Term Trend Filter:
- The long-term trend filter evaluates the broader market's direction. If the market is in a bullish phase, the system will engage with top assets, while in a bearish phase, it will exit positions to avoid unnecessary risk exposure.
2. Medium-Term Trend Filter:
- This filter assesses the market's momentum over a medium-term period. It ensures that the strategy stays aligned with short-to-medium-term market moves. When positive momentum is detected, the system adjusts its positions accordingly to capture these trends.
3. Equity Curve Trend Filter:
- The system continuously tracks the performance of its portfolio. If the equity curve (the overall portfolio value over time) is trending downward, the system will exit positions to mitigate losses. If the equity curve is trending upward, the system remains active and continues to rotate between top assets based on market strength.
These three filters work together to ensure that the system remains in assets only when market conditions are favorable, avoiding unnecessary risk during downturns while capitalizing on profitable trends.
Flexibility
While the Majors Rotation System is initially set up with BTC, ETH, and SOL, it is fully adaptable. Traders can apply the system to any assets they prefer, whether they’re trading cryptocurrencies, stocks, commodities, or forex. The system is defaulted for the one day timeframe, although, it is designed to be used on any timeframe, making it suitable for both short-term and long-term strategies. This versatility allows users to tailor the system to their specific trading style and asset preferences.
System Features
- Asset Selection and Rotation: The system ranks multiple assets based on the trend filters, allocating capital to the top performers and rotating out of weaker ones.
- Risk Management: Dynamic risk management is integrated, allowing the system to exit positions during unfavorable market conditions, ensuring that capital is only exposed to assets showing strength.
- Performance Metrics: Key metrics such as the Sharpe Ratio, Sortino Ratio, Omega Ratio, and Drawdowns are tracked to provide insight into the system’s performance and risk-adjusted returns.
- Equity Curve Tracking: The system displays the equity curve, allowing users to visualize how the strategy is performing over time and compare it to a simple buy-and-hold strategy.
- Customization: Traders can modify the system’s asset selection to match their trading preferences.
Performance Metrics and Comparison to Buy-and-Hold Bitcoin
The Majors Rotation System tracks several important performance metrics to help traders evaluate its effectiveness:
1. Sharpe Ratio:
- The Sharpe Ratio evaluates the risk-adjusted return, measuring how much excess return the system generates relative to its volatility. A higher Sharpe Ratio indicates that the system is delivering better returns for each unit of risk.
2. Sortino Ratio:
- Similar to the Sharpe Ratio, the Sortino Ratio focuses on downside risk (negative volatility), providing a more accurate measure of how the system generates returns while avoiding significant drawdowns.
3. Omega Ratio:
- The Omega Ratio evaluates both the upside and downside of the system’s performance. It measures the probability of achieving returns higher than a specified threshold, offering a clearer picture of how the strategy manages both risk and reward.
4. Equity Drawdown:
- This metric tracks the peak-to-trough decline in the portfolio’s value. It helps traders understand the worst-case scenario in terms of losses. Lower drawdowns indicate better risk management and smoother performance.
These metrics give traders a clear understanding of the risk-adjusted returns and overall stability of the system. By tracking these figures, traders can assess whether the Majors Rotation System aligns with their investment goals and risk tolerance.
Disclaimer
This script is a technical analysis tool designed to assist with asset rotation and portfolio management. While it uses real-time market data and trend-following strategies to generate asset recommendations, there are no guarantees regarding future performance. The system relies on historical and real-time data, which may not accurately predict future market behavior. Trading and investing inherently involve risk, and past performance is not indicative of future results.
Users should always conduct their own research, use proper risk management strategies, and consult with a qualified financial advisor before making investment decisions. This script is not intended as financial advice and should only be used as part of a broader investment strategy.
LongWave | QuantumResearchQuantumResearch LongWave Indicator
The LongWave Indicator is a comprehensive trend-following system that integrates two universal strategies, two technical indicators, and one on-chain indicator tailored specifically for Bitcoin (BTC).
By blending advanced market dynamics with on-chain insights, this indicator provides precise long and short signals to help traders navigate the market with confidence. 📊🚀
1. Overview
This indicator is designed to:
Identify Market Trends: Combines multiple trend-based methodologies to define clear market directions. 🔄
Leverage On-Chain Data: Utilizes fundamental Bitcoin network activity for enhanced trend validation. ⚡
Provide Customization: Allows users to fine-tune sensitivity, thresholds, and visual preferences. 🎨
2. How It Works
A. Multi-Layer Trend Detection
Two Universal Strategies – These strategies apply proprietary trend-following algorithms to analyze price movements over multiple timeframes. 🕰️
Two Technical Indicators – A combination of statistical smoothing and momentum-based calculations refines trend signals. 📈
One On-Chain Indicator – Analyzes Bitcoin’s market valuation and investor behavior to confirm directional bias. 🏦
B. Trend Score Calculation
Each component contributes to a weighted trend score, ensuring robust and adaptive market assessments. 📊
The final LongWave Score is derived by averaging inputs from the five core systems. ⚖️
C. Dynamic Thresholds & Signal Generation
Long Entry Signal – Triggered when the LongWave Score exceeds the upper threshold, indicating strong bullish momentum. ✅
Short/Cash Signal – Triggered when the LongWave Score drops below the lower threshold, signaling market weakness. ❌
3. Visual Representation
Trend Bar Coloring:
Green Bars – Indicate bullish momentum (Long Signal). ✅
Blue Bars – Indicate bearish momentum (Short/Cash Signal). ❌
Trend Confirmation Line:
A Hull Moving Average (HMA) dynamically shifts color based on market conditions. 📊
Table-Based Signal Dashboard:
Displays real-time trend scores for each component. 🔢
Includes rate of change (ROC) metrics to assess momentum shifts. 🚀
LW signal ligne:
Aligns with the LongWave Score to confirm entry and exit decisions.
4. Customization & Parameters
The LongWave Indicator is designed with high flexibility to adapt to various trading styles:
Threshold Adjustments:
Users can modify long and short thresholds to optimize signal sensitivity. 🎛️
Trend Component Weights:
Custom weighting for each universal strategy and indicator to tailor output precision. ⚙️
On-Chain Sensitivity:
Fine-tune on-chain Z-score parameters to reflect market conditions accurately. 📡
Visual Preferences:
Color Modes: Choose from multiple pre-set themes for enhanced readability. 🎨
5. Trading Applications
Trend Following – Ideal for traders looking to capitalize on extended bullish and bearish trends. 📈
Market Timing – Helps identify optimal entry and exit points with trend-based validation. ⏳
On-Chain Confluence – Merges technical analysis with on-chain insights to confirm directional bias. 🔗
Risk Management – Provides clear buy/cash indications, reducing uncertainty in trading decisions. ⚠️
6. Final Thoughts
The QuantumResearch LongWave Indicator is a high-precision tool designed for trend confirmation, risk mitigation, and market positioning.
By integrating technical and fundamental insights, it offers traders a complete market perspective.
Important Disclaimer: No indicator guarantees future performance. Always use proper risk management and conduct additional research. ⚠️📊
TASC 2025.03 A New Solution, Removing Moving Average Lag█ OVERVIEW
This script implements a novel technique for removing lag from a moving average, as introduced by John Ehlers in the "A New Solution, Removing Moving Average Lag" article featured in the March 2025 edition of TASC's Traders' Tips .
█ CONCEPTS
In his article, Ehlers explains that the average price in a time series represents a statistical estimate for a block of price values, where the estimate is positioned at the block's center on the time axis. In the case of a simple moving average (SMA), the calculation moves the analyzed block along the time axis and computes an average after each new sample. Because the average's position is at the center of each block, the SMA inherently lags behind price changes by half the data length.
As a solution to removing moving average lag, Ehlers proposes a new projected moving average (PMA) . The PMA smooths price data while maintaining responsiveness by calculating a projection of the average using the data's linear regression slope.
The slope of linear regression on a block of financial time series data can be expressed as the covariance between prices and sample points divided by the variance of the sample points. Ehlers derives the PMA by adding this slope across half the data length to the SMA, creating a first-order prediction that substantially reduces lag:
PMA = SMA + Slope * Length / 2
In addition, the article includes methods for calculating predictions of the PMA and the slope based on second-order and fourth-order differences. The formulas for these predictions are as follows:
PredictPMA = PMA + 0.5 * (Slope - Slope ) * Length
PredictSlope = 1.5 * Slope - 0.5 * Slope
Ehlers suggests that crossings between the predictions and the original values can help traders identify timely buy and sell signals.
█ USAGE
This indicator displays the SMA, PMA, and PMA prediction for a specified series in the main chart pane, and it shows the linear regression slope and prediction in a separate pane. Analyzing the difference between the PMA and SMA can help to identify trends. The differences between PMA or slope and its corresponding prediction can indicate turning points and potential trade opportunities.
The SMA plot uses the chart's foreground color, and the PMA and slope plots are blue by default. The plots of the predictions have a green or red hue to signify direction. Additionally, the indicator fills the space between the SMA and PMA with a green or red color gradient based on their differences:
Users can customize the source series, data length, and plot colors via the inputs in the "Settings/Inputs" tab.
█ NOTES FOR Pine Script® CODERS
The article's code implementation uses a loop to calculate all necessary sums for the slope and SMA calculations. Ported into Pine, the implementation is as follows:
pma(float src, int length) =>
float PMA = 0., float SMA = 0., float Slope = 0.
float Sx = 0.0 , float Sy = 0.0
float Sxx = 0.0 , float Syy = 0.0 , float Sxy = 0.0
for count = 1 to length
float src1 = src
Sx += count
Sy += src
Sxx += count * count
Syy += src1 * src1
Sxy += count * src1
Slope := -(length * Sxy - Sx * Sy) / (length * Sxx - Sx * Sx)
SMA := Sy / length
PMA := SMA + Slope * length / 2
However, loops in Pine can be computationally expensive, and the above loop's runtime scales directly with the specified length. Fortunately, Pine's built-in functions often eliminate the need for loops. This indicator implements the following function, which simplifies the process by using the ta.linreg() and ta.sma() functions to calculate equivalent slope and SMA values efficiently:
pma(float src, int length) =>
float Slope = ta.linreg(src, length, 0) - ta.linreg(src, length, 1)
float SMA = ta.sma(src, length)
float PMA = SMA + Slope * length * 0.5
To learn more about loop elimination in Pine, refer to this section of the User Manual's Profiling and optimization page.
Advanced Liquidity Trap & Squeeze Detector [MazzaropiYoussef]DESCRIPTION:
The "Advanced Liquidity Trap & Squeeze Detector" is designed to identify potential liquidity traps, short and long squeezes, and market manipulation based on open interest, funding rates, and aggressive order flow.
KEY FEATURES:
- **Relative Open Interest Normalization**: Avoids scale discrepancies across different timeframes.
- **Liquidity Trap Detection**: Identifies potential bull and bear traps based on open interest and funding imbalances.
- **Squeeze Identification**: Highlights conditions where aggressive buyers or sellers are trapped before a reversal.
- **Volume Surge Confirmation**: Alerts when abnormal volume activity supports liquidity events.
- **Customizable Parameters**: Adjust thresholds to fine-tune detection sensitivity.
HOW IT WORKS:
- **Long Squeeze**: Triggered when relative open interest is high, funding is negative, and aggressive selling occurs.
- **Short Squeeze**: Triggered when relative open interest is high, funding is positive, and aggressive buying occurs.
- **Bull Trap**: Triggered when relative open interest is high, funding is positive, and price crosses above the trend line but fails.
- **Bear Trap**: Triggered when relative open interest is high, funding is negative, and price crosses below the trend line but fails.
USAGE:
- This indicator is useful for traders looking to anticipate reversals and avoid being caught in market manipulation events.
- Works best in combination with order book analysis and volume profile tools.
- Can be applied to crypto, forex, and other leveraged markets.
**/
Stick Sandwich Pattern# Stick Sandwich Pattern Indicator
## Description
The Stick Sandwich Pattern Indicator is a custom TradingView script that identifies specific three-candle patterns in financial markets. The indicator uses a sandwich emoji (🥪) to mark pattern occurrences directly on the chart, making it visually intuitive and easy to spot potential trading opportunities.
## Pattern Types
### Bullish Stick Sandwich
A bullish stick sandwich pattern is identified when:
- First candle: Bullish (close > open)
- Second candle: Bearish (close < open)
- Third candle: Bullish (close > open)
- The closing price of the third candle is within 10% of the first candle's range from its closing price
### Bearish Stick Sandwich
A bearish stick sandwich pattern is identified when:
- First candle: Bearish (close < open)
- Second candle: Bullish (close > open)
- Third candle: Bearish (close < open)
- The closing price of the third candle is within 10% of the first candle's range from its closing price
## Technical Implementation
- Written in Pine Script v5
- Runs as an overlay indicator
- Uses a 10% tolerance range for closing price comparison
- Implements rolling pattern detection over the last 3 candles
- Break statement ensures only the most recent pattern is marked
## Visual Features
- Bullish patterns: Green sandwich emoji above the pattern
- Bearish patterns: Red sandwich emoji below the pattern
- Label size: Small
- Label styles:
- Bullish: Label points upward
- Bearish: Label points downward
## Usage
1. Add the indicator to your TradingView chart
2. Look for sandwich emojis that appear above or below price bars
3. Green emojis indicate potential bullish reversals
4. Red emojis indicate potential bearish reversals
## Code Structure
- Main indicator function with overlay setting
- Two separate functions for pattern detection:
- `bullishStickSandwich()`
- `bearishStickSandwich()`
- Pattern scanning loop that checks the last 3 candles
- Built-in label plotting for visual identification
## Formula Details
The closing price comparison uses the following tolerance calculation:
```
Tolerance = (High - Low of first candle) * 0.1
Valid if: |Close of third candle - Close of first candle| <= Tolerance
```
## Notes
- The indicator marks patterns in real-time as they form
- Only the most recent pattern within the last 3 candles is marked
- Pattern validation includes both candle direction and closing price proximity
- The 10% tolerance helps filter out weak patterns while catching meaningful ones
## Disclaimer
This indicator is for informational purposes only. Always use proper risk management and consider multiple factors when making trading decisions.
ADX with Moving AverageADX with Moving Average is a powerful indicator that enhances trend analysis by combining the standard Average Directional Index (ADX) with a configurable moving average.
The ADX helps traders identify the strength of a trend. In general:
ADX 0-20 – Absent or Weak Trend
ADX 25-50 – Strong Trend
ADX 50-75 – Very Strong Trend
ADX 75-100 – Extremely Strong Trend
By adding a moving average we can judge if the ADX itself is trending upwards or downwards, i.e. if a new trend is emerging or an existing one is weakening.
This combination allows traders to better confirm strong trends and filter out weak or choppy market conditions.
Key Features & Customization:
✔ Configurable DI & ADX Lengths – Adjust how quickly the ADX reacts to price movements (default: 14, 14).
✔ Multiple Moving Average Options – Choose between SMA, EMA, WMA, VWMA, or T3 for trend confirmation.
✔ Custom MA Length – Fine-tune the sensitivity of the moving average to match your strategy.
🔹 Use this indicator to confirm strong trends before entering trades, filter out false signals, or refine existing strategies with a dynamic trend-strength component. 🚀
OI RSI - WuJianDAOOI RSI (Open Interest Relative Strength Index)
Overview: OI RSI is a technical indicator that applies the RSI concept to open interest data.
Key Features:
Traditional vs. OI RSI:
Traditional RSI measures price movements to identify overbought or oversold conditions.
OI RSI computes the relative strength of open interest over a specified period.
Purpose:
Provides insights into market participation and sentiment by evaluating open interest levels.
Application:
Assists traders in detecting potential reversals or confirming trends based on open interest dynamics.