Buscar en scripts para "bear"
RSI in Bull and Bear Market V2.0RSI oversold at 60/40 in bullish market
And Overbought at 40/60 in Bearish market
for more info of this Strategy
Bull Power Strategy Backtest Bull Power Indicator
To get more information please see "Bull And Bear Balance Indicator"
by Vadim Gimelfarb.
1337 VolumeThis volume indicator gives you a unique perspective and ability to analyze volume in any market. The upper line that is always >=0 represents average up volume over a user definable period while the lower line that is always <= 0 represents the average down volume over a user definable period.
green == bullish candle but volume lower than average
lime == bullish candle with above average volume
crimson == bearish candle with below average volume
red == bearish candle with above average volume
This indicator is very useful for spotting bottoms / tops (do a visual backtest and observe its behavior) as well as entry opportunities.
By default, the lookback period for average volume is 7, but I encourage you to change this value in order to find settings that work best for your particular market.
If you have any feedback or ideas for improvement, please comment.
Enjoy :D
PPO Bull/Bear Divergence to High/Low StrategyA simple strategy that uses the PPO divergences to open trades and the highs/lows to close them. Credit to Pekipek for this PPO Divergence indicator (I changed the visuals a bit)
STRATEGY
Purple circle - bullish divergence - enter LONG
Orange circle - bearish divergence - enter SHORT
Green dot - high point - exit LONG
Red dot - low point - exit SHORT
That's it. Not very profitable, but I like Pekipek's indicator a lot so figured I'd see what a strategy was like. Would love to see any variations.
Super Envolvente (Bullish y Bearish)Identificador de Super-envolventes (SE), se encarga de darle un color verde a la SE alzista (Bullish) verde y rojo a la bajista (Bearish).
[NM]Improved Linear Regression Bull and Bear Power v02Hi guys, I'm back with a little improvement on the Bull and Bear Signal I published just last week thanks to some feedback I received from a couple of users, which is of course highly appreciated.
Here are the changes that have been implemented compared to v01 :
(version 1 is the top indicator, version 2 is the bottom one) in the chart above
Formula adapted to calculate the signal if no data is available for either bull or bear
Added the possibility to smoothen the signal using Arnaud Legroux Moving Average (the benefit of this is that it does not add any lag to the signal)
Zero line was added
If you have any further ideas on how to improve the indicator or if you are happy with it and want to share your settings or rules of engagement, please feel free to share them below.
Oh, and don't forget to click that like button ! :)
Candlestick Patterns Identified (updated 3/11/15)I decided to republish this one without the trend filter and with all the major symbols active. This will allow for all the patterns to show up.
Due to 15 different candlestick formations in this one script, it will be difficult to turn off the last few due to screen size. You can turn off individual patterns on the settings screen.
I have everything spelled out except the hammer and inverted hammer. They are "H" and "IH" respectively on the charts. They show up so often that they cluttered the charts.
The default script has: Doji, Evening Star, Morning Star, Shooting Star, Hammer, Inverted Hammer, Bearish Harami, Bullish Harami, Bearish Engulfing, Bullish Engulfing, Piercing Line, Bullish Belt, Bullish Kicker, Bearish Kicker, Hanging man, and Dark Cloud Cover. You can turn off what you don't like. The Piercing Line, Bullish Belt, and the Kickers will usually show up better in the daily charts.
I recommend watching videos with Stephen Bigalow to get a feel for how to trade these. You will want to add an 8 EMA to your chart with his setups. Enjoy.
If you want the old version: Take a look at the related ideas below.
Candlesticks Patterns IdentifiedI was using another script that colored the bars to show the different candle patterns. Thanks to HPotter (www.tradingview.com). Unfortunately, I can't think that fast when looking across a screen of charts with different color bars. Fortunately, Tradingview came up with symbols and names on 2/26/15. I decided to take my favorite symbols and attach them to a name. This makes it easier to see what is going on and where your entry would be if it confirms. Works beautifully for me. Decided to share. I also added the ability to alter what shows up based upon a look back. A bullish engulfing at the top of a trend, or a bearish harami at the bottom of the trend, is nearly useless and clutters the chart. I have the default set for the open of the current bar to be higher or lower than the open from 5 bars back. You can adjust in the settings to what you like. This trend setting is on all the patterns except doji. If you want to see all the candle patterns, set it to "1".
The doji can be adjusted as well. I left some other patterns at the bottom of the script, but they are turned off. They became too much of a clutter for me. I prefer DovCaspi's pattern finder for hammers and stars: I use his due to the clean appearance.
The default script has: Doji, Bearish Harami, Bullish Harami, Bearish Engulfing, Bullish Engulfing, Piercing Line, Bullish Belt, Bullish Kicker, and Bearish Kicker. You can turn off what you don't like. The Piercing Line, Bullish Belt, and the Kickers will usually show up better in the daily charts.
If you would like the updated version, see the Related Ideas below:
Custom Indicator Clearly Shows If Bulls or Bears are in Control!The Two Versions of this Indicator I learned from Two Famous and Highly Successful Traders. This Indicator shows With No Lag Clear Up and Down Trends in Market by Documenting Clearly If Bulls or Bears are in Control. The Version In SubChart 1 Shows Consecutive Closes if the Current Close is Greater than of Less than the Midpoint of the Previous Bar (Why Midpoint Explained in Detail in 1st Post). The Version in SubChart 2 Shows Consecutive Closes that are Greater than or Less Than the Previous Close (Will Discuss Specific Uses in 1st Post). Works on Stocks, Forex, Futures, on All Timeframes.
Keltner Channel v2 - Auto highlighting of Bull/Bear trendsPlease do not use the previous version (), I was using wrong colors for Bull/Bear there.
All options configurable.
Reversals are marked using crosses. as well as highlighted using green/red color (depending on bull/bear). Enjoy!
Keltner Channel with auto highlighting of Bear/Bull reversals*** New version @ ****
All options configurable.
Reversals are marked using crosses. as well as highlighted using green/red color (depending on bull/bear). Enjoy!
Bearish signal using Point of Control (POC) with PAC by guruThis indicator code helps traders identify potential sell opportunities using several important technical indicators:
Point of Control (POC) – This is the price level where the most volume was traded over the past several days.
Previous Day's Low – This shows the lowest price reached during the previous day.
PAC (Price Action Channel) EMA – These are two moving averages (one based on the low price and one based on the close price) that help determine if the price is trending within a certain range.
Volume SMA – This is a 3-day simple moving average (SMA) of volume, which helps filter out signals based on market activity.
What the Script Does:
Point of Control (POC):
The script looks at the last 50 days (configurable) and calculates which price level had the highest trading volume.
It then plots a red line on the chart at the POC level. This is important because it helps identify areas where there was strong market interest in the past.
Volume Moving Average:
The script calculates a 3-day SMA of volume, but it excludes the current day to avoid premature signals based on today’s trading.
The volume SMA is used to ensure there’s enough market activity (with a threshold set to 25 units) before triggering a sell signal.
Price Action Channel (PAC) EMA:
The PAC consists of two exponential moving averages (EMAs):
The PAC Low EMA: This is based on the low prices over the last 34 periods (configurable).
The PAC Close EMA: This is based on the closing prices over the last 34 periods.
These EMAs help determine if the price is trending above or below certain price levels.
Sell Signal Logic: The script checks three conditions before displaying a "Sell" signal:
Price Below POC and Previous Day’s Low:
The close price must be below both the Point of Control (POC) and the previous day's low.
Volume SMA Above 25:
The 3-day volume SMA must be greater than 25. This ensures the signal only triggers when there’s enough trading volume in the market.
Today’s Low is Above PAC EMAs:
Today's low price must be above both the PAC low EMA and the PAC close EMA. This prevents sell signals when prices are already significantly below the PAC, indicating possible exhaustion in the downtrend.
If all three conditions are met, the script will display a red "Sell" label on the chart, signaling a potential selling opportunity.
No Sell Signal if Price Reverses:
If the price crosses back above the POC or the previous day's low, the script will remove the sell signal and reset for a new opportunity.
Summary of Conditions:
For the script to display a "Sell" label:
The close price must be below the Point of Control (POC) and the previous day’s low.
The 3-day volume SMA (excluding today) must be greater than 25 units.
The low price of the current day must be above both the PAC low EMA and the PAC close EMA.
If these conditions are met, a red sell label appears on the chart as a potential signal for a short (sell) trade.
Mythical EMAs + Dynamic VWAP BandThis indicator titled "Mythical EMAs + Dynamic VWAP Band." It overlays several volatility-adjusted Exponential Moving Averages (EMAs) on the chart, along with a Volume Weighted Average Price (VWAP) line and a dynamic band around it.
Additionally, it uses background coloring (clouds) to visualize bullish or bearish trends, with intensity modulated by the price's position relative to the VWAP.
The EMAs are themed with mythical names (e.g., Hermes for the 9-period EMA), but this is just stylistic flavoring and doesn't affect functionality.
I'll break it down section by section, explaining what each part does, how it works, and its purpose in the context of technical analysis. This indicator is designed for traders to identify trends, momentum, and price fairness relative to volume-weighted averages, with volatility adjustments to make the EMAs more responsive in volatile markets.
### 1. **Volatility Calculation (ATR)**
```pine
atrLength = 14
volatility = ta.atr(atrLength)
```
- **What it does**: Calculates the Average True Range (ATR) over 14 periods (a common default). ATR measures market volatility by averaging the true range (the greatest of: high-low, |high-previous close|, |low-previous close|).
- **Purpose**: This volatility value is used later to dynamically adjust the EMAs, making them more sensitive in high-volatility conditions (e.g., during market swings) and smoother in low-volatility periods. It helps the indicator adapt to changing market environments rather than using static EMAs.
### 2. **Custom Mythical EMA Function**
```pine
mythical_ema(src, length, base_alpha, vol_factor) =>
alpha = (2 / (length + 1)) * base_alpha * (1 + vol_factor * (volatility / src))
ema = 0.0
ema := na(ema ) ? src : alpha * src + (1 - alpha) * ema
ema
```
- **What it does**: Defines a custom function to compute a modified EMA.
- It starts with the standard EMA smoothing factor formula: `2 / (length + 1)`.
- Multiplies it by a `base_alpha` (a user-defined multiplier to tweak responsiveness).
- Adjusts further for volatility: Adds a term `(1 + vol_factor * (volatility / src))`, where `vol_factor` scales the impact, and `volatility / src` normalizes ATR relative to the source price (making it scale-invariant).
- The EMA is then calculated recursively: If the previous EMA is NA (e.g., at the start), it uses the current source value; otherwise, it weights the current source by `alpha` and the prior EMA by `(1 - alpha)`.
- **Purpose**: This creates "adaptive" EMAs that react faster in volatile markets (higher alpha when volatility is high relative to price) without overreacting in calm periods. It's an enhancement over standard EMAs, which use fixed alphas and can lag in choppy conditions. The mythical theme is just naming—functionally, it's a volatility-weighted EMA.
### 3. **Calculating the EMAs**
```pine
ema9 = mythical_ema(close, 9, 1.2, 0.5) // Hermes - quick & nimble
ema20 = mythical_ema(close, 20, 1.0, 0.3) // Apollo - short-term foresight
ema50 = mythical_ema(close, 50, 0.9, 0.2) // Athena - wise strategist
ema100 = mythical_ema(close, 100, 0.8, 0.1) // Zeus - powerful oversight
ema200 = mythical_ema(close, 200, 0.7, 0.05) // Kronos - long-term patience
```
- **What it does**: Applies the custom EMA function to the close price with varying lengths (9, 20, 50, 100, 200 periods), base alphas (decreasing from 1.2 to 0.7 for longer periods to make shorter ones more responsive), and volatility factors (decreasing from 0.5 to 0.05 to reduce volatility influence on longer-term EMAs).
- **Purpose**: These form a multi-timeframe EMA ribbon:
- Shorter EMAs (e.g., 9 and 20) capture short-term momentum.
- Longer ones (e.g., 200) show long-term trends.
- Crossovers (e.g., short EMA crossing above long EMA) can signal buy/sell opportunities. The volatility adjustment makes them "mythical" by adding dynamism, potentially improving signal quality in real markets.
### 4. **VWAP Calculation**
```pine
vwap_val = ta.vwap(close) // VWAP based on close price
```
- **What it does**: Computes the Volume Weighted Average Price (VWAP) using the built-in `ta.vwap` function, anchored to the close price. VWAP is the average price weighted by volume over the session (resets daily by default in Pine Script).
- **Purpose**: VWAP acts as a benchmark for "fair value." Prices above VWAP suggest bullishness (buyers in control), below indicate bearishness (sellers dominant). It's commonly used by institutional traders to assess entry/exit points.
### 5. **Plotting EMAs and VWAP**
```pine
plot(ema9, color=color.fuchsia, title='EMA 9 (Hermes)')
plot(ema20, color=color.red, title='EMA 20 (Apollo)')
plot(ema50, color=color.orange, title='EMA 50 (Athena)')
plot(ema100, color=color.aqua, title='EMA 100 (Zeus)')
plot(ema200, color=color.blue, title='EMA 200 (Kronos)')
plot(vwap_val, color=color.yellow, linewidth=2, title='VWAP')
```
- **What it does**: Overlays the EMAs and VWAP on the chart with distinct colors and titles for easy identification in TradingView's legend.
- **Purpose**: Visualizes the EMA ribbon and VWAP line. Traders can watch for EMA alignments (e.g., all sloping up for uptrend) or price interactions with VWAP.
### 6. **Dynamic VWAP Band**
```pine
band_pct = 0.005
vwap_upper = vwap_val * (1 + band_pct)
vwap_lower = vwap_val * (1 - band_pct)
p1 = plot(vwap_upper, color=color.new(color.yellow, 0), title="VWAP Upper Band")
p2 = plot(vwap_lower, color=color.new(color.yellow, 0), title="VWAP Lower Band")
fill_color = close >= vwap_val ? color.new(color.green, 80) : color.new(color.red, 80)
fill(p1, p2, color=fill_color, title="Dynamic VWAP Band")
```
- **What it does**: Creates a band ±0.5% around the VWAP.
- Plots the upper/lower bands with full transparency (color opacity 0, so lines are invisible).
- Fills the area between them dynamically: Semi-transparent green (opacity 80) if close ≥ VWAP (bullish bias), red if below (bearish bias).
- **Purpose**: Highlights deviations from VWAP visually. The color change provides an at-a-glance sentiment indicator—green for "above fair value" (potential strength), red for "below" (potential weakness). The narrow band (0.5%) focuses on short-term fairness, and the fill makes it easier to spot than just the line.
### 7. **Trend Clouds with VWAP Interaction**
```pine
bullish = ema9 > ema20 and ema20 > ema50
bearish = ema9 < ema20 and ema20 < ema50
bullish_above_vwap = bullish and close > vwap_val
bullish_below_vwap = bullish and close <= vwap_val
bearish_below_vwap = bearish and close < vwap_val
bearish_above_vwap = bearish and close >= vwap_val
bgcolor(bullish_above_vwap ? color.new(color.green, 50) : na, title="Bullish Above VWAP")
bgcolor(bullish_below_vwap ? color.new(color.green, 80) : na, title="Bullish Below VWAP")
bgcolor(bearish_below_vwap ? color.new(color.red, 50) : na, title="Bearish Below VWAP")
bgcolor(bearish_above_vwap ? color.new(color.red, 80) : na, title="Bearish Above VWAP")
```
- **What it does**: Defines trend conditions based on EMA alignments:
- Bullish: Shorter EMAs stacked above longer ones (9 > 20 > 50, indicating upward momentum).
- Bearish: The opposite (downward momentum).
- Sub-conditions combine with VWAP: E.g., bullish_above_vwap is true only if bullish and price > VWAP.
- Applies background colors (bgcolor) to the entire chart pane:
- Strong bullish (above VWAP): Green with opacity 50 (less transparent, more intense).
- Weak bullish (below VWAP): Green with opacity 80 (more transparent, less intense).
- Strong bearish (below VWAP): Red with opacity 50.
- Weak bearish (above VWAP): Red with opacity 80.
- If no condition matches, no color (na).
- **Purpose**: Creates "clouds" for trend visualization, enhanced by VWAP context. This helps traders confirm trends—e.g., a strong bullish cloud (darker green) suggests a high-conviction uptrend when price is above VWAP. The varying opacity differentiates signal strength: Darker for aligned conditions (trend + VWAP agreement), lighter for misaligned (potential weakening or reversal).
### Overall Indicator Usage and Limitations
- **How to use it**: Add this to a TradingView chart (e.g., stocks, crypto, forex). Look for EMA crossovers, price bouncing off EMAs/VWAP, or cloud color changes as signals. Bullish clouds with price above VWAP might signal buys; bearish below for sells.
- **Strengths**: Combines momentum (EMAs), volume (VWAP), and volatility adaptation for a multi-layered view. Dynamic colors make it intuitive.
- **Limitations**:
- EMAs lag in ranging markets; volatility adjustment helps but doesn't eliminate whipsaws.
- VWAP resets daily (standard behavior), so it's best for intraday/session trading.
- No alerts or inputs for customization (e.g., changeable lengths)—it's hardcoded.
- Performance depends on the asset/timeframe; backtest before using.
- **License**: Mozilla Public License 2.0, so it's open-source and modifiable.
Scalper Pro Pattern Recognition & Price ActionOVERVIEW
Scalper Pro is a comprehensive multi-timeframe trading indicator that combines Smart Money Concepts (SMC) with traditional technical analysis to provide scalpers and day traders with high-probability entry and exit signals. This indicator integrates multiple analytical frameworks into a unified visual system designed specifically for short-term trading strategies.
ORIGINALITY & PURPOSE
What Makes This Script Original
This script is not a simple mashup of existing indicators. Instead, it represents a carefully orchestrated integration of complementary analytical methods that work together to solve a specific problem: identifying high-probability scalping opportunities in volatile markets.
The unique value proposition:
Adaptive Trend Filtering System - Combines a customized SuperTrend algorithm with dual-period range filters (Cirrus Cloud) and Hull Moving Average trend cloud to create a three-layer trend confirmation system
Smart Money Concepts Integration - Incorporates institutional trading concepts (Order Blocks, Fair Value Gaps, Break of Structure) with retail technical indicators for a complete market structure view
Dynamic Risk Management - Automatically calculates stop-loss and take-profit levels based on ATR volatility, providing objective position sizing
ADX-Based Market Regime Detection - Identifies ranging vs. trending markets through ADX analysis with visual bar coloring to prevent whipsaws during consolidation
Why Combine These Specific Components
Each component addresses a specific weakness in scalping:
SuperTrend provides the primary directional bias but can generate false signals in ranging markets
Range Filters smooth out noise and confirm trend direction, reducing SuperTrend false positives
ADX Analysis prevents trading during low-volatility consolidation when most indicators fail
SMC Elements identify institutional activity zones where price is likely to react strongly
ATR-Based Risk Management adapts position sizing to current volatility conditions
The synergy creates a system where signals are only generated when multiple confirmation layers align, significantly reducing false signals common in single-indicator approaches.
HOW IT WORKS
Core Calculation Methodology
1. SuperTrend Signal Generation
The script uses a modified SuperTrend algorithm with the following calculation:
ATR = Average True Range (default: 10 periods)
Factor = 7 (default sensitivity multiplier)
Upper Band = Source + (Factor × ATR)
Lower Band = Source - (Factor × ATR)
Directional Logic:
When price crosses above SuperTrend → Bullish signal
When price crosses below SuperTrend → Bearish signal
SuperTrend value is plotted as dynamic support/resistance
Key Modification: The sensitivity parameter (nsensitivity * 7) allows users to adjust the aggressiveness of trend detection without changing the core ATR calculation.
2. Range Filter System (Cirrus Cloud)
The Range Filter uses a smoothed range calculation to filter out market noise:
Smooth Range Calculation:
WPER = (Period × 2) - 1
AVRNG = EMA(|Price - Price |, Period)
Smooth Range = EMA(AVRNG, WPER) × Multiplier
Two-Layer System:
Layer 1: 22-period with 6x multiplier (broader trend)
Layer 2: 15-period with 5x multiplier (tighter price action)
Visual Output: The space between these two filters is colored:
Green fill = Bullish trend (Layer 1 > Layer 2)
Red fill = Bearish trend (Layer 1 < Layer 2)
This creates a "cloud" that expands during strong trends and contracts during consolidation.
3. ADX Market Regime Detection
Calculation:
+DM = Positive Directional Movement
-DM = Negative Directional Movement
True Range = RMA of True Range (15 periods)
+DI = 100 × RMA(+DM, 15) / True Range
-DI = 100 × RMA(-DM, 15) / True Range
ADX = 100 × RMA(|+DI - -DI| / (+DI + -DI), 15)
Threshold System:
ADX < Threshold (default 15) = Ranging market → Bar color changes to purple
ADX > Threshold = Trending market → Normal bar coloring applies
Purpose: This prevents taking trend-following signals during sideways markets where most indicators produce whipsaws.
4. Smart Money Concepts (SMC) Integration
Order Blocks (OB):
Identified using swing high/low detection with customizable pivot length
Bullish OB: Last down-close candle before bullish Break of Structure (BOS)
Bearish OB: Last up-close candle before bearish BOS
Extended forward until price breaks through them
Fair Value Gaps (FVG):
Detected when a three-candle gap exists:
Bullish FVG: Low > High
Bearish FVG: High < Low
Filtered by price delta percentage to ensure significant gaps
Displayed as boxes that delete when price fills the gap
Break of Structure (BOS) vs. Change of Character (CHoCH):
BOS = Price breaks the previous structural high/low in the current trend direction
CHoCH = Price breaks structure in the opposite direction (potential trend reversal)
Both internal (minor) and swing (major) structures are tracked
Equal Highs/Lows (EQH/EQL):
Detected when consecutive swing highs/lows are within ATR threshold
Often indicates liquidity pools that price may sweep before reversing
5. ATR-Based Risk Management
Calculation:
ATR Band = ATR(14) × Risk Multiplier (default 3%)
Stop Loss = Entry - ATR Band (for longs) or Entry + ATR Band (for shorts)
Take Profit Levels:
TP1 = Entry + (Entry - Stop Loss) × 1
TP2 = Entry + (Entry - Stop Loss) × 2
TP3 = Entry + (Entry - Stop Loss) × 3
Dynamic Labels: Stop loss and take profit levels are automatically calculated and displayed as labels on the chart when new signals trigger.
6. Hull Moving Average Trend Cloud
HMA = WMA(2 × WMA(Close, Period/2) - WMA(Close, Period), sqrt(Period))
Period = 600 bars (long-term trend)
The HMA provides a smoothed long-term trend reference that's more responsive than traditional moving averages while filtering out short-term noise.
HOW TO USE THE INDICATOR
Entry Signals
Primary Buy Signal:
SuperTrend changes to green (price crosses above)
ADX shows market is NOT ranging (bars are NOT purple)
Price is within or near a bullish Order Block OR bullish FVG
Cirrus Cloud shows green fill (Layer 1 > Layer 2)
Primary Sell Signal:
SuperTrend changes to red (price crosses below)
ADX shows market is NOT ranging
Price is within or near a bearish Order Block OR bearish FVG
Cirrus Cloud shows red fill (Layer 1 < Layer 2)
Confirmation Layers
Higher Probability Trades Include:
Bullish/Bearish BOS in the same direction as signal
Equal highs/lows being swept before entry
Price respecting premium/discount zones (above/below equilibrium)
Multiple timeframe alignment (use MTF settings)
Exit Strategy
The indicator provides three take-profit levels:
TP1: Conservative target (1:1 risk-reward)
TP2: Moderate target (2:1 risk-reward)
TP3: Aggressive target (3:1 risk-reward)
Suggested Exit Approach:
Close 1/3 position at TP1
Move stop to breakeven
Close 1/3 position at TP2
Trail remaining position or exit at TP3
Risk Management
Stop Loss:
Use the ATR-based stop loss level displayed on chart
Alternatively, use percentage-based stop (adjustable in settings)
Never risk more than 1-2% of account per trade
Position Sizing:
Position Size = (Account Risk $) / (Entry Price - Stop Loss Price)
CUSTOMIZABLE SETTINGS
Core Parameters
Buy/Sell Signals:
Toggle signals on/off
Adjust SuperTrend sensitivity (0.5 - 2.0)
Risk Management:
Show/hide TP/SL levels
ATR period (default: 14)
Risk percentage (default: 3%)
Number of decimal places for price labels
Trend Features:
Cirrus Cloud display toggle
Range filter periods (x1, x2, x3, x4)
Hull MA length for trend cloud
Smart Money Concepts:
Order Block settings (swing length, display count)
Fair Value Gap parameters (auto-threshold, extend length)
Structure detection (internal vs swing)
EQH/EQL threshold
ADX Settings:
ADX length (default: 15)
Sideways threshold (10-30, default: 15)
Bar color toggle
Display Options:
Previous day/week/month high/low levels
Premium/Discount/Equilibrium zones
Trend candle coloring (colored or monochrome)
BEST PRACTICES & TRADING TIPS
Optimal Use Cases
Scalping on lower timeframes (1m, 5m, 15m)
Rapid entry/exit with clear TP levels
ADX filter prevents choppy market entries
Day trading on medium timeframes (30m, 1H)
Stronger trend confirmation
Better risk-reward ratios
Swing trading entries on higher timeframes (4H, Daily)
Higher-probability structural setups
Larger ATR-based stops accommodate volatility
Market Conditions
Best Performance:
Trending markets with clear directional bias
Post-news volatility with defined structure
Markets respecting support/resistance levels
Avoid Trading When:
ADX indicator shows purple bars (ranging market)
Multiple conflicting signals across timeframes
Major news events without clear price structure
Low volume periods (market open/close)
Common Mistakes to Avoid
Ignoring the ADX filter - Taking signals during ranging markets leads to whipsaws
Not waiting for confirmation - Enter only when multiple layers align
Overtrading - Fewer high-quality setups outperform many mediocre ones
Ignoring risk management - Always use the calculated stop losses
Fighting the trend - Trade WITH the SuperTrend and Cirrus Cloud direction
TECHNICAL SPECIFICATIONS
Indicator Type: Overlay (plots on price chart)
Calculation Resources:
Max labels: 500
Max lines: 500
Max boxes: 500
Max bars back: 500
Pine Script Version: 5
Compatible Timeframes: All timeframes (optimized for 1m to 1D)
Compatible Instruments:
Forex pairs
Crypto assets
Stock indices
Individual stocks
Commodities
THEORETICAL FOUNDATION
Trend-Following Concepts
This indicator is based on the principle that markets trend more often than they range, and that trends tend to persist. The SuperTrend component captures this momentum while the range filters prevent premature entries during pullbacks.
Smart Money Theory
The SMC elements are based on the concept that institutional traders (banks, hedge funds) leave footprints in the form of:
Order Blocks: Areas where large orders were placed
Fair Value Gaps: Inefficient price movements that may be revisited
Liquidity Sweeps: Stop hunts before continuation (EQH/EQL)
Volatility-Based Position Sizing
Using ATR for stop-loss placement ensures that stop distances adapt to current market conditions:
Tight stops in low volatility (avoids excessive risk)
Wider stops in high volatility (avoids premature stop-outs)
PERFORMANCE EXPECTATIONS
Realistic Expectations
Win Rate:
Expected: 45-55% (trend-following systems rarely exceed 60%)
Higher win rates on trending days
Lower win rates during consolidation (even with ADX filter)
Risk-Reward Ratio:
Target: 1.5:1 minimum (TP2)
Achievable: 2:1 to 3:1 on strong trends
Drawdowns:
Normal: 10-15% of account during choppy periods
Maximum: Should not exceed 20% with proper risk management
Optimization Tips
Backtesting Recommendations:
Test on at least 1 year of historical data
Include different market conditions (trending, ranging, volatile)
Adjust SuperTrend sensitivity per instrument
Optimize ADX threshold for your specific market
Record trades to identify personal execution errors
FREQUENTLY ASKED QUESTIONS
Q: Can I use this for automated trading?
A: The indicator provides signals, but you'll need to code a strategy script separately for automation. The signals can trigger alerts that connect to trading bots.
Q: Why do I see conflicting signals?
A: This is normal during transition periods. Wait for all confirmation layers to align before entering.
Q: How often should I expect signals?
A: Depends on timeframe and market conditions. On 5m charts during trending markets: 3-7 quality setups per session.
Q: Can I use only some features?
A: Yes, all components can be toggled on/off. However, the system works best with all confirmations active.
Q: What's the difference between internal and swing structures?
A: Internal = minor price structures (smaller pivots). Swing = major price structures (larger pivots). Both provide different levels of confirmation.
DISCLAIMER
This indicator is a tool for technical analysis and should not be the sole basis for trading decisions. Past performance does not guarantee future results. Always:
Use proper risk management
Test on demo accounts first
Never risk more than you can afford to lose
Combine with fundamental analysis when applicable
Understand that no indicator is 100% accurate
License: Mozilla Public License 2.0
Author: DrFXGOD
VERSION HISTORY & UPDATES
Initial Release - Version 1.0
Integrated SuperTrend, Range Filters, ADX, SMC concepts
ATR-based risk management
Multi-timeframe support
Customizable visual elements
SUPPORT & DOCUMENTATION
For questions, suggestions, or bug reports, please comment on the script page or contact the author through TradingView.
Additional Resources:
Smart Money Concepts: Research ICT (Inner Circle Trader) materials
ATR and Volatility: Refer to Wilder's original ATR documentation
SuperTrend Indicator: Study original SuperTrend strategy papers
ICT First Presented FVG with Volume Imbalance [1st P. FVG + VI]The indicator identifies and highlights the first presented Fair Value Gap (FVG) occurringthe morning (09:30–10:00) and afternoon (13:30–14:00) session's first 30 minutes. It includes an optional feature to extend FVG zones when a volume imbalance (V.I.) is detected, providing additional context for areas of potential price inefficiency. This powerful combination helps traders identify significant market structure gaps that often act as support/resistance zones and potential price targets.
What is an FVG?
A Fair Value Gap, often abbreviated as FVG, is a price range on a chart where there is an inefficiency or imbalance in trading. This typically happens when price moves rapidly in one direction, leaving a gap between the wicks or bodies of three consecutive candles. For example, in a bullish move, if the low of the third candle is higher than the high of the first candle, the space between them is the FVG.
What is a Volume Imbalance?
A volume imbalance is a smaller, more precise inefficiency within price action, often visible as a "crack" or thin area in the price delivery. It represents a spot where the volume traded was not balanced between buyers and sellers, often seen as a thin wick or a gap between candle bodies.
FVG + Volume Imbalance:
When you have a fair value gap that contains a volume imbalance, it becomes a more significant area of interest. ICT teaches that you should not ignore a volume imbalance if it’s part of an FVG. In fact, you should use the volume imbalance in conjunction with the FVG to define your trading range more accurately
📊 Volume Imbalance Integration
Toggle Option: Enable/disable volume imbalance detection based on preference
Extended Boundaries: When enabled, FVG boundaries expand to include volume imbalance zones
Accurate Gap Sizing: Total gap calculation includes volume imbalance extensions
Multi-Scenario Support: Handles volume imbalances at start, end, or both sides of FVG formations
📈 Multiple Display Modes
Current Day: Shows only today's FVGs for clean chart analysis
Current Week: Displays all weekly FVGs for broader context
Forward Extension: Extends FVG boxes and CE, Upper/Lower Quadrant lines into the future
📊 Visualization
Bullish FVGs appear in semi-transparent blue or purple zones (depending on session).
Bearish FVGs appear in red or orange zones.
Optional dotted lines mark the CE (midpoint) of each FVG for additional reference.
Quadrant Division: Additional 25%/75% lines for large FVGs (configurable minimum gap size)
🎯 Smart Filtering
First Presentation Only: Only displays the initial FVG in each session, avoiding clutter
Minimum Gap Size: Configurable tick-based thresholds for AM and PM sessions
Core FVG Validation: Ensures only valid Fair Value Gaps are displayed
⚙️ Configuration Options
Display Settings
Show Mode: Current Day or Current Week view
Forward Extension: 1-500 bars projection
Day Labels: Toggle weekday labels in weekly mode
Text Color: Customizable label colors
Volume Imbalance Settings
Include Volume Imbalance: Master toggle for enhanced boundary calculation
Automatic Detection: Identifies imbalance scenarios without additional input
Session-Specific Settings
AM Session (09:30-10:00):
Enable/disable AM FVG detection
Customizable bullish/bearish colors
CE line visibility and coloring
Minimum gap size in ticks
PM Session (13:30-14:00):
Enable/disable PM FVG detection
Customizable bullish/bearish colors
CE line visibility and coloring
Minimum gap size in ticks
Quadrant Settings
Enable/Disable: Toggle quadrant line display
Minimum Gap: Tick threshold for quadrant activation
Line Style: Dotted, dashed, or solid
Color: Customizable quadrant line color
How It Works
FVG Boundary Calculation
Traditional FVG: High to Low (bullish) or Low to High (bearish)
Enhanced FVG: Extended boundaries to include volume imbalance zones when enabled
Total Gap Size: Calculated including any volume imbalance extensions
Volume Imbalance Detection
The indicator identifies volume imbalances by detecting bars where:
Bullish Imbalance: Current bar's body is completely above previous bar's body
Bearish Imbalance: Current bar's body is completely below previous bar's body
⚠️ Disclaimer
This script is a technical visualization tool only.
It does not provide financial advice, signals, or predictions. Always perform independent analysis and manage risk appropriately before making trading decisions.
Multi-Timeframe SFP (Swing Failure Pattern)How to Use
1. Set Pivot Timeframe: Choose the timeframe for identifying major swing points (e.g., 'D' for Daily pivots).
2. Set SFP Timeframe: Choose the timeframe to find the SFP candle (e.g., '240' for the 4-Hour chart).
3. Set Confirmation Bars: Set how many SFP Timeframe bars must pass without invalidating the level. A value of '0' confirms immediately on the SFP bar's close. A value of '1' waits for one more bar to close.
4. Adjust Filters (Optional): Enable the 'Wick % Filter' to add a quality check for strong rejections.
5. Watch & Wait: The indicator will draw lines and labels and fire alerts for fully confirmed signals.
In-Depth Explanation
1. Overview
The Dynamic Pivot SFP Engine is a multi-timeframe tool designed to identify and validate Swing Failure Patterns (SFPs) at significant price levels.
An SFP is a common price action pattern where price briefly trades beyond a previous swing high or low (sweeping liquidity) but then fails to hold those new prices, closing back inside the previous range. This "failure" often signals a reversal.
This indicator enhances SFP detection by separating the Pivot (Liquidity) from the SFP (Rejection), allowing you to monitor them on different timeframes.
2. The Core Multi-Timeframe Logic
The indicator's power comes from two key inputs:
• Pivot Timeframe (Pivot Timeframe)
This is the "high timeframe" used to establish significant support and resistance levels. The script finds standard pivots (swing highs and lows) on this timeframe based on the Pivot Left Strength and Pivot Right Strength inputs. These pivots are the "liquidity" levels the SFP will target. The Pivot Lookback input controls how long (in Pivot Timeframe bars) a pivot remains active and monitored.
• SFP Timeframe (SFP Timeframe)
This is the "execution timeframe" where the script looks for the actual SFP. On every new bar of this timeframe, the script checks if price has swept and rejected any of the active pivots.
Example Setup:
You might set Pivot Timeframe to 'D' (Daily) to find major daily swing points. You then set SFP Timeframe to '240' (4-Hour) to find a 4-hour candle that sweeps a daily pivot and closes back below/above it.
3. The SFP Confirmation Process
An SFP is not confirmed instantly. It must pass a rigorous, multi-step validation process.
Step 1: The SFP Candle (The Sweep)
A potential SFP is identified when an SFP Timeframe bar does the following:
• Bearish SFP: The bar's high trades above an active pivot high, but the bar closes below that same pivot high.
• Bullish SFP: The bar's low trades below an active pivot low, but the bar closes above that same pivot low.
Step 2: The Wick Filter (Optional Quality Check)
If Enable Wick % Filter is checked, the SFP candle from Step 1 is also measured.
• For a bearish SFP, the upper wick (from the high to the open/close) must be at least Min. Wick % of the entire candle's range (high-to-low).
• For a bullish SFP, the lower wick (from the low to the open/close) must meet the same percentage requirement.
If the SFP candle fails this test, it is discarded, even if it met the sweep/close criteria.
Step 3: The Validation Window (The Confirmation)
This is the most critical feature, controlled by Confirmation Bars.
• If Confirmation Bars = 0: The SFP is confirmed immediately on the SFP candle's close (assuming it passed the optional wick check). The label, line, and alert are triggered at this moment.
• If Confirmation Bars > 0: The SFP enters a "pending" state. The script will wait for $N$ more SFP Timeframe bars to close.
o Invalidation: If, during this waiting period, any bar closes back across the pivot (e.g., a close above the pivot for a bearish SFP), the SFP is considered failed and invalidated. All pending plots are deleted.
o Confirmation: If the $N$ confirmation bars all complete without invalidating the level, the SFP is finally confirmed. The label, line, and alert are only triggered after this entire process is complete. This adds a significant layer of robustness, ensuring the rejection holds for a period of time.
4. Visuals & Alerts
• Lines: A horizontal line is drawn from the original pivot to the SFP bar, showing which level was targeted. Note: These lines will only be drawn on chart timeframes equal to or lower than the 'SFP Timeframe'.
• Labels: A label is placed at the SFP's extreme (the high/low of the SFP bar). The label text conveniently includes the Ticker, Pivot TF, SFP TF, and Confirmation bar settings (e.g., "Bearish SFP BTCUSD / Pivot: 1D / SFP: 4H | Conf: 1").
• MTF Boxes (Show SFP Box, Show Conf. Boxes): These boxes highlight the SFP and confirmation bars. Crucially, they are only visible when your chart timeframe is lower than the SFP Timeframe. For example, if your SFP Timeframe is '240' (4H), you will only see these boxes on the 1H, 15M, 5M, etc., charts. This allows you to see the higher-timeframe SFP unfolding on your lower-timeframe chart.
• Alerts (Enable Alerts): An alert is fired only when an SFP is fully confirmed (i.e., after the Confirmation Bars have passed successfully). For efficient, real-time monitoring, it is highly recommended to run this indicator server-side by creating an alert on TradingView set to trigger on "Any alert() function call".