Multi-timeframe Trend & Momentum DashboardMulti-Timeframe Trend & Momentum Dashboard
This indicator is a comprehensive multi-timeframe analysis tool designed for traders who want to quickly assess market trends and momentum across several timeframes. It combines trend detection with duration tracking and displays key information in an easy-to-read on-chart table. Key features include:
Multi-Timeframe Analysis:
Analyzes nine different timeframes (from 1-minute up to 1-week) simultaneously, helping you gauge the overall market trend at a glance.
Trend Detection & Duration:
Uses a combination of a short-term EMA and a long-term SMA to determine whether the market is bullish, bearish, or neutral. It also tracks how long the current trend has persisted in terms of consecutive bars and displays this duration next to each timeframe.
RSI Display & Visual Alerts:
Calculates the RSI for each timeframe. RSI values are color-coded—green when above 50 (indicating bullish momentum) and red when below 50 (indicating bearish conditions). Additionally, if the market is bearish on a particular timeframe while the RSI is above 50, the RSI cell flashes yellow to alert you of a potential trend reversal or divergence.
On-Chart Trend Start Markers:
When a new trend is detected on your current chart’s timeframe, the indicator automatically marks the bar with a label showing the new trend direction, providing a clear visual cue for trend changes.
This powerful tool is perfect for traders looking to combine multi-timeframe trend analysis with momentum indicators, enabling a more informed and dynamic trading strategy. Whether you’re a day trader or swing trader, the Multi-Timeframe Trend & Momentum Dashboard brings clarity to market conditions across multiple time horizons.
차트 패턴
EMA & RSI & MACD & Stochastic sec TTD
---
## **EMA & RSI & MACD – Trend Dashboard by Timeframe**
This script is a **multi-timeframe trend dashboard** that combines several popular technical indicators across key timeframes to give traders a **quick snapshot of trend direction**.
---
### 🔍 **What This Indicator Does**
This indicator visually displays the **trend bias** from five key indicators:
- **EMA 50/200**: Long-term trend (classic golden/death cross logic)
- **EMA 5/7/9**: Short-term trend
- **RSI (14)**: Momentum trend using RSI vs its own 14-SMA
- **MACD**: MACD line vs Signal line
- **EMA 5 vs SMA 14**: A unique short-to-mid-term trend perspective
Each trend is represented by an emoji symbol:
- 🟢 **Uptrend**
- 🔴 **Downtrend**
- ⚫️ **Neutral**
---
### 🕒 **Covered Timeframes**
You can toggle on/off each timeframe as needed:
- 2H
- 3H
- 4H
- 8H
- 12H
- 1D
These are displayed vertically, with trend indicators across columns, so you can spot multi-timeframe confluence easily.
---
### 📊 **Dashboard Features**
- Positioned **on chart** at customizable screen locations (e.g., Middle Right, Bottom Left, etc.)
- **Table color, text size, and emojis** can all be customized in the settings
- **Live updating table** (last bar only) to reduce lag and clutter
---
### 📈 **Calculation Logic**
Each trend indicator is derived as follows:
#### ✅ **EMA 5/7/9 Trend**
- 🟢 if 5 > 7 > 9 (short-term bullish)
- 🔴 if 5 < 7 < 9 (short-term bearish)
- ⚫️ otherwise (neutral)
#### ✅ **EMA 50/200 Trend**
- 🟢 if price > EMA50 > EMA200 (classic bullish)
- 🔴 if price < EMA50 < EMA200 (classic bearish)
- ⚫️ otherwise
#### ✅ **RSI Trend**
- 🟢 if RSI > SMA(RSI)
- 🔴 if RSI < SMA(RSI)
- ⚫️ otherwise
#### ✅ **MACD Trend**
- 🟢 if MACD Line > Signal Line
- 🔴 if MACD Line < Signal Line
- ⚫️ otherwise
#### ✅ **EMA 5 vs SMA 14 Trend**
- 🟢 if EMA5 > SMA14
- 🔴 if EMA5 < SMA14
- ⚫️ otherwise
---
### 🛠️ **Customization**
In the settings panel, users can:
- Show/hide each timeframe
- Change the table's position
- Adjust text size and color
- Customize emoji symbols used for trends
---
### 📌 Use Case
This dashboard is ideal for:
- **Swing traders** and **intraday traders** monitoring multiple timeframes
- Identifying **trend confluence zones** across indicators
- Making quick, high-confidence trading decisions
---
Options Trading Strategy with AlertsTitle: Options Trading Strategy with Buy/Sell Alerts
Description:
This script is designed for day traders and short-term options traders who focus on directional and trend-based trades. It integrates key indicators to identify high-probability entry and exit points for call and put options.
Features & Strategy Logic:
✅ Moving Averages (9 EMA, 21 EMA, 200 EMA) → Identifies short-term and long-term trends.
✅ VWAP (Volume Weighted Average Price) → Tracks institutional buying/selling pressure.
✅ RSI (Relative Strength Index, 14) → Confirms momentum and trend strength.
✅ MACD (12, 26, 9) → Detects shifts in momentum for trend continuation or reversals.
✅ Buy & Sell Alerts → Automatically notifies traders when optimal conditions are met.
How It Works:
• BUY (Call Signal):
• 9 EMA crosses above 21 EMA (bullish momentum).
• Price is above VWAP (institutional buying pressure).
• RSI is above 50 (bullish confirmation).
• MACD is trending upward.
• Trigger: Green “BUY” label appears below the candle.
• SELL (Put Signal):
• 9 EMA crosses below 21 EMA (bearish momentum).
• Price is below VWAP (institutional selling pressure).
• RSI is below 50 (bearish confirmation).
• MACD is trending downward.
• Trigger: Red “SELL” label appears above the candle.
How to Use:
1. Apply the script to 5-minute or 15-minute charts for best results.
2. Look for buy/sell labels and confirm with market context before entering trades.
3. Set alerts to receive real-time notifications when conditions align.
Ideal For:
✔️ Day traders looking for quick, high-probability trades.
✔️ Options traders focusing on directional movement.
✔️ Scalpers and momentum traders who rely on trend confirmation.
🔔 Set up alerts for automated trade notifications and never miss a setup!
2:45 AM Candle High/Low Crossing Bars2:45 AM Candle High/Low Crossing Bars is an indicator that focuses on the trading view 2:45am NY TIME high and low indicating green for buy and red bars for sell, with the 2:45am new york time highlight/ If the next candle sweeps the low we buy while if it sweeps the high we sell, all time zoon must be the new York UTC time.
Kase Permission StochasticOverview
The Kase Permission Stochastic indicator is an advanced momentum oscillator developed from Kase's trading methodology. It offers enhanced signal smoothing and filtering compared to traditional stochastic oscillators, providing clearer entry and exit signals with fewer false triggers.
How It Works
This indicator calculates a specialized stochastic using a multi-stage smoothing process:
Initial stochastic calculation based on high, low, and close prices
Application of weighted moving averages (WMA) for short-term smoothing
Progressive smoothing through differential factors
Final smoothing to reduce noise and highlight significant trend changes
The indicator oscillates between 0 and 100, with two main components:
Main Line (Green): The smoothed stochastic value
Signal Line (Yellow): A further smoothed version of the main line
Signal Generation
Trading signals are generated when the main line crosses the signal line:
Buy Signal (Green Triangle): When the main line crosses above the signal line
Sell Signal (Red Triangle): When the main line crosses below the signal line
Key Features
Multiple Smoothing Algorithms: Uses a combination of weighted and exponential moving averages for superior noise reduction
Clear Visualization: Color-coded lines and background filling
Reference Levels: Horizontal lines at 25, 50, and 75 for context
Customizable Colors: All visual elements can be color-customized
Customization Options
PST Length: Base period for the stochastic calculation (default: 9)
PST X: Multiplier for the lookback period (default: 5)
PST Smooth: Smoothing factor for progressive calculations (default: 3)
Smooth Period: Final smoothing period (default: 10)
Trading Applications
Trend Confirmation: Use crossovers to confirm entries in the direction of the prevailing trend
Reversal Detection: Identify potential market reversals when crossovers occur at extreme levels
Range-Bound Markets: Look for oscillations between overbought and oversold levels
Filter for Other Indicators: Use as a confirmation tool alongside other technical indicators
Best Practices
Most effective in trending markets or during well-defined ranges
Combine with price action analysis for better context
Consider the overall market environment before taking signals
Use longer settings for fewer but higher-quality signals
The Kase Permission Stochastic delivers a sophisticated approach to momentum analysis, offering a refined perspective on market conditions while filtering out much of the noise that affects standard oscillators.
TJR Strategy Ultimate ProAll done — your TJR Strategy Ultimate indicator is now fully coded and live in the canvas.
This version includes:
Liquidity sweeps
OB and FVG zones
Session filter
RSI + multi-timeframe bias
Alerts + webhook formatting
Auto-drawing Entry / SL / TP boxes
Dashboard panel
Previous session highs/lows & equal highs/lows
Momentum Breakout OscillatorUses VIX volatility, MACD, RSI, SMA, VWAP to determine buy and sell. Checks volume, must be beyond a certain threshold (eg. 1.5x regular volume)
yatofxDescription: "Ramon Coto's 3 Session Bar Color" Indicator
This TradingView Pine Script indicator colors candlestick bars based on three custom trading sessions. It allows traders to visually distinguish different market timeframes on their charts.
Features:
Three configurable trading sessions with user-defined time ranges.
Customizable session colors:
Session A → Blue
Session B → Red
Session C → Lime
Enable/disable sessions independently using input toggles.
Automatic session detection: Bars are colored based on the active session.
Optimized for TradingView Mobile & Desktop with clear and efficient logic.
How It Works:
1. User Inputs: The script takes session time ranges and enables/disables each session.
2. Session Detection: The script checks whether the current time falls within any of the defined sessions.
3. Bar Coloring: If a session is active, the corresponding color is applied to the bars.
This indicator helps traders quickly recognize which market session they are in, improving decision-making for session-based strategies.
[TehThomas] - ICT Inversion Fair value Gap (IFVG) The Inversion Fair Value Gap (IFVG) indicator is a powerful tool designed for traders who utilize ICT (Inner Circle Trader) strategies. It focuses on identifying and displaying Inversion Fair Value Gaps, which are critical zones that emerge when traditional Fair Value Gaps (FVGs) are invalidated by price action. These gaps represent key areas where price often reacts, making them essential for identifying potential reversals, trend continuations, and liquidity zones.
What Are Inversion Fair Value Gaps?
Inversion Fair Value Gaps occur when price revisits a traditional FVG and breaks through it, effectively flipping its role in the market. For example:
A bullish FVG that is invalidated becomes a bearish zone, often acting as resistance.
A bearish FVG that is invalidated transforms into a bullish zone, serving as support.
These gaps are significant because they often align with institutional trading activity. They highlight areas where large orders have been executed or where liquidity has been targeted. Understanding these gaps provides traders with a deeper insight into market structure and helps them anticipate future price movements with greater accuracy.
Why This Strategy Works
The IFVG concept is rooted in ICT principles, which emphasize liquidity dynamics, market inefficiencies, and institutional order flow. Traditional FVGs represent imbalances in price action caused by gaps between candles. When these gaps are invalidated, they become inversion zones that can act as magnets for price. These zones frequently serve as high-probability areas for price reversals or trend continuations.
This strategy works because it aligns with how institutional traders operate. Inversion gaps often mark areas of interest for "smart money," making them reliable indicators of potential market turning points. By focusing on these zones, traders can align their strategies with institutional behavior and improve their overall trading edge.
How the Indicator Works
This indicator simplifies the process of identifying and tracking IFVGs by automating their detection and visualization on the chart. It scans the chart in real-time to identify bullish and bearish FVGs that meet user-defined thresholds for inversion. Once identified, these gaps are dynamically displayed on the chart with distinct colors for bullish and bearish zones.
The indicator also tracks whether these gaps are mitigated or broken by price action. When an IFVG is broken, it extends the zone for a user-defined number of bars to visualize its potential role as a new support or resistance level. Additionally, alerts can be enabled to notify traders when new IFVGs form or when existing ones are broken, ensuring timely decision-making in fast-moving markets.
Key Features
Automatic Detection: The indicator automatically identifies bullish and bearish IFVGs based on user-defined thresholds.
Dynamic Visualization: It displays IFVGs directly on the chart with customizable colors for easy differentiation.
Real-Time Updates: The status of each IFVG is updated dynamically based on price action.
Zone Extensions: Broken IFVGs are extended to visualize their potential as support or resistance levels.
Alerts: Notifications can be set up to alert traders when key events occur, such as the formation or breaking of an IFVG.
These features make the tool highly efficient and reduce the need for manual analysis, allowing traders to focus on execution rather than tedious chart work.
Benefits of Using This Indicator
The IFVG indicator offers several advantages that make it an indispensable tool for ICT traders. By automating the detection of inversion gaps, it saves time and reduces errors in analysis. The clearly defined zones improve risk management by providing precise entry points, stop-loss levels, and profit targets based on market structure.
This tool is also highly versatile and adapts seamlessly across different timeframes. Whether you’re scalping lower timeframes or swing trading higher ones, it provides actionable insights tailored to your trading style. Furthermore, by aligning your strategy with institutional logic, you gain a significant edge in anticipating market movements.
Practical Applications
This indicator can be used across various trading styles:
Scalping: Identify quick reversal points on lower timeframes using real-time alerts.
Day Trading: Use inversion gaps as key levels for intraday support/resistance or trend continuation setups.
Swing Trading: Analyse higher timeframes to identify major inversion zones that could act as critical turning points in larger trends.
By integrating this tool into your trading routine, you can streamline your analysis process and focus on executing high-probability setups.
Conclusion
The Inversion Fair Value Gap (IFVG) indicator is more than just a technical analysis tool—it’s a strategic ally for traders looking to refine their edge in the markets. By automating the detection and tracking of inversion gaps based on ICT principles, it simplifies complex market analysis while maintaining accuracy and depth. Whether you’re new to ICT strategies or an experienced trader seeking greater precision, this indicator will elevate your trading game by aligning your approach with institutional behavior.
If you’re serious about improving your trading results while saving time and effort, this tool is an essential addition to your toolkit. It provides clarity in chaotic markets, enhances precision in trade execution, and ensures you never miss critical opportunities in your trading journey.
__________________________________________
Thanks for your support!
If you found this idea helpful or learned something new, drop a like 👍 and leave a comment, I’d love to hear your thoughts! 🚀
Make sure to follow me for more price action insights, free indicators, and trading strategies. Let’s grow and trade smarter together! 📈
Médias Móveis Personalizadas por TipoContains 9, 20, 50, and 200 moving averages and a VWAP, allowing selection between simple and exponential with different colors and more!
Contem medias de 9 20 50 e 200 e uma vwap podendo escolher entre simples e exponencial com diferentes cores e etc!
Fibonacci Circle Zones🟩 The Fibonacci Circle Zones indicator is a technical visualization tool, building upon the concept of traditional Fibonacci circles. It provides configurable options for analyzing geometric relationships between price and time, used to identify potential support and resistance zones derived from circle-based projections. The indicator constructs these Fibonacci circles based on two user-selected anchor points (Point A and Point B), which define the foundational price range and time duration for the geometric analysis.
Key features include multiple mathematical Circle Formulas for radius scaling and several options for defining the circle's center point, enabling exploration of complex, non-linear geometric relationships between price and time distinct from traditional linear Fibonacci analysis. Available formulas incorporate various mathematical constants (π, e, φ variants, Silver Ratio) alongside traditional Fibonacci ratios, facilitating investigation into different scaling hypotheses. Furthermore, selecting the Center point relative to the A-B anchors allows these circular time-price patterns to be constructed and analyzed from different geometric perspectives. Analysis can be further tailored through detailed customization of up to 12 Fibonacci levels, including their mathematical values, colors, and visibility..
📚 THEORY and CONCEPT 📚
Fibonacci circles represent an application of Fibonacci principles within technical analysis, extending beyond typical horizontal price levels by incorporating the dimension of time. These geometric constructions traditionally use numerical proportions, often derived from the Fibonacci sequence, to project potential zones of price-time interaction, such as support or resistance. A theoretical understanding of such geometric tools involves considering several core components: the significance of the chosen geometric origin or center point , the mathematical principles governing the proportional scaling of successive radii, and the fundamental calculation considerations (like chart scale adjustments and base radius definitions) that influence the resulting geometry and ensure its accurate representation.
⨀ Circle Center ⨀
The traditional construction methodology for Fibonacci circles begins with the selection of two significant anchor points on the chart, usually representing a key price swing, such as a swing low (Point A) and a subsequent swing high (Point B), or vice versa. This defined segment establishes the primary vector—representing both the price range and the time duration of that specific market move. From these two points, a base distance or radius is derived (this calculation can vary, sometimes using the vertical price distance, the time duration, or the diagonal distance). A center point for the circles is then typically established, often at the midpoint (time and price) between points A and B, or sometimes anchored directly at point B.
Concentric circles are then projected outwards from this center point. The radii of these successive circles are calculated by multiplying the base distance by key Fibonacci ratios and other standard proportions. The underlying concept posits that markets may exhibit harmonic relationships or cyclical behavior that adheres to these proportions, suggesting these expanding geometric zones could highlight areas where future price movements might decelerate, reverse, or find equilibrium, reflecting a potential proportional resonance with the initial defining swing in both price and time.
The Fibonacci Circle Zones indicator enhances traditional Fibonacci circle construction by offering greater analytical depth and flexibility: it addresses the origin point of the circles: instead of being limited to common definitions like the midpoint or endpoint B, this indicator provides a selection of distinct center point calculations relative to the initial A-B swing. The underlying idea is that the geometric source from which harmonic projections emanate might vary depending on the market structure being analyzed. This flexibility allows for experimentation with different center points (derived algorithmically from the A, B, and midpoint coordinates), facilitating exploration of how price interacts with circular zones anchored from various perspectives within the defining swing.
Potential Center Points Setup : This view shows the anchor points A and B , defined by the user, which form the basis of the calculations. The indicator dynamically calculates various potential Center points ( C through N , and X ) based on the A-B structure, representing different geometric origins available for selection in the settings.
Point X holds particular significance as it represents the calculated midpoint (in both time and price) between A and B. This 'X' point corresponds to the default 'Auto' center setting upon initial application of the indicator and aligns with the centering logic used in TradingView's standard Fibonacci Circle tool, offering a familiar starting point.
The other potential center points allow for exploring circles originating from different geometric anchors relative to the A-B structure. While detailing the precise calculation for each is beyond the scope of this overview, they can be broadly categorized: points C through H are derived from relationships primarily within the A-B time/price range, whereas points I through N represent centers projected beyond point B, extrapolating the A-B geometry. Point J, for example, is calculated as a reflection of the A-X midpoint projected beyond B. This variety provides a rich set of options for analyzing circle patterns originating from historical, midpoint, and extrapolated future anchor perspectives.
Default Settings (Center X, FibCircle) : Using the default Center X (calculated midpoint) with the default FibCircle . Although circles begin plotting only after Point B is established, their curvature shows they are geometrically centered on X. This configuration matches the standard TradingView Fib Circle tool, providing a baseline.
Centering on Endpoint B : Using Point B, the user-defined end of the swing, as the Center . This anchors the circular projections directly to the swing's termination point. Unlike centering on the midpoint (X) or start point (A), this focuses the analysis on geometric expansion originating precisely from the conclusion of the measured A-B move.
Projected Center J : Using the projected Point J as the Center . Its position is calculated based on the A-B swing (conceptually, it represents a forward projection related to the A-X midpoint relationship) and is located chronologically beyond Point B. This type of forward projection often allows complete circles to be visualized as price develops into the corresponding time zone.
Time Symmetry Projection (Center L) : Uses the projected Point L as the Center . It is located at the price level of the start point (A), projected forward in time from B by the full duration of the A-B swing . This perspective focuses analysis on temporal symmetry , exploring geometric expansions from a point representing a full time cycle completion anchored back at the swing's origin price level.
⭕ Circle Formula
Beyond the center point , the expansion of the projected circles is determined by the selected Circle Formula . This setting provides different mathematical methods, or scaling options , for scaling the circle radii. Each option applies a distinct mathematical constant or relationship to the base radius derived from the A-B swing, allowing for exploration of various geometric proportions.
eScaled
Mathematical Basis: Scales the radius by Euler's number ( e ≈ 2.718), the base of natural logarithms. This constant appears frequently in processes involving continuous growth or decay.
Enables investigation of market geometry scaled by e , exploring relationships potentially based on natural exponential growth applied to time-price circles, potentially relevant for analyzing phases of accelerating momentum or volatility expansion.
FibCircle
Mathematical Basis: Scales the radius to align with TradingView’s built-in Fibonacci Circle Tool.
Provides a baseline circle size, potentially emulating scaling used in standard drawing tools, serving as a reference point for comparison with other options.
GoldenFib
Mathematical Basis: Scales the radius by the Golden Ratio (φ ≈ 1.618).
Explores the fundamental Golden Ratio proportion, central to Fibonacci analysis, applied directly to circular time-price geometry, potentially highlighting zones reflecting harmonic expansion or retracement patterns often associated with φ.
GoldenContour
Mathematical Basis: Scales the radius by a factor derived from Golden Ratio geometry (√(1 + φ²) / 2 ≈ 0.951). It represents a specific geometric relationship derived from φ.
Allows analysis using proportions linked to the geometry of the Golden Rectangle, scaled to produce circles very close to the initial base radius. This explores structural relationships often associated with natural balance or proportionality observed in Golden Ratio constructions.
SilverRatio
Mathematical Basis: Scales the radius by the Silver Ratio (1 + √2 ≈ 2.414). The Silver Ratio governs relationships in specific regular polygons and recursive sequences.
Allows exploration using the proportions of the Silver Ratio, offering a significant expansion factor based on another fundamental metallic mean for comparison with φ-based methods.
PhiDecay
Mathematical Basis: Scales the radius by φ raised to the power of -φ (φ⁻ᵠ ≈ 0.53). This unique exponentiation explores a less common, non-linear transformation involving φ.
Explores market geometry scaled by this specific phi-derived factor which is significantly less than 1.0, offering a distinct contractile proportion for analysis, potentially relevant for identifying zones related to consolidation phases or decaying momentum.
PhiSquared
Mathematical Basis: Scales the radius by φ squared, normalized by dividing by 3 (φ² / 3 ≈ 0.873).
Enables investigation of patterns related to the φ² relationship (a key Fibonacci extension concept), visualized at a scale just below 1.0 due to normalization. This scaling explores projections commonly associated with significant trend extension targets in linear Fibonacci analysis, adapted here for circular geometry.
PiScaled
Mathematical Basis: Scales the radius by Pi (π ≈ 3.141).
Explores direct scaling by the fundamental circle constant (π), investigating proportions inherent to circular geometry within the market's time-price structure, potentially highlighting areas related to natural market cycles, rotational symmetry, or full-cycle completions.
PlasticNumber
Mathematical Basis: Scales the radius by the Plastic Number (approx 1.3247), the third metallic mean. Like φ and the Silver Ratio, it is the solution to a specific cubic equation and relates to certain geometric forms.
Introduces another distinct fundamental mathematical constant for geometric exploration, comparing market proportions to those potentially governed by the Plastic Number.
SilverFib
Mathematical Basis: Scales the radius by the reciprocal Golden Ratio (1/φ ≈ 0.618).
Explores proportions directly related to the core 0.618 Fibonacci ratio, fundamental within Fibonacci-based geometric analysis, often significant for identifying primary retracement levels or corrective wave structures within a trend.
Unscaled
Mathematical Basis: No scaling applied.
Provides the base circle defined by points A/B and the Center setting without any additional mathematical scaling, serving as a pure geometric reference based on the A-B structure.
🧪 Advanced Calculation Settings
Two advanced settings allow further refinement of the circle calculations: matching the chart's scale and defining how the base radius is calculated from the A-B swing.
The Chart Scale setting ensures geometric accuracy by aligning circle calculations with the chart's vertical axis display. Price charts can use either a standard (linear) or logarithmic scale, where vertical distances represent price changes differently. The setting offers two options:
Standard : Select this option when the price chart's vertical axis is set to a standard linear scale.
Logarithmic : It is necessary to select this option if the price chart's vertical axis is set to a logarithmic scale. Doing so ensures the indicator adjusts its calculations to maintain correct geometric proportions relative to the visual price action on the log-scaled chart.
The Radius Calc setting determines how the fundamental base radius is derived from the A-B swing, offering two primary options:
Auto : This is the default setting and represents the traditional method for radius calculation. This method bases the radius calculation on the vertical price range of the A-B swing, focusing the geometry on the price amplitude.
Geometric : This setting provides an alternative calculation method, determining the base radius from the diagonal distance between Point A and Point B. It considers both the price change and the time duration relative to the chart's aspect ratio, defining the radius based on the overall magnitude of the A-B price-time vector.
This choice allows the resulting circle geometry to be based either purely on the swing's vertical price range ( Auto ) or on its combined price-time movement ( Geometric ).
🖼️ CHART EXAMPLES 🖼️
Default Behavior (X Center, FibCircle Formula) : This configuration uses the midpoint ( Center X) and the FibCircle scaling Formula , representing the indicator's effective default setup when 'Auto' is selected for both options initially. This is designed to match the output of the standard TradingView Fibonacci Circle drawing tool.
Center B with Unscaled Formula : This example shows the indicator applied to an uptrend with the Center set to Point B and the Circle Formula set to Unscaled . This configuration projects the defined levels (0.236, 0.382, etc.) as arcs originating directly from the swing's termination point (B) without applying any additional mathematical scaling from the formulas.
Visualization with Projected Center J : Here, circles are centered on the projected point J, calculated from the A-B structure but located forward in time from point B. Notice how using this forward-projected origin allows complete inner circles to be drawn once price action develops into that zone, providing a distinct visual representation of the expanding geometric field compared to using earlier anchor points. ( Unscaled formula used in this example).
PhiSquared Scaling from Endpoint B : The PhiSquared scaling Formula applied from the user-defined swing endpoint (Point B). Radii expand based on a normalized relationship with φ² (the square of the Golden Ratio), creating a unique geometric structure and spacing between the circle levels compared to other formulas like Unscaled or GoldenFib .
Centering on Swing Origin (Point A) : Illustrates using Point A, the user-defined start of the swing, as the circle Center . Note the significantly larger scale and wider spacing of the resulting circles. This difference occurs because centering on the swing's origin (A) typically leads to a larger base radius calculation compared to using the midpoint (X) or endpoint (B). ( Unscaled formula used).
Center Point D : Point D, dynamically calculated from the A-B swing, is used as the origin ( Center =D). It is specifically located at the price level of the swing's start point (A) occurring precisely at the time coordinate of the swing's end point (B). This offers a unique perspective, anchoring the geometric expansion to the initial price level at the exact moment the defining swing concludes. ( Unscaled formula shown).
Center Point G : Point G, also dynamically calculated from the A-B swing, is used as the origin ( Center =G). It is located at the price level of the swing's endpoint (B) occurring at the time coordinate of the start point (A). This provides the complementary perspective to Point D, anchoring the geometric expansion to the final price level achieved but originating from the moment the swing began . As observed in the example, using Point G typically results in very wide circle projections due to its position relative to the core A-B action. ( Unscaled formula shown).
Center Point I: Half-Duration Projection : Using the dynamically calculated Point I as the Center . Located at Point B's price level but projected forward in time by half the A-B swing duration , Point I's calculated time coordinate often falls outside the initially visible chart area. As the chart progresses, this origin point will appear, revealing large, sweeping arcs representing geometric expansions based on a half-cycle temporal projection from the swing's endpoint price. ( Unscaled formula shown).
Center Point M : Point M, also dynamically calculated from the A-B swing, serves as the origin ( Center =M). It combines the midpoint price level (derived from X) with a time coordinate projected forward from Point B by the full duration of the A-B swing . This perspective anchors the geometric expansion to the swing's balance price level but originates from the completion point of a full temporal cycle relative to the A-B move. Like other projected centers, using M allows for complete circles to be visualized as price progresses into its time zone. ( SilverFib formula shown).
Geometric Validation & Functionality : Comparing the indicator (red lines), using its default settings ( Center X, FibCircle Formula ), against TradingView's standard Fib Circle tool (green lines/white background). The precise alignment, particularly visible at the 1.50 and 2.00 levels shown, validates the core geometry calculation.
🛠️ CONFIGURATION AND SETTINGS 🛠️
The Fibonacci Circle Zones indicator offers a range of configurable settings to tailor its functionality and visual representation. These options allow customization of the circle origin, scaling method, level visibility, visual appearance, and input points.
Center and Formula
Settings for selecting the circle origin and scaling method.
Center : Dropdown menu to select the origin point for the circles.
Auto : Automatically uses point X (the calculated midpoint between A and B).
Selectable points including start/end (A, B), midpoint (X), plus various points derived from or projected beyond the A-B swing (C-N).
Circle Formula : Dropdown menu to select the mathematical method for scaling circle radii.
Auto : Automatically selects a default formula ('FibCircle' if Center is 'X', 'Unscaled' otherwise).
Includes standard Fibonacci scaling ( FibCircle, GoldenFib ), other mathematical constants ( PiScaled, eScaled ), metallic means ( SilverRatio ), phi transformations ( PhiDecay, PhiSquared ), and others.
Fib Levels
Configuration options for the 12 individual Fibonacci levels.
Advanced Settings
Settings related to core calculation methods.
Radius Calc : Defines how the base radius is calculated (e.g., 'Auto' for vertical price range, 'Geometric' for diagonal price-time distance).
Chart Scale : Aligns circle calculations with the chart's vertical axis setting ('Standard' or 'Logarithmic') for accurate visual proportions.
Visual Settings
Settings controlling the visual display of the indicator elements.
Plots : Dropdown controlling which parts of the calculated circles are displayed ( Upper , All , or Lower ).
Labels : Dropdown controlling the display of the numerical level value labels ( All , Left , Right , or None ).
Setup : Dropdown controlling the visibility of the initial setup graphics ( Show or Hide ).
Info : Dropdown controlling the visibility of the small information table ( Show or Hide ).
Text Size : Adjusts the font size for all text elements displayed by the indicator (Value ranges from 0 to 36).
Line Width : Adjusts the width of the circle plots (1-10).
Time/Price
Inputs for the anchor points defining the base swing.
These settings define the start (Point A) and end (Point B) of the price swing used for all calculations.
Point A (Time, Price) : Input fields for the exact time coordinate and price level of the swing's starting point (A).
Point B (Time, Price) : Input fields for the exact time coordinate and price level of the swing's ending point (B).
Interactive Adjustment : Points A and B can typically be adjusted directly by clicking and dragging their markers on the chart (if 'Setup' is set to 'Show'). Changes update settings automatically.
📝 NOTES 📝
Fibonacci circles begin plotting only once the time corresponding to Point B has passed and is confirmed on the chart. While potential center locations might be visible earlier (as shown in the setup graphic), the final circle calculations require the complete geometry of the A-B swing. This approach ensures that as new price bars form, the circles are accurately rendered based on the finalized A-B relationship and the chosen center and scaling.
The indicator's calculations are anchored to user-defined start (A) and end (B) points on the chart. When switching between charts with significantly different price scales (e.g., from an index at 5,000 to a crypto asset at $0.50), it is typically necessary to adjust these anchor points to ensure the circle elements are correctly positioned and scaled.
⚠️ DISCLAIMER ⚠️
The Fibonacci Circle Zones indicator is a visual analysis tool designed to illustrate Fibonacci relationships through geometric constructions incorporating curved lines, providing a structured framework for identifying potential areas of price interaction. Like all technical and visual indicators, these visual representations may visually align with key price zones in hindsight, reflecting observed price dynamics. It is not intended as a predictive or standalone trading signal indicator.
The indicator calculates levels and projections using user-defined anchor points and Fibonacci ratios. While it aims to align with TradingView’s standard Fibonacci circle tool by employing mathematical and geometric formulas, no guarantee is made that its calculations are identical to TradingView's proprietary methods.
🧠 BEYOND THE CODE 🧠
The Fibonacci Circle Zones indicator, like other xxattaxx indicators , is designed with education and community collaboration in mind. Its open-source nature encourages exploration, experimentation, and the development of new Fibonacci and grid calculation indicators and tools. We hope this indicator serves as a framework and a starting point for future Innovation and discussions.
Imbalance(FVG) DetectorImbalance (FVG) Detector
Overview
The Imbalance (FVG) Detector is a technical analysis tool designed to highlight price inefficiencies by identifying Fair Value Gaps (FVGs). These gaps occur when rapid price movement leaves an area with little to no traded volume, which may later act as a zone of interest. The indicator automatically detects and marks these imbalances on the chart, allowing users to observe historical price behavior more effectively.
Key Features
- Automatic Imbalance Detection: Identifies bullish and bearish imbalances based on a structured three-bar price action model.
- Customizable Sensitivity: Users can adjust the minimum imbalance percentage threshold to tailor detection settings to different assets and market conditions.
- Real-time Visualization: Marked imbalances are displayed as colored boxes directly on the chart.
- Dynamic Box Updates: Imbalance zones extend forward in time until price interacts with them.
- Alert System: Users can set alerts for when new imbalances appear or when price tests an existing imbalance.
How It Works
The indicator identifies market imbalances using a three-bar price structure:
- Bullish Imbalance: Occurs when the high of three bars ago is lower than the low of the previous bar, forming a price gap.
- Bearish Imbalance: Occurs when the low of three bars ago is higher than the high of the previous bar, creating a downward gap.
When an imbalance is detected:
- Green Boxes indicate bullish imbalances.
- Red Boxes indicate bearish imbalances.
- Once price interacts with an imbalance, the box fades to gray, marking it as tested.
! Designed for Crypto Markets
This indicator is particularly useful in crypto markets, where frequent volatility can create price inefficiencies. It provides a structured way to visualize gaps in price movement, helping users analyze historical liquidity areas.
Customization Options
- Min Imbalance Percentage Size: Adjusts the sensitivity of the imbalance detection.
- Alerts: Users can enable alerts to stay notified of new or tested imbalances.
Important Notes
- This indicator is a technical analysis tool and does not provide trading signals or financial advice.
- It does not predict future price movement but highlights historical price inefficiencies.
- Always use this tool alongside other market analysis methods and risk management strategies.
Morning & Evening Star Strategy (1% TP, 0.5% SL)Morning star and evening star indicator which allows you to identify the trader basis on this price action pattern. It is only for education purpose and nothing else
Omar TradingOmar Trading Indicator – Description
The Omar Trading Indicator is a custom-built trading tool designed to identify potential buy signals based on multiple technical analysis factors. This indicator combines several key elements to improve trade accuracy and reliability.
Key Features:
✅ Zero Reversal from the Bottom – Detects price reversals from recent lows.
✅ Liquidity Check – Uses volume analysis to confirm market strength.
✅ MACD Crossover – Identifies bullish momentum when the MACD line crosses above the signal line.
✅ Moving Average Crossover – Confirms trend direction when a fast-moving average crosses a slow-moving average.
✅ Fibonacci Levels – Displays key Fibonacci retracement levels to identify potential support and resistance zones.
How It Works:
• The indicator scans for a zero-level price reversal from recent lows.
• It checks if volume is above the average liquidity level to confirm trade strength.
• A bullish MACD crossover is required to ensure upward momentum.
• A moving average crossover provides additional confirmation.
• Fibonacci retracement levels help traders identify key price zones for entry or exit.
Alerts & Notifications:
• The indicator plots buy signals directly on the chart.
• TradingView alerts can be set up to notify traders when all conditions align.
• Telegram integration allows automatic notifications for trade opportunities.
This tool is ideal for traders looking for a systematic and multi-confirmation approach to identifying potential buy opportunities.
Gold Scalping Basic+This script is the "Basic+ Gold Scalping Strategy," specifically designed for scalping XAUUSD on the 5-minute chart. It combines smart indicator filters with price action logic to help traders identify high-probability entries and exits. The strategy is based on market structure, trend bias, and momentum confirmation, making it ideal for short-term traders who want clarity in fast-moving gold markets.
Key Features:
Trend-based entry signals using price action
Indicator filters to avoid false setups
Works best in volatile conditions
Optimized for 5M timeframe
Includes visual signals for buy/sell zones
Renko Flip MarkerThis script shows on chart where Renko bricks flip for candlestick chart. I intended it for candlestick chart, but it seems to work Renko chart too from my testing so far. You may change the Renko size for your own scenario you're trading. Hopefully helps, Thank you.
Smart Trade By Amit RoyVersion 1.0
An indicator trend refers to the directional movement of a technical indicator over time, helping traders and analysts interpret market momentum, strength, and potential reversals. Indicator trends are commonly used in financial markets to confirm price trends, detect overbought or oversold conditions, and identify divergence patterns.
Volume-Powered S/R TraderThis advanced TradingView indicator combines volume analysis, dynamic support/resistance levels, and technical indicators to identify high-probability trading opportunities. It focuses on detecting institutional-level activity through volume spikes at key price levels.
Key Components
Volume Analysis Engine
Tracks volume spikes (150%+ of 20-period average)
Color-coded volume bars:
Green: Bullish volume spike (high volume + bullish candle)
Red: Bearish volume spike (high volume + bearish candle)
Dynamic Support/Resistance System
Auto-detects swing points using pivot high/low
Maintains rolling arrays of:
Support Levels (green semi-transparent lines)
Resistance Levels (red semi-transparent lines)
Displays only the 5 most recent levels for clarity
Trend Analysis
50-period EMA trend filter
RSI momentum indicator (14-period)
Trend direction classification:
Bullish: EMA rising
Bearish: EMA falling
Setup Venda EMA + RSI📌 Setup Summary
✅ Sell when:
🔻 The price is below the EMAs (9 and 20).
🔻 The price has pulled back to the EMAs before falling again.
🔻 The RSI is below 50 and falling.
🔻 The entry candle closes below the pullback's low.
📌 Stop Loss: Above the EMA 20 or the last high.
📌 Take Profit: At the next support or 1.5x to 2x the stop size.
Multi EMA + VWAP LevelsThis script combines the power of Exponential Moving Averages (EMAs) and VWAPs to give you a clear view of market trends, momentum, and institutional value zones — all in one simple visual layout.
📈 What It Includes:
✅ 4 customizable EMAs:
EMA 20 (Green) – Short-term trend
EMA 50 (Orange) – Mid-term support/resistance
EMA 150 (Red) – Longer trend confirmation
EMA 200 (White) – Institutional level trend direction
✅ 3 VWAPs with toggle control:
Daily VWAP (Purple) – Intraday institutional average
Weekly VWAP (Teal) – Swing-trader reference
Monthly VWAP (Fuchsia) – Macro value zone
🎯 How to Use:
Follow the trend with EMAs — when aligned, trend strength is confirmed.
Use VWAPs as dynamic support/resistance and value areas.
Avoid chasing price — wait for retests near EMAs or VWAP zones.
Combine this with price action or volume signals for precision entries.
💡 Ideal For:
Day traders
Swing traders
Anyone looking to identify key dynamic levels for better entries/exits
Mickey's BBMickey's BB – Smart Reversal Detector with SL Tracking 🔁
This indicator combines the power of Bollinger Bands with engulfing candle patterns to identify high-probability reversal points.
✅ Buy Signal: Triggered when a red candle touches the lower Bollinger Band and is engulfed by a green candle within the next few candles.
✅ Sell Signal: Triggered when a green candle touches the upper Bollinger Band and is engulfed by a red candle within the next few candles.
✅ Smart Lookahead: Scans up to X candles ahead (user-defined) to confirm engulfing reversals — reducing noise in sideways markets.
✅ Dynamic Stop-Loss & Target: Automatically plots SL/TP levels based on user-defined % thresholds.
✅ SL HIT Labels: Highlights exactly when a stop-loss is breached, giving clear visual feedback on trade failures.
✅ Adaptive Market Filter: Signals are only shown when Bollinger Band width exceeds a minimum threshold — filtering out weak/noise signals in low volatility.
🔍 Ideal for reversal traders, scalpers, and those who love combining price action with volatility-based setups.
🛠️ Customizable Parameters:
SMA Period & Std Dev Multiplier (for BB)
SL/Target % levels
Engulf Lookahead range
Minimum BB width to filter signals
🎯 Build it into your strategy, set alerts, or just use it visually to time your entries and exits with clarity.
PunkAlgo Oscillator [1.0]//@version=5
indicator(title='PunkAlgo Oscillator ', shorttitle='Punk Oscillator')
n1 = input(4, 'Channel Length')
n2 = input(15, 'Average Length')
obLevel1 = input(88, 'Over Bought Level 1')
obLevel2 = input(81, 'Over Bought Level 2')
osLevel1 = input(-83, 'Over Sold Level 1')
osLevel2 = input(-76, 'Over Sold Level 2')
ap = hlc3
esa = ta.ema(ap, n1)
d = ta.ema(math.abs(ap - esa), n1)
ci = (ap - esa) / (0.015 * d)
tci = ta.ema(ci, n2)
wt1 = tci
wt2 = ta.sma(wt1, 4)
var indbot=0
var indtop=0
if wt1 > wt2 and wt1 < wt2
indbot := bar_index
if wt1 < wt2 and wt1 > wt2
indtop := bar_index
bott = bar_index - indbot
topp = bar_index - indtop
// Histogram
lookbackPeriod = input(35, "Lookback Period")
// Calculate the percentage change in price for each bar
priceChange = close - close
priceChangePercentage = priceChange / close * 100
// Calculate the average volume over the lookback period
averageVolume = ta.ema(volume, lookbackPeriod)
// Initialize the counters for upward and downward trends
upwardTrends = 0
downwardTrends = 0
// Iterate over the lookback period and count the number of upward and downward trends
for i = 1 to lookbackPeriod
if priceChangePercentage > 0
upwardTrends := upwardTrends + 1
else if priceChangePercentage < 0
downwardTrends := downwardTrends + 1
// Calculate the probabilities of upward, downward, and neutral trends
totalTrends = upwardTrends + downwardTrends
probabilityUpward = math.round(upwardTrends / totalTrends, 2) * 100
probabilityDownward = math.round(downwardTrends / totalTrends, 2) * 100
// Determine the probability trend based on the probabilities
probabilityTrend = ""
if probabilityUpward > probabilityDownward
probabilityTrend := "Upward"
else if probabilityUpward < probabilityDownward
probabilityTrend := "Downward"
// Calculate the oscillator value based on the difference between upward and downward trends
oscillatorValue = probabilityUpward - probabilityDownward
// Determine the histogram color based on the difference between the oscillator value and zero line
histogramColor = oscillatorValue >= 0 ? (oscillatorValue < oscillatorValue ? color.new(#089981, 50) : color.new(#089981, 50)) : (oscillatorValue < oscillatorValue ? color.new(#f23645, 50) : color.new(#f23645, 50))
// Smoothning the Histogram
smooth_hist = input.bool(true, "Smoothen Histogram", inline="smooth_hist")
smoothning_scale = input.int(defval=3, title="", minval=1, maxval=10, step=1, inline="smooth_hist")
smooth_len = smoothning_scale * 2
smooth_hist_val = smooth_hist ? ta.ema(oscillatorValue, smooth_len) : oscillatorValue
// Plot the histogram
plot(smooth_hist_val, color=histogramColor, style=plot.style_area, linewidth=1, title="Probability Histogram")
// Histogram
plot(0, color=color.new(#787b86, 100))
top1 = plot(obLevel1, color=color.new(#4caf4f, 100))
top2 = plot(osLevel1, color=color.new(#ff5252, 100))
bottom1 = plot(obLevel2, color=color.new(#4caf4f, 100))
bottom2 = plot(osLevel2, color=color.new(#ff5252, 100))
fill(plot1=top1, plot2=bottom1, color=wt2 > 0 and (wt1 - wt2) > 0 ? #089981 : wt2 > 0 or (wt1 - wt2) > 0 ?color.new(#363a45, 60) : color.new(#363a45, 70))
fill(plot1=top2, plot2=bottom2, color=wt2 < 0 and (wt1 - wt2) < 0 ? #f23645 : wt2 < 0 or (wt1 - wt2) < 0 ? color.new(#363a45, 60) : color.new(#363a45, 70))
plot1 = plot(wt1, color=wt1 > wt2 ? color.new(color.green, 0) : color.gray ,title="Signal")
plot2 = plot(wt2, color=color.new(#ff5252, 100),title="Signal Dots")
fill(plot1=plot1, plot2=plot2, color=wt1 > wt2 ? color.rgb(8, 153, 129, 80) : color.rgb(120, 123, 134, 80),title="Signal Shadow")
plot(ta.cross(wt1, wt2) ? wt2 : na, color=color.new(color.black, 0), style=plot.style_circles, linewidth=3,title="Dot Shadows")
plot(ta.cross(wt1, wt2) ? wt2 : na, color=wt2 - wt1 > 0 ? color.gray : color.green , style=plot.style_circles, linewidth=2)
// Divergences Module
tsi1 = wt1
tsi2 = ta.sma(wt2, 4)
long = n1
short = n2
signal22 = n2
price = hlc3
src2 = hlc3
src = hlc3
input_src = tsi1
// Divergences Options
up = ta.rma(math.max(ta.change(src), 0), short)
down = ta.rma(-math.min(ta.change(src), 0), short)
lbR = input(title='Divergence Pivot Lookback Right', defval=1)
lbL = input(title='Divergence Pivot Lookback Left', defval=5)
rangeUpper = input(title='Max of Lookback Range', defval=100)
rangeLower = input(title='Min of Lookback Range', defval=2)
plotBull = input(title='Plot Bullish', defval=true)
plotHiddenBull = input(title='Plot Hidden Bullish', defval=false)
plotBear = input(title='Plot Bearish', defval=true)
plotHiddenBear = input(title='Plot Hidden Bearish', defval=false)
bearColor = color.new(#f23645, 10)
bullColor = color.new(#2157f3, 10)
hiddenBullColor = color.new(color.aqua, 0)
hiddenBearColor = color.new(color.orange, 0)
textColor = color.new(color.white, 0)
noneColor = color.new(color.white, 100)
osc = tsi1
plFound = na(ta.pivotlow(osc, lbL, lbR)) ? false : true
phFound = na(ta.pivothigh(osc, lbL, lbR)) ? false : true
_inRange(cond) =>
bars = ta.barssince(cond == true)
rangeLower <= bars and bars <= rangeUpper
//------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low
oscHL = osc > ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Lower Low
priceLL = low < ta.valuewhen(plFound, low , 1)
bullCond = plotBull and priceLL and oscHL and plFound
plot(plFound ? osc : na, offset=-lbR, title='Regular Bullish', linewidth=1, color=bullCond ? bullColor : noneColor, transp=0)
//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low
oscLL = osc < ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Higher Low
priceHL = low > ta.valuewhen(plFound, low , 1)
hiddenBullCond = plotHiddenBull and priceHL and oscLL and plFound
plot(plFound ? osc : na, offset=-lbR, title='Hidden Bullish', linewidth=1, color=hiddenBullCond ? hiddenBullColor : noneColor, transp=0)
//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High
oscLH = osc < ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Higher High
priceHH = high > ta.valuewhen(phFound, high , 1)
bearCond = plotBear and priceHH and oscLH and phFound
plot(phFound ? osc : na, offset=-lbR, title='Regular Bearish', linewidth=1, color=bearCond ? bearColor : noneColor, transp=0)
//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High
oscHH = osc > ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Lower High
priceLH = high < ta.valuewhen(phFound, high , 1)
hiddenBearCond = plotHiddenBear and priceLH and oscHH and phFound
plot(phFound ? osc : na, offset=-lbR, title='Hidden Bearish', linewidth=1, color=hiddenBearCond ? hiddenBearColor : noneColor, transp=0)
// Signals Module
string TT_HARSI = 'Period for the RSI calculations used to generate the' + 'candles. This seperate from the RSI plot/histogram length.'
string TT_PBIAS = 'Smoothing feature for the OPEN of the HARSI candles.' + ' Increases bias toward the prior open value which can' + ' help provide better visualisation of trend strength.' + ' ** By changing the Open values, High and Low can also' + ' be distorted - however Close will remain unchanged.'
string TT_SMRSI = 'This option smoothes the RSI in a manner similar to HA' + ' open, but uses the realtime rsi rather than the prior' + ' close value.'
string TT_STOCH = 'Uses the RSI generated by the above settings, and as such' + ' will be affected by the smoothing option.'
string TT_STFIT = 'Adjusts the vertical scaling of the stochastic, can help' + ' to prevent distortion of other data in the channel.' + ' Has no impact cross conditions.'
////////////////////////////////////////////////////////////////////////////////
// //
// ====== INPUTS ====== //
// //
////////////////////////////////////////////////////////////////////////////////
// -- Candle config
string GROUP_CAND = 'Config » HARSI Candles'
i_lenHARSI = input.int(10, 'Length', group=GROUP_CAND, minval=1, tooltip=TT_HARSI)
i_smoothing = input.int(5, 'Open Smoothing', group=GROUP_CAND, minval=1, maxval=100, tooltip=TT_PBIAS)
string INLINE_COL = 'Colour Pallette'
i_colUp = input.color(color.teal, 'Colour Pallette ', group=GROUP_CAND, inline=INLINE_COL)
i_colDown = input.color(color.red, ' ', group=GROUP_CAND, inline=INLINE_COL)
i_colWick = input.color(color.gray, ' ', group=GROUP_CAND, inline=INLINE_COL)
// -- RSI plot config
string GROUP_PLOT = 'Config » RSI Plot'
i_source = input.source(ohlc4, 'Source', group=GROUP_PLOT)
i_lenRSI = input.int(7, 'Length', group=GROUP_PLOT, minval=1)
i_mode = input.bool(true, 'Smoothed Mode RSI?', group=GROUP_PLOT, tooltip=TT_SMRSI)
i_showPlot = input.bool(true, 'Show RSI Plot?', group=GROUP_PLOT)
i_showHist = input.bool(true, 'Show RSI Histogram?', group=GROUP_PLOT)
// -- Channel OB/OS config
string GROUP_CHAN = 'Config » OB/OS Boundaries'
i_upper = input.int(50, 'OB', group=GROUP_CHAN, inline='OB', minval=1, maxval=50)
i_upperx = input.int(30, 'OB Extreme', group=GROUP_CHAN, inline='OB', minval=1, maxval=50)
i_lower = input.int(-50, 'OS', group=GROUP_CHAN, inline='OS', minval=-50, maxval=-1)
i_lowerx = input.int(-30, 'OS Extreme', group=GROUP_CHAN, inline='OS', minval=-50, maxval=-1)
// Settins
// WaveTrend
wwttShow = input(false, title='Show WaveTrend')
wwttBuyShow = input(true, title='Show Buy dots')
wwttGoldShow = input(true, title='Show Gold dots')
wwttSellShow = input(true, title='Show Sell dots')
wwttDivShow = input(true, title='Show Div. dots')
vwapShow = input(true, title='Show Fast wwtt')
wwttChannelLen = input(9, title='wwtt Channel Length')
wwttAverageLen = input(12, title='wwtt Average Length')
wwttMASource = input(hlc3, title='wwtt MA Source')
wwttMALen = input(3, title='wwtt MA Length')
// WaveTrend Overbought & Oversold lines
OOBBLevel = input(53, title='wwtt Overbought Level 1')
OOBBLevel2 = input(60, title='wwtt Overbought Level 2')
OOBBLevel3 = input(100, title='wwtt Overbought Level 3')
oosLevel = input(-53, title='wwtt Oversold Level 1')
oosLevel2 = input(-60, title='wwtt Oversold Level 2')
oosLevel3 = input(-75, title='wwtt Oversold Level 3')
// Divergence wwtt
wwttShowDiv = input(true, title='Show wwtt Regular Divergences')
wwttShowHiddenDiv = input(false, title='Show wwtt Hidden Divergences')
showHiddenDiv_nl = input(true, title='Not apply OB/OS Limits on Hidden Divergences')
wwttDivOOBBLevel = input(45, title='wwtt Bearish Divergence min')
wwttDivoosLevel = input(-65, title='wwtt Bullish Divergence min')
// Divergence extra range
wwttDivOOBBLevel_addshow = input(true, title='Show 2nd wwtt Regular Divergences')
wwttDivOOBBLevel_add = input(15, title='wwtt 2nd Bearish Divergence')
wwttDivoosLevel_add = input(-40, title='wwtt 2nd Bullish Divergence 15 min')
// RSI+MFI
rsiMFIShow = input(true, title='Show MFI')
rsiMFIperiod = input(60, title='MFI Period')
rsiMFIMultiplier = input.float(150, title='MFI Area multiplier')
rsiMFIPosY = input(2.5, title='MFI Area Y Pos')
// RSI
rsiShow = input(false, title='Show RSI')
rsiSRC = input(close, title='RSI Source')
rsiLen = input(14, title='RSI Length')
rsiOversold = input.int(30, title='RSI Oversold', minval=29, maxval=100)
rsiOverbought = input.int(60, title='RSI Overbought', minval=0, maxval=60)
// Divergence RSI
rsiShowDiv = input(false, title='Show RSI Regular Divergences')
rsiShowHiddenDiv = input(false, title='Show RSI Hidden Divergences')
rsiDivOOBBLevel = input(60, title='RSI Bearish Divergence min')
rsiDivoosLevel = input(30, title='RSI Bullish Divergence min')
// Colors
colorRed = #ff0000
colorPurple = #e600e6
colorGreen = #3fff00
colorOrange = #e2a400
colorYellow = #ffe500
colorWhite = #ffffff
colorPink = #ff00f0
colorBluelight = #31c0ff
colorwwtt1 = #49536195
colorwwtt2 = #7b9fd596
colorwwtt2_ = #131722
colormacdwwtt1a = #4caf58
colormacdwwtt1b = #af4c4c
colormacdwwtt1c = #7ee57e
colormacdwwtt1d = #ff3535
colormacdwwtt2a = #305630
colormacdwwtt2b = #310101
colormacdwwtt2c = #132213
colormacdwwtt2d = #770000
////////////////////////////////////////////////////////////////////////////////
// //
// ====== FUNCTIONS ====== //
// //
////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
// zero median rsi helper function, just subtracts 50.
f_zrsi(_source, _length) =>
ta.rsi(_source, _length) - 50
// zero median stoch helper function, subtracts 50 and includes % scaling
f_zstoch(_source, _length, _smooth, _scale) =>
float _zstoch = ta.stoch(_source, _source, _source, _length) - 50
float _smoothed = ta.sma(_zstoch, _smooth)
float _scaled = _smoothed / 100 * _scale
_scaled
// mode selectable rsi function for standard, or smoothed output
f_rsi(_source, _length, _mode) =>
// get base rsi
float _zrsi = f_zrsi(_source, _length)
// smoothing in a manner similar to HA open, but rather using the realtime
// rsi in place of the prior close value.
var float _smoothed = na
_smoothed := na(_smoothed ) ? _zrsi : (_smoothed + _zrsi) / 2
// return the requested mode
_mode ? _smoothed : _zrsi
// RSI Heikin-Ashi generation function
f_rsiHeikinAshi(_length) =>
// get close rsi
float _closeRSI = f_zrsi(close, _length)
// emulate "open" simply by taking the previous close rsi value
float _openRSI = nz(_closeRSI , _closeRSI)
// the high and low are tricky, because unlike "high" and "low" by
// themselves, the RSI results can overlap each other. So first we just go
// ahead and get the raw results for high and low, and then..
float _highRSI_raw = f_zrsi(high, _length)
float _lowRSI_raw = f_zrsi(low, _length)
// ..make sure we use the highest for high, and lowest for low
float _highRSI = math.max(_highRSI_raw, _lowRSI_raw)
float _lowRSI = math.min(_highRSI_raw, _lowRSI_raw)
// ha calculation for close
float _close = (_openRSI + _highRSI + _lowRSI + _closeRSI) / 4
// ha calculation for open, standard, and smoothed/lagged
var float _open = na
_open := na(_open ) ? (_openRSI + _closeRSI) / 2 : (_open * i_smoothing + _close ) / (i_smoothing + 1)
// ha high and low min-max selections
float _high = math.max(_highRSI, math.max(_open, _close))
float _low = math.min(_lowRSI, math.min(_open, _close))
// return the OHLC values
// Divergences
f_top_fractal(src) =>
src < src and src < src and src > src and src > src
f_bot_fractal(src) =>
src > src and src > src and src < src and src < src
f_fractalize(src) =>
f_top_fractal(src) ? 1 : f_bot_fractal(src) ? -1 : 0
f_findDivs(src, topLimit, botLimit, useLimits) =>
fractalTop = f_fractalize(src) > 0 and (useLimits ? src >= topLimit : true) ? src : na
fractalBot = f_fractalize(src) < 0 and (useLimits ? src <= botLimit : true) ? src : na
highPrev = ta.valuewhen(fractalTop, src , 0)
highPrice = ta.valuewhen(fractalTop, high , 0)
lowPrev = ta.valuewhen(fractalBot, src , 0)
lowPrice = ta.valuewhen(fractalBot, low , 0)
bearSignal = fractalTop and high > highPrice and src < highPrev
bullSignal = fractalBot and low < lowPrice and src > lowPrev
bearDivHidden = fractalTop and high < highPrice and src > highPrev
bullDivHidden = fractalBot and low > lowPrice and src < lowPrev
// RSI+MFI
f_rsimfi(_period, _multiplier, _tf) =>
request.security(syminfo.tickerid, _tf, ta.sma((close - open) / (high - low) * _multiplier, _period) - rsiMFIPosY)
// WaveTrend
f_wavetrend(src, chlen, avg, malen, tf) =>
tfsrc = request.security(syminfo.tickerid, tf, src)
esa = ta.ema(tfsrc, chlen)
de = ta.ema(math.abs(tfsrc - esa), chlen)
ci = (tfsrc - esa) / (0.015 * de)
wwtt1 = request.security(syminfo.tickerid, tf, ta.ema(ci, avg))
wwtt2 = request.security(syminfo.tickerid, tf, ta.sma(wwtt1, malen))
wwttVwap = wwtt1 - wwtt2
wwttOversold = wwtt2 <= oosLevel
wwttOverbought = wwtt2 >= OOBBLevel
wwttCross = ta.cross(wwtt1, wwtt2)
wwttCrossUp = wwtt2 - wwtt1 <= 0
wwttCrossDown = wwtt2 - wwtt1 >= 0
wwttCrosslast = ta.cross(wwtt1 , wwtt2 )
wwttCrossUplast = wwtt2 - wwtt1 <= 0
wwttCrossDownlast = wwtt2 - wwtt1 >= 0
// MACD
f_macd(src, fastlen, slowlen, sigsmooth, tf) =>
fast_ma = request.security(syminfo.tickerid, tf, ta.ema(src, fastlen))
slow_ma = request.security(syminfo.tickerid, tf, ta.ema(src, slowlen))
macd = fast_ma - slow_ma
signal = request.security(syminfo.tickerid, tf, ta.sma(macd, sigsmooth))
hist = macd - signal
// Get higher timeframe candle
f_getTFCandle(_tf) =>
_open = request.security(ticker.heikinashi(syminfo.tickerid), _tf, open, barmerge.gaps_off, barmerge.lookahead_on)
_close = request.security(ticker.heikinashi(syminfo.tickerid), _tf, close, barmerge.gaps_off, barmerge.lookahead_on)
_high = request.security(ticker.heikinashi(syminfo.tickerid), _tf, high, barmerge.gaps_off, barmerge.lookahead_on)
_low = request.security(ticker.heikinashi(syminfo.tickerid), _tf, low, barmerge.gaps_off, barmerge.lookahead_on)
hl2 = (_high + _low) / 2.0
newBar = ta.change(_open)
candleBodyDir = _close > _open
////////////////////////////////////////////////////////////////////////////////
// //
// ====== SERIES, LINES and LABELS ====== //
// //
////////////////////////////////////////////////////////////////////////////////
// CALCULATE INDICATORS {
// RSI
rsi = ta.rsi(rsiSRC, rsiLen)
rsiColor = rsi <= rsiOversold ? colorGreen : rsi >= rsiOverbought ? colorRed : colorPurple
// Calculates WaveTrend
= f_wavetrend(wwttMASource, wwttChannelLen, wwttAverageLen, wwttMALen, timeframe.period)
// wwtt Divergences
= f_findDivs(wwtt2, wwttDivOOBBLevel, wwttDivoosLevel, true)
= f_findDivs(wwtt2, wwttDivOOBBLevel_add, wwttDivoosLevel_add, true)
= f_findDivs(wwtt2, 0, 0, false)
wwttBearDivHidden_ = showHiddenDiv_nl ? wwttBearDivHidden_nl : wwttBearDivHidden
wwttBullDivHidden_ = showHiddenDiv_nl ? wwttBullDivHidden_nl : wwttBullDivHidden
wwttBearDivColor = wwttShowDiv and wwttBearDiv or wwttShowHiddenDiv and wwttBearDivHidden_ ? colorRed : na
wwttBullDivColor = wwttShowDiv and wwttBullDiv or wwttShowHiddenDiv and wwttBullDivHidden_ ? colorGreen : na
wwttBearDivColor_add = wwttShowDiv and wwttDivOOBBLevel_addshow and wwttBearDiv_add or wwttShowHiddenDiv and wwttDivOOBBLevel_addshow and wwttBearDivHidden_add ? #9a0202 : na
wwttBullDivColor_add = wwttShowDiv and wwttDivOOBBLevel_addshow and wwttBullDiv_add or wwttShowHiddenDiv and wwttDivOOBBLevel_addshow and wwttBullDivHidden_add ? #1b5e20 : na
// RSI Divergences
= f_findDivs(rsi, rsiDivOOBBLevel, rsiDivoosLevel, true)
= f_findDivs(rsi, 0, 0, false)
rsiBearDivHidden_ = showHiddenDiv_nl ? rsiBearDivHidden_nl : rsiBearDivHidden
rsiBullDivHidden_ = showHiddenDiv_nl ? rsiBullDivHidden_nl : rsiBullDivHidden
rsiBearDivColor = rsiShowDiv and rsiBearDiv or rsiShowHiddenDiv and rsiBearDivHidden_ ? colorRed : na
rsiBullDivColor = rsiShowDiv and rsiBullDiv or rsiShowHiddenDiv and rsiBullDivHidden_ ? colorGreen : na
// Buy signal.
buySignal = wwttCross and wwttCrossUp and wwttOversold
buySignalDiv = wwttShowDiv and wwttBullDiv or wwttShowDiv and wwttBullDiv_add or rsiShowDiv and rsiBullDiv
buySignalDiv_color = wwttBullDiv ? colorGreen : wwttBullDiv_add ? color.new(colorGreen, 60) : rsiShowDiv ? colorGreen : na
// Sell signal
sellSignal = wwttCross and wwttCrossDown and wwttOverbought
sellSignalDiv = wwttShowDiv and wwttBearDiv or wwttShowDiv and wwttBearDiv_add or rsiShowDiv and rsiBearDiv
sellSignalDiv_color = wwttBearDiv ? colorRed : wwttBearDiv_add ? color.new(colorRed, 60) : rsiBearDiv ? colorRed : na
// standard, or ha smoothed rsi for the line plot and/or histogram
float RSI = f_rsi(i_source, i_lenRSI, i_mode)
// get OHLC values to use in the plotcandle()
= f_rsiHeikinAshi(i_lenHARSI)
// shadow, invisible
color colShadow = color.rgb(0, 0, 0, 100)
color colNone = color.rgb(0, 0, 0, 100)
// rsi color
//color colRSI = RSI >=30 ? color.red : color.gray
color colRSI = RSI < -31 ? color.lime : RSI > 31 ? color.red : color.gray
cross_up = RSI > 30
cross_down = RSI < -30
// candle body colouring
color bodyColour = C > O ? i_colUp : i_colDown
color wickColour = i_colWick
////////////////////////////////////////////////////////////////////////////////
// //
// ====== DRAWING and PLOTTING ====== //
// //
////////////////////////////////////////////////////////////////////////////////
plotchar(cross_down and wwttBuyShow and buySignal ? -107 : na, title='Buy circle', char='·', color=color.new(colorGreen, 10), location=location.absolute, size=size.small)
plotchar(cross_up and wwttSellShow and sellSignal ? 105 : na, title='Sell circle', char='·', color=color.new(colorRed, 10), location=location.absolute, size=size.small)
plotchar(cross_down and wwttDivShow and buySignalDiv and wwttBuyShow and buySignal ? -106 : na, title='Divergence buy circle', char='▲', color=buySignalDiv_color, location=location.absolute, size=size.tiny, offset=-2, transp=10)
plotchar(cross_up and wwttDivShow and sellSignalDiv and wwttSellShow and sellSignal ? 106 : na, title='Divergence sell circle', char='▼', color=sellSignalDiv_color, location=location.absolute, size=size.tiny, offset=-2, transp=10)
//Alerts
alertcondition((cross_down and wwttBuyShow and buySignal and wwttDivShow and buySignalDiv) or (cross_up and wwttSellShow and sellSignal and wwttDivShow and sellSignalDiv), title='Buy/Sell Signal', message='Buy/Sell Signal')