Candlestick Pattern Detector - Vijay PrasadOverview:
This Pine Script v6 indicator is designed to detect and label key candlestick patterns on TradingView charts. It provides real-time visual markers for major bullish and bearish reversal signals, aiding traders in decision-making.
Usefulness:
✅ Saves time by automating candlestick pattern detection.
✅ Reduces manual chart analysis errors.
✅ Works across all markets & timeframes.
✅ Enhances trading strategies with accurate signals.
Candlestick Patterns Recognises:
Bullish Engulfing – A strong bullish reversal pattern.
Bearish Engulfing – Indicates a potential downtrend.
Hammer – Suggests a market bottom or reversal.
Shooting Star – A bearish reversal signal at the top of an uptrend.
Doji – Signals market indecision and possible trend change.
Key Functions:
Automated Pattern Visible
Identifies candlestick patterns dynamically and plots them on the chart.
Visual Labels for Patterns
Labels to indicate specific candlestick formations.
Labels appear only when a valid pattern is detected, avoiding unnecessary clutter.
Buy/Sell Signal
Plots buy signals at bullish patterns and sell signals at bearish patterns.
Helps traders recognize trend reversals and entry/exit points.
Bullish Engulfing Pattern (Green Label)
What it means: A bullish engulfing pattern typically signals a potential reversal from a downtrend to an uptrend. The current candle fully engulfs the previous candle, signaling strong buying interest.
Identifying Candlestick Patterns on the Chart
How to use it:
Entry: Look for a green label (bullish engulfing) at the bottom of the chart. When it appears, consider entering a long position (buy).
Confirmation: To increase reliability, wait for confirmation by observing if price moves above the high of the bullish engulfing candle.
Exit: Exit when the trend shows signs of reversing or take profit at predefined levels (e.g., resistance or a risk-to-reward ratio).
Bearish Engulfing Pattern (Red Label)
What it means: A bearish engulfing pattern is a signal of a potential reversal from an uptrend to a downtrend. The current candle fully engulfs the previous candle, signaling strong selling pressure.
How to use it:
Entry: Look for a red label (bearish engulfing) at the top of the chart. When it appears, consider entering a short position (sell).
Confirmation: Wait for the price to move below the low of the bearish engulfing candle to confirm the bearish trend.
Exit: Close the trade when the price reaches support levels or the trend shows signs of reversing.
Doji Pattern (Blue Circle)
What it means: A Doji candle signals market indecision. It represents a balance between buyers and sellers, often marking a potential reversal or consolidation point.
How to use it:
Entry: If the Doji appears after a strong trend (bullish or bearish), wait for the next candle to break above or below the Doji's high or low. This can signal a continuation or reversal.
Confirmation: You can look for additional indicators like moving averages, RSI, or MACD for confirmation before taking any action.
Exit: Exit when the price shows clear momentum in your entry direction.
Hammer Pattern (Orange Triangle)
What it means: The hammer pattern is a bullish reversal pattern that appears after a downtrend. It suggests that sellers pushed the price down during the session, but buyers managed to push the price back up.
How to use it:
Entry: When a hammer appears, consider entering a long position (buy). The price should move above the hammer's high for confirmation.
Confirmation: Look for strong volume and a follow-up bullish candle to confirm the reversal.
Exit: Set a target based on the next resistance level, or use a trailing stop to lock in profits.
Using Candlestick Patterns with Other Indicators
To increase your chances of success, combine candlestick patterns with other technical indicators.
Here are some ideas:
RSI (Relative Strength Index): Use RSI to check whether the market is overbought or oversold. A bullish engulfing in an oversold market could indicate a stronger buy signal, and a bearish engulfing in an overbought market could indicate a stronger sell signal.
Moving Averages (e.g., 50 EMA, 200 EMA): Confirm trend direction. If the candlestick pattern aligns with the direction of the moving averages, it can give a stronger signal.
MACD (Moving Average Convergence Divergence): Use MACD to confirm momentum and potential trend changes. If a candlestick pattern aligns with a MACD crossover, it strengthens the signal.
Volume: Look for higher-than-average volume when a pattern appears. This can give you additional confirmation that the market is reacting strongly.
Practice and Refine
It's important to practice using the candlestick patterns in a demo account or backtest them to see how they perform under different market conditions. Over time, you can adjust the settings and patterns to fit your trading style and preferences.
תבניות גרפים
[COG]StochRSI Zenith📊 StochRSI Zenith
This indicator combines the traditional Stochastic RSI with enhanced visualization features and multi-timeframe analysis capabilities. It's designed to provide traders with a comprehensive view of market conditions through various technical components.
🔑 Key Features:
• Advanced StochRSI Implementation
- Customizable RSI and Stochastic calculation periods
- Multiple moving average type options (SMA, EMA, SMMA, LWMA)
- Adjustable signal line parameters
• Visual Enhancement System
- Dynamic wave effect visualization
- Energy field display for momentum visualization
- Customizable color schemes for bullish and bearish signals
- Adaptive transparency settings
• Multi-Timeframe Analysis
- Higher timeframe confirmation
- Synchronized market structure analysis
- Cross-timeframe signal validation
• Divergence Detection
- Automated bullish and bearish divergence identification
- Customizable lookback period
- Clear visual signals for confirmed divergences
• Signal Generation Framework
- Price action confirmation
- SMA-based trend filtering
- Multiple confirmation levels for reduced noise
- Clear entry signals with customizable display options
📈 Technical Components:
1. Core Oscillator
- Base calculation: 13-period RSI (adjustable)
- Stochastic calculation: 8-period (adjustable)
- Signal lines: 5,3 smoothing (adjustable)
2. Visual Systems
- Wave effect with three layers of visualization
- Energy field display with dynamic intensity
- Reference bands at 20/30/50/70/80 levels
3. Confirmation Mechanisms
- SMA trend filter
- Higher timeframe alignment
- Price action validation
- Divergence confirmation
⚙️ Customization Options:
• Visual Parameters
- Wave effect intensity and speed
- Energy field sensitivity
- Color schemes for bullish/bearish signals
- Signal display preferences
• Technical Parameters
- All core calculation periods
- Moving average types
- Divergence detection settings
- Signal confirmation criteria
• Display Settings
- Chart and indicator signal placement
- SMA line visualization
- Background highlighting options
- Label positioning and size
🔍 Technical Implementation:
The indicator combines several advanced techniques to generate signals. Here are key components with code examples:
1. Core StochRSI Calculation:
// Base RSI calculation
rsi = ta.rsi(close, rsi_length)
// StochRSI transformation
stochRSI = ((ta.highest(rsi, stoch_length) - ta.lowest(rsi, stoch_length)) != 0) ?
(100 * (rsi - ta.lowest(rsi, stoch_length))) /
(ta.highest(rsi, stoch_length) - ta.lowest(rsi, stoch_length)) : 0
2. Signal Generation System:
// Core signal conditions
crossover_buy = crossOver(sk, sd, cross_threshold)
valid_buy_zone = sk < 30 and sd < 30
price_within_sma_bands = close <= sma_high and close >= sma_low
// Enhanced signal generation
if crossover_buy and valid_buy_zone and price_within_sma_bands and htf_allows_long
if is_bullish_candle
long_signal := true
else
awaiting_bull_confirmation := true
3. Multi-Timeframe Analysis:
= request.security(syminfo.tickerid, mtf_period,
)
The HTF filter looks at a higher timeframe (default: 4H) to confirm the trend
It only allows:
Long trades when the higher timeframe is bullish
Short trades when the higher timeframe is bearish
📈 Trading Application Guide:
1. Signal Identification
• Oversold Opportunities (< 30 level)
- Look for bullish crosses of K-line above D-line
- Confirm with higher timeframe alignment
- Wait for price action confirmation (bullish candle)
• Overbought Conditions (> 70 level)
- Watch for bearish crosses of K-line below D-line
- Verify higher timeframe condition
- Confirm with bearish price action
2. Divergence Trading
• Bullish Divergence
- Price makes lower lows while indicator makes higher lows
- Most effective when occurring in oversold territory
- Use with support levels for entry timing
• Bearish Divergence
- Price makes higher highs while indicator shows lower highs
- Most reliable in overbought conditions
- Combine with resistance levels
3. Wave Effect Analysis
• Strong Waves
- Multiple wave lines moving in same direction indicate momentum
- Wider wave spread suggests increased volatility
- Use for trend strength confirmation
• Energy Field
- Higher intensity in trading zones suggests stronger moves
- Use for momentum confirmation
- Watch for energy field convergence with price action
The energy field is like a heat map that shows momentum strength
It gets stronger (more visible) when:
Price is in oversold (<30) or overbought (>70) zones
The indicator lines are moving apart quickly
A strong signal is forming
Think of it as a "strength meter" - the more visible the energy field, the stronger the potential move
4. Risk Management Integration
• Entry Confirmation
- Wait for all signal components to align
- Use higher timeframe for trend direction
- Confirm with price action and SMA positions
• Stop Loss Placement
- Consider placing stops beyond recent swing points
- Use ATR for dynamic stop calculation
- Account for market volatility
5. Position Management
• Partial Profit Taking
- Consider scaling out at overbought/oversold levels
- Use wave effect intensity for exit timing
- Monitor energy field for momentum shifts
• Trade Duration
- Short-term: Use primary signals in trading zones
- Swing trades: Focus on divergence signals
- Position trades: Utilize higher timeframe signals
⚠️ Important Usage Notes:
• Avoid:
- Trading against strong trends
- Relying solely on single signals
- Ignoring higher timeframe context
- Over-leveraging based on signals
Remember: This tool is designed to assist in analysis but should never be used as the sole decision-maker for trades. Always maintain proper risk management and combine with other forms of analysis.
[SHORT ONLY] 10 Bar Low Pullback█ STRATEGY DESCRIPTION
The "10 Bar Low Pullback" strategy is a contrarian short trading system designed to capture pullbacks after a new 10‐bar low is made. it identifies a potential short opportunity when the current bar’s low breaks below the lowest low of the previous 10 bars, provided that the bar exhibits strong internal momentum as measured by its IBS value. An optional trend filter further refines entries by requiring that the close is below a 200-period EMA.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
ibs = (close - low) / (high - low)
- Low IBS (≤ 0.2): Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8): Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current bar’s low is below the lowest low of the past X bars (default: 10).
The bar’s IBS is greater than the specified threshold (default: 0.85).
The signal occurs within the defined trading window (between Start Time and End Time).
If the EMA Filter is enabled, the close must be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
Lookback Period: Defines the number of bars (default is 10) over which the lowest low is calculated.
IBS Threshold: Sets the minimum required IBS value (default is 0.85) to qualify as a pullback.
Trading Window: Trades are only executed between the user-defined Start Time and End Time.
EMA Filter (Optional): When enabled, short entries are only considered if the current close is below the 200-period EMA, with the EMA period being adjustable (default is 200).
█ PERFORMANCE OVERVIEW
Designed for shorting opportunities, this strategy aims to capture pullbacks following an aggressive 10-bar low break.
It leverages a combination of a lookback low and IBS measurement to identify overextended bullish moves that may revert.
The optional EMA filter helps confirm a bearish market environment by ensuring the price remains under the trend line.
Suitable for use on various assets, including stocks and ETFs, on daily or similar timeframes.
Backtesting and parameter optimization are recommended to tailor the strategy to specific market conditions.
[SHORT ONLY] ATR Sell the Rip Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "ATR Sell the Rip Mean Reversion Strategy" is a contrarian system that targets overextended price moves on stocks and ETFs. It calculates an ATR‐based trigger level to identify shorting opportunities. When the current close exceeds this smoothed ATR trigger, and if the close is below a 200-period EMA (if enabled), the strategy initiates a short entry, aiming to profit from an anticipated corrective pullback.
█ HOW IS THE ATR SIGNAL BAND CALCULATED?
This strategy computes an ATR-based signal trigger as follows:
Calculate the ATR
The strategy computes the Average True Range (ATR) using a configurable period provided by the user:
atrValue = ta.atr(atrPeriod)
Determine the Threshold
Multiply the ATR by a predefined multiplier and add it to the current close:
atrThreshold = close + atrValue * atrMultInput
Smooth the Threshold
Apply a Simple Moving Average over a specified period to smooth out the threshold, reducing noise:
signalTrigger = ta.sma(atrThreshold, smoothPeriodInput)
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The current close is above the smoothed ATR signal trigger.
The trade occurs within the specified trading window (between Start Time and End Time).
If the EMA filter is enabled, the close must also be below the 200-period EMA.
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), indicating a potential bearish reversal and prompting the strategy to close its short position.
█ ADDITIONAL SETTINGS
ATR Period: The period used to calculate the ATR, allowing for adaptability to different volatility conditions (default is 20).
ATR Multiplier: The multiplier applied to the ATR to determine the raw threshold (default is 1.0).
Smoothing Period: The period over which the raw ATR threshold is smoothed using an SMA (default is 10).
Start Time and End Time: Defines the time window during which trades are allowed.
EMA Filter (Optional): When enabled, short entries are only executed if the current close is below the 200-period EMA, confirming a bearish trend.
█ PERFORMANCE OVERVIEW
This strategy is designed for use on the Daily timeframe, targeting stocks and ETFs by capitalizing on overextended price moves.
It utilizes a dynamic, ATR-based trigger to identify when prices have potentially peaked, setting the stage for a mean reversion short entry.
The optional EMA filter helps align trades with broader market trends, potentially reducing false signals.
Backtesting is recommended to fine-tune the ATR multiplier, smoothing period, and EMA settings to match the volatility and behavior of specific markets.
[SHORT ONLY] Consecutive Bars Above MA Strategy█ STRATEGY DESCRIPTION
The "Consecutive Bars Above MA Strategy" is a contrarian trading system aimed at exploiting overextended bullish moves in stocks and ETFs. It monitors the number of consecutive bars that close above a chosen short-term moving average (which can be either a Simple Moving Average or an Exponential Moving Average). Once the count reaches a preset threshold and the current bar’s close exceeds the previous bar’s high within a designated trading window, a short entry is initiated. An optional EMA filter further refines entries by requiring that the current close is below the 200-period EMA, helping to ensure that trades are taken in a bearish environment.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy utilizes a counter variable, `bullCount`, to track consecutive bullish bars based on their relation to the short-term moving average. Here’s how the count is determined:
Initialize the Counter
The counter is initialized at the start:
var int bullCount = na
Bullish Bar Detection
For each bar, if the close is above the selected moving average (either SMA or EMA, based on user input), the counter is incremented:
bullCount := close > signalMa ? (na(bullCount) ? 1 : bullCount + 1) : 0
Reset on Non-Bullish Condition
If the close does not exceed the moving average, the counter resets to zero, indicating a break in the consecutive bullish streak.
█ SIGNAL GENERATION
1. SHORT ENTRY
A short signal is generated when:
The number of consecutive bullish bars (i.e., bars closing above the short-term MA) meets or exceeds the defined threshold (default: 3).
The current bar’s close is higher than the previous bar’s high.
The signal occurs within the specified trading window (between Start Time and End Time).
Additionally, if the EMA filter is enabled, the entry is only executed when the current close is below the 200-period EMA.
2. EXIT CONDITION
An exit signal is triggered when the current close falls below the previous bar’s low, prompting the strategy to close the short position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish bars required to trigger a short entry (default is 3).
Trading Window: The Start Time and End Time inputs define when the strategy is active.
Moving Average Settings: Choose between SMA and EMA, and set the MA length (default is 5), which is used to assess each bar’s bullish condition.
EMA Filter (Optional): When enabled, this filter requires that the current close is below the 200-period EMA, supporting entries in a downtrend.
█ PERFORMANCE OVERVIEW
This strategy is designed for stocks and ETFs and can be applied across various timeframes.
It seeks to capture mean reversion by shorting after a series of bullish bars suggests an overextended move.
The approach employs a contrarian short entry by waiting for a breakout (close > previous high) following consecutive bullish bars.
The adjustable moving average settings and optional EMA filter allow for further optimization based on market conditions.
Comprehensive backtesting is recommended to fine-tune the threshold, moving average parameters, and filter settings for optimal performance.
Previous HTF Highs, Lows & Equilibriums [dani]Previous HTF Highs, Lows & Equilibriums
Indicator Description
This powerful and user-friendly indicator is designed to help traders visualize key levels from multiple higher timeframes directly on their chart. It plots the previous session's high, low, and equilibrium (EQ) levels for up to 4 customizable timeframes, allowing you to analyze price action across different time horizons simultaneously.
Key Features
Multi-Timeframe Support:
Choose up to 4 higher timeframes (e.g., 1H, 4H, 1D, 1W) to plot levels on your chart.
Each timeframe's levels are displayed with clear, customizable lines.
Previous Session Levels:
Plots the previous session's high, low, and EQ (EQ = (high + low) / 2) for each selected timeframe.
Levels are dynamically updated at the start of each new session.
Customizable Line Styles:
Choose between solid, dashed, or dotted lines for each level.
Customize colors for high, low, and EQ levels to suit your preferences.
Dynamic Labels:
Each level is labeled with the corresponding timeframe (e.g., "1D - H" for daily high, "4H - L" for 4-hour low).
Labels are positioned dynamically to avoid clutter and ensure readability.
Toggle On/Off:
Easily toggle the visibility of all levels with a single button, making it simple to declutter your chart when needed.
Compatible with All Markets:
Works seamlessly across all instruments (stocks, forex, crypto, futures, etc.) and timeframes.
How to Use?
Add the indicator to your chart.
Select up to 4 higher timeframes to plot levels.
Customize line styles and colors to match your trading style.
Use the levels as reference points for support/resistance, breakout zones, or confluence areas.
Toggle levels on/off as needed to keep your chart clean and focused.
Disclaimer & Chat
This indicator is not a trading signal generator. It does not predict market direction or provide buy/sell signals. Instead, it is a tool to help you visualize key levels from higher timeframes, enabling you to make more informed trading decisions. Always combine this tool with your own analysis, risk management, and trading strategy.
Thank you for choosing this indicator! I hope it becomes a valuable part of your trading toolkit. Remember, trading is a journey, and having the right tools can make all the difference. Whether you're a seasoned trader or just starting out, this indicator is designed to help you stay organized and focused on what matters most—price action. Happy trading, and may your charts be ever in your favor! 😊
From, Dani.
[SHORT ONLY] Consecutive Close>High[1] Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Consecutive Close > High " Mean Reversion Strategy is a contrarian daily trading system for stocks and ETFs. It identifies potential shorting opportunities by counting consecutive days where the closing price exceeds the previous day's high. When this consecutive day count reaches a predetermined threshold, and if the close is below a 200-period EMA (if enabled), a short entry is triggered, anticipating a corrective pullback.
█ HOW ARE THE CONSECUTIVE BULLISH COUNTS CALCULATED?
The strategy uses a counter variable called `bullCount` to track how many consecutive bars meet a bullish condition. Here’s a breakdown of the process:
Initialize the Counter
var int bullCount = 0
Bullish Bar Detection
Every time the close exceeds the previous bar's high, increment the counter:
if close > high
bullCount += 1
Reset on Bearish Bar
When there is a clear bearish reversal, the counter is reset to zero:
if close < low
bullCount := 0
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The count of consecutive bullish closes (where close > high ) reaches or exceeds the defined threshold (default: 3).
The signal occurs within the specified trading window (between Start Time and End Time).
2. EXIT CONDITION
An exit Signal is generated when the current close falls below the previous bar’s low (close < low ), prompting the strategy to exit the position.
█ ADDITIONAL SETTINGS
Threshold: The number of consecutive bullish closes required to trigger a short entry (default is 3).
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
EMA Filter (Optional): When enabled, short entries are only triggered if the current close is below the 200-period EMA.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs on the Daily timeframe and targets overextended bullish moves.
It aims to capture mean reversion by entering short after a series of consecutive bullish closes.
Further optimization is possible with additional filters (e.g., EMA, volume, or volatility).
Backtesting should be used to fine-tune the threshold and filter settings for specific market conditions.
Stick Sandwich Pattern# Stick Sandwich Pattern Indicator
## Description
The Stick Sandwich Pattern Indicator is a custom TradingView script that identifies specific three-candle patterns in financial markets. The indicator uses a sandwich emoji (🥪) to mark pattern occurrences directly on the chart, making it visually intuitive and easy to spot potential trading opportunities.
## Pattern Types
### Bullish Stick Sandwich
A bullish stick sandwich pattern is identified when:
- First candle: Bullish (close > open)
- Second candle: Bearish (close < open)
- Third candle: Bullish (close > open)
- The closing price of the third candle is within 10% of the first candle's range from its closing price
### Bearish Stick Sandwich
A bearish stick sandwich pattern is identified when:
- First candle: Bearish (close < open)
- Second candle: Bullish (close > open)
- Third candle: Bearish (close < open)
- The closing price of the third candle is within 10% of the first candle's range from its closing price
## Technical Implementation
- Written in Pine Script v5
- Runs as an overlay indicator
- Uses a 10% tolerance range for closing price comparison
- Implements rolling pattern detection over the last 3 candles
- Break statement ensures only the most recent pattern is marked
## Visual Features
- Bullish patterns: Green sandwich emoji above the pattern
- Bearish patterns: Red sandwich emoji below the pattern
- Label size: Small
- Label styles:
- Bullish: Label points upward
- Bearish: Label points downward
## Usage
1. Add the indicator to your TradingView chart
2. Look for sandwich emojis that appear above or below price bars
3. Green emojis indicate potential bullish reversals
4. Red emojis indicate potential bearish reversals
## Code Structure
- Main indicator function with overlay setting
- Two separate functions for pattern detection:
- `bullishStickSandwich()`
- `bearishStickSandwich()`
- Pattern scanning loop that checks the last 3 candles
- Built-in label plotting for visual identification
## Formula Details
The closing price comparison uses the following tolerance calculation:
```
Tolerance = (High - Low of first candle) * 0.1
Valid if: |Close of third candle - Close of first candle| <= Tolerance
```
## Notes
- The indicator marks patterns in real-time as they form
- Only the most recent pattern within the last 3 candles is marked
- Pattern validation includes both candle direction and closing price proximity
- The 10% tolerance helps filter out weak patterns while catching meaningful ones
## Disclaimer
This indicator is for informational purposes only. Always use proper risk management and consider multiple factors when making trading decisions.
[SHORT ONLY] Internal Bar Strength (IBS) Mean Reversion Strategy█ STRATEGY DESCRIPTION
The "Internal Bar Strength (IBS) Strategy" is a mean-reversion strategy designed to identify trading opportunities based on the closing price's position within the daily price range. It enters a short position when the IBS indicates overbought conditions and exits when the IBS reaches oversold levels. This strategy is Short-Only and was designed to be used on the Daily timeframe for Stocks and ETFs.
█ WHAT IS INTERNAL BAR STRENGTH (IBS)?
Internal Bar Strength (IBS) measures where the closing price falls within the high-low range of a bar. It is calculated as:
IBS = (Close - Low) / (High - Low)
- Low IBS (≤ 0.2) : Indicates the close is near the bar's low, suggesting oversold conditions.
- High IBS (≥ 0.8) : Indicates the close is near the bar's high, suggesting overbought conditions.
█ SIGNAL GENERATION
1. SHORT ENTRY
A Short Signal is triggered when:
The IBS value rises to or above the Upper Threshold (default: 0.9).
The Closing price is greater than the previous bars High (close>high ).
The signal occurs within the specified time window (between `Start Time` and `End Time`).
2. EXIT CONDITION
An exit Signal is generated when the IBS value drops to or below the Lower Threshold (default: 0.3). This prompts the strategy to exit the position.
█ ADDITIONAL SETTINGS
Upper Threshold: The IBS level at which the strategy enters trades. Default is 0.9.
Lower Threshold: The IBS level at which the strategy exits short positions. Default is 0.3.
Start Time and End Time: The time window during which the strategy is allowed to execute trades.
█ PERFORMANCE OVERVIEW
This strategy is designed for Stocks and ETFs markets and performs best when prices frequently revert to the mean.
The strategy can be optimized further using additional conditions such as using volume or volatility filters.
It is sensitive to extreme IBS values, which help identify potential reversals.
Backtesting results should be analyzed to optimize the Upper/Lower Thresholds for specific instruments and market conditions.
2xSPYTIPS Strategy by Fra public versionThis is a test strategy with S&P500, open source so everyone can suggest everything, I'm open to any advice.
Rules of the "2xSPYTIPS" Strategy :
This trading strategy is designed to operate on the S&P 500 index and the TIPS ETF. Here’s how it works:
1. Buy Conditions ("BUY"):
- The S&P 500 must be above its **200-day simple moving average (SMA 200)**.
- This condition is checked at the **end of each month**.
2. Position Management:
- If leverage is enabled (**2x leverage**), the purchase quantity is increased based on a configurable percentage.
3. Take Profit:
- A **Take Profit** is set at a fixed percentage above the entry price.
4. Visualization & Alerts:
- The **SMA 200** for both S&P 500 and TIPS is plotted on the chart.
- A **BUY signal** appears visually and an alert is triggered.
What This Strategy Does NOT Do
- It does not use a **Stop Loss** or **Trailing Stop**.
- It does not directly manage position exits except through Take Profit.
Multi-Timeframe Trend StatusThis Multi-Timeframe Trend Status indicator tracks market trends across four timeframes ( by default, 65-minute, 240-minute, daily, and monthly). It uses a Volatility Stop based on the Average True Range (ATR) to determine the trend direction. The ATR is multiplied by a user-adjustable multiplier to create a dynamic buffer zone that filters out market noise.
The indicator tracks the volatility stop and trend direction for each timeframe. In an uptrend, the stop trails below the price, adjusting upward, and signals a downtrend if the price falls below it. In a downtrend, the stop trails above the price, moving down with the market, and signals an uptrend if the price rises above it.
Two input parameters allow for customization:
ATR Length: Defines the period for ATR calculation.
ATR Multiplier: Adjusts the sensitivity of trend changes.
This setup lets traders align short-term decisions with long-term market context and spot potential trading opportunities or reversals.
MT-Trend Zone IdentifierTrend Zone Identifier – A Dynamic Market Trend Mapping Tool
Overview
The Trend Zone Identifier is an advanced TradingView indicator that helps traders visualize different market trend phases. By leveraging Pivot Points, Moving Averages (MA), ADX (Average Directional Index), and Retest Confirmation, this tool identifies uptrend, downtrend, and ranging (sideways) conditions dynamically.
This indicator is designed to segment the market into clear trend zones, allowing traders to distinguish between confirmed trends, trend transitions (pending zones), and ranging markets. It provides an intuitive visual overlay to enhance market structure analysis and assist in decision-making.
Key Features
✔ Trend Zone Identification – Classifies price action into Uptrend (Green), Downtrend (Red), Pending Confirmation (Light Colors), and Sideways Market (Gray/Neutral)
✔ Pivot-Based Breakout & Breakdown Detection – Uses pivot highs/lows to determine trend shifts
✔ Moving Average & ADX Validation – Ensures the trend is backed by MA structure and ADX trend strength
✔ Pullback Confirmation – Allows trend confirmation based on price retesting key levels
✔ Extreme Volatility & Gaps Filtering – Optional ATR-based extreme movement filtering to avoid false signals
✔ Multi-Timeframe Support – Option to integrate higher timeframe trend validation
✔ Customizable Sensitivity – Fine-tune MA smoothing, ADX thresholds, pivot detection, and pullback range
How It Works
1. Trend Classification
• Uptrend (Green): Price is above a key MA, ADX confirms strength, and a pivot breakout occurs
• Downtrend (Red): Price is below a key MA, ADX confirms strength, and a pivot breakdown occurs
• Pending Trend (Light Colors): Initial trend breakout or breakdown is detected but requires further confirmation
• Sideways/Ranging (Gray): ADX signals a weak trend, and price remains within a neutral zone
2. Retest & Confirmation Logic
• A trend is only confirmed after a breakout or breakdown followed by a successful retest
• If the market fails the retest, the indicator resets to a neutral state
3. Custom Filters for Optimization
• Enable or disable volume filtering for confirmation
• Adjust pivot sensitivity to detect major or minor swing points
• Choose to require consecutive bars confirming the breakout/breakdown
Ideal Use Cases
🔹 Swing traders who want to capture trend transitions early
🔹 Trend-following traders who rely on confirmed market cycles
🔹 Range traders looking to identify sideways market zones
🔹 Algorithmic traders who need clean trend segmentation for automated strategies
Final Thoughts
The Trend Zone Identifier is a versatile market structure indicator that helps traders define trend cycles visually and avoid trading against weak trends. By providing clear breakout, breakdown, and retest conditions, it enhances market clarity and reduces decision-making errors.
➡ Add this to your TradingView workspace and start analyzing market trends like a pro! 🚀
ICT First Presented FVG - NY Open [LuckyAlgo]
This indicator identifies the first Fair Value Gap (FVG) that occurs during the New York trading session, combined with NY session opening price levels. It's an essential tool for traders who follow ICT concepts and focus on the NY trading session.
ICT refers to this as the First Presented FVG, while other traders may call it the 9:30 FVG.
This indicator is best for the 1 minute timeframe, while 5 minute also works.
Detects and marks the first FVG of the NY session
Displays both bullish (green) and bearish (red) FVGs with customizable transparency
Shows the NY session opening price with clear labels
Includes optional vertical line at 9:30 AM NY open
Maintains clean chart visibility with adjustable maximum display days
Includes session date and time labels for easy reference
The indicator helps traders identify potential reversal zones and continuation opportunities by combining two powerful concepts: Fair Value Gaps and NY session opening price. This makes it particularly valuable for day traders and swing traders who want to capitalize on institutional order flow patterns during the most liquid trading session.
You can customize the indicator's appearance, including FVG box colors, time range display, and whether to show the NY open markers. This flexibility allows you to integrate it seamlessly with your existing trading setup.
Inside BarsInside Bars Indicator
Description:
This indicator identifies and highlights price action patterns where a bar's high and low
are completely contained within the previous bar's range. Inside bars are significant
technical patterns that often signal a period of price consolidation or uncertainty,
potentially leading to a breakout in either direction.
Trading Literature & Theory:
Inside bars are well-documented in technical analysis literature:
- Steve Nison discusses them in "Japanese Candlestick Charting Techniques" as a form
of harami pattern, indicating potential trend reversals
- Thomas Bulkowski's "Encyclopedia of Chart Patterns" categorizes inside bars as
a consolidation pattern with statistical significance for breakout trading
- Alexander Elder references them in "Trading for a Living" as indicators of
decreasing volatility and potential energy build-up
- John Murphy's "Technical Analysis of the Financial Markets" includes inside bars
as part of price action analysis for market psychology understanding
The pattern is particularly significant because it represents:
1. Volatility Contraction: A narrowing of price range indicating potential energy build-up
2. Institutional Activity: Often shows large players absorbing or distributing positions
3. Decision Point: Market participants evaluating the previous bar's significance
Trading Applications:
1. Breakout Trading
- Watch for breaks above the parent bar's high (bullish signal)
- Monitor breaks below the parent bar's low (bearish signal)
- Multiple consecutive inside bars can indicate stronger breakout potential
2. Market Psychology
- Inside bars represent a period of equilibrium between buyers and sellers
- Shows market uncertainty and potential energy building up
- Often precedes significant price movements
Best Market Conditions:
- Trending markets approaching potential reversal points
- After strong momentum moves where the market needs to digest gains
- Near key support/resistance levels
- During pre-breakout consolidation phases
Complementary Indicators:
- Volume indicators to confirm breakout strength
- Trend indicators (Moving Averages, ADX) for context
- Momentum indicators (RSI, MACD) for additional confirmation
Risk Management:
- Use parent bar's range for stop loss placement
- Wait for breakout confirmation before entry
- Consider time-based exits if breakout doesn't occur
- More reliable on higher timeframes
Note: The indicator works best when combined with proper risk management
and overall market context analysis. Avoid trading every inside bar pattern
and always confirm with volume and other technical indicators.
EDGE Market Maker StrategyDCAA HedgeFlow System
Objective: Provide real-time, structured analysis for ENS/USDT trades by focusing on market maker liquidity flows and footprints, rather than traditional retail indicators. This approach is designed to grant an institutional-level execution edge.
1. Liquidity-Based Market Assessment
• Liquidity Zones: Locate areas where market makers trap retail (bull/bear traps).
• Order Book Imbalances: Highlight significant buy/sell pressure absorption.
• Volume Clusters & Absorption: Detect liquidity exhaustion points.
• Market Maker Footprints: Pinpoint institutional positioning.
Restriction: Do not use static support/resistance. All levels must derive from liquidity traps, absorption points, and institutional footprints.
2. DCAA & Trade Optimization
Analyze and recommend optimal DCAA levels by examining market maker absorption and real-time positioning, instead of offering fixed levels.
• Short DCAA: Identify zones where short sellers are trapped before a reversal; confirm entries via VWAP, CVD, and Open Interest.
• Long DCAA: Identify accumulation zones where market makers absorb liquidations; confirm entries using order book absorption and volume imbalances.
3. Take-Profit Analysis: Liquidity Exit Points
Provide dynamic TP zones that update in real time based on liquidity exhaustion—never static.
• Short TP: Reveal zones where sellers are absorbed and liquidity fades; confirm via volume divergence, order book imbalances, and market maker exits.
• Long TP: Identify zones where buyers are absorbed before market makers exit; confirm via VWAP alignment and liquidity exhaustion.
4. Market Maker Trap Detection
Analyze bull/bear traps with liquidity data:
• Bull Trap: Detect resistance absorption that traps late buyers; confirm with CVD divergence and order book shifts.
• Bear Trap: Identify stop-hunt areas where market makers absorb forced liquidations; confirm with VWAP and Open Interest spikes.
Provide a probability (%) for each trap scenario to guide risk assessment.
5. Hedge Strategy Analysis
Recommend hedging only if order flow confirms institutional absorption:
• Short Hedge: Identify zones for short hedging to counter bullish market maker shifts.
• Long Hedge: Identify zones for long hedging against stop hunts and forced liquidations.
Hedge recommendations must adapt to VWAP shifts, liquidity depth, and institutional moves.
6. Order Flow Tracking: Institutional Footprint Analysis
Track and validate:
• VWAP: Confirm institutional absorption or positioning.
• CVD (Cumulative Volume Delta): Detect trapped buyers/sellers.
• Open Interest: Confirm accumulation or liquidation trends.
All conditions must be met before finalizing DCAA or TP levels.
7. Structured Execution
For every ENS/USDT analysis:
1. Identify liquidity traps, absorption zones, and market maker footprints.
2. Confirm stop hunts or liquidation events before finalizing DCAA zones.
3. Integrate VWAP, CVD, and Open Interest data to validate trades.
4. Provide dynamic TP zones (not static) based on real-time liquidity.
5. Evaluate hedges according to shifts in market maker positioning.
8. Analysis Restrictions & Optimization
• No static S/R or retail indicators (e.g., moving averages, RSI, MACD).
• No predefined TP levels—always dynamic and liquidity-based.
• Prioritize liquidity tracking, volume imbalances, institutional footprints.
• Offer probability-based breakout, breakdown, and ranging assessments using real-time data.
9. Market Maker Validation
Before finalizing a trade:
1. VWAP: Must confirm institutional absorption (yes → proceed; no → reassess).
2. CVD: Must show divergence with trapped traders (yes → proceed; no → delay).
3. Open Interest: Must confirm accumulation/liquidation (yes → proceed; no → wait).
4. Stop Hunt: Must have confirmation of a completed stop hunt or liquidation (yes → proceed; no → hold off).
Any conclusion not supported by liquidity data should be rejected.
10. Continuous Refinement
This strategy refines analysis accuracy by:
• Tracking historical forecasts and adjusting probability models.
• Adapting liquidity zone detection with real-time data updates.
• Speeding up detection of stop hunts and hedge signals.
Final Confirmation: Institutional-Grade Analysis Tool
All analysis must be rooted in liquidity flow and smart money positioning. The goal is to optimize trade execution with risk-adjusted insights, eliminate retail inefficiencies, and adapt dynamically to market conditions—functioning as a truly institutional-level analysis engine for ENS/USDT.
Use or adapt these instructions to maintain an institutional-grade focus on liquidity-driven market dynamics.
Responsive Moving Average with Trend Detection - MissouriTimThis indicator calculates a responsive moving average (RMA) that dynamically adjusts its sensitivity based on market volatility. This indicator is more responsive that SMAs, EMAs, WMAs, and HMAs. Here's how it functions:
Dynamic Length Adjustment: Utilizes the Average True Range (ATR) to adjust the length of the moving average. In times of increased volatility, the length decreases to make the average more responsive to price changes, and in quieter markets, it increases to reduce noise.
Responsive and Smoothed Moving Averages:
Responsive EMA: An initial Exponential Moving Average (EMA) is calculated with a dynamically adjusted length for responsiveness.
Smoothing: A secondary layer of smoothing is applied to this responsive EMA to further smooth out price fluctuations.
Trend Detection:
Detects trends by comparing the current smoothed EMA with its previous values:
Uptrend is identified when the current smoothed EMA is higher than the last two periods.
Downtrend is recognized when the current smoothed EMA is lower than the last two periods.
Consolidation occurs when neither an uptrend nor a downtrend is present.
Visual Representation:
The moving average line changes color:
Green for an uptrend.
Red for a downtrend.
Orange for consolidation.
Significant Trend Labels:
Labels are displayed when there's a significant change in the moving average:
Uptrend Labels appear when the EMA increases by more than the user-defined "Uptrend Label on % Change" threshold, placed at the high of the bar with green background.
Downtrend Labels are shown when the EMA decreases by more than the "Downtrend Label on % Change" threshold, positioned at the low of the bar with a red background.
Users can enable or disable these labels, and the thresholds for labeling uptrends and downtrends can be adjusted separately to match market conditions or user preferences.
This indicator is tailored for traders needing a moving average that adapts to market dynamics while providing clear visual feedback on significant trend changes via color-coded lines and labels.
Dynamic Currency Strength IndexDescription:
This indicator calculates the relative strength of the base currency and quote currency of the currently selected forex pair. Instead of just using a single pair comparison (e.g., GBPUSD - AUDUSD), it determines currency strength using a basket of related pairs, making it more accurate and useful for trading decisions.
How It Works:
Extracts the base and quote currencies from the selected forex pair.
Calculates their individual strengths using multiple related forex pairs.
Displays the strength difference between the base and quote currencies.
How to Use:
✔️ If the strength difference is positive, the base currency is stronger → Bullish signal.
✔️ If the strength difference is negative, the quote currency is stronger → Bearish signal.
✔️ Use it to confirm trends, filter trades, and improve entry timing in forex trading.
💡 Ideal for traders using trend-based strategies (Dow Theory, HH-HL patterns, breakouts, etc.).
Bars pattern MLThis script implements a K-Nearest Neighbors (KNN)-based machine learning model to predict future price movements in financial markets. It analyzes past price action using Euclidean distance and selects the most similar historical patterns to estimate future price changes. Unlike traditional KNN implementations, this approach optimizes distance calculations by maintaining a dynamically updated list of the closest neighbors, ensuring efficient selection without the need for sorting. The model generates a forecasted price trajectory based on incremental predictions, which are visualized on the chart using polylines for better interpretability.
MACD & Bollinger Bands Overbought OversoldMACD & Bollinger Bands Reversal Detector
This indicator combines the power of MACD divergence analysis with Bollinger Bands to help traders identify potential reversal points in the market.
Key Features:
MACD Calculation & Divergence:
The script calculates the standard MACD components (MACD line, Signal line, and Histogram) using configurable fast, slow, and signal lengths. It includes a simplified divergence detection mechanism that flags potential bearish divergence—when the price makes a new swing high but the MACD fails to confirm the move. This divergence can serve as an early warning that the bullish momentum is waning.
Bollinger Bands:
A 20-period simple moving average (SMA) is used as the basis, with upper and lower bands drawn at 2 standard deviations. These bands help visualize overbought and oversold conditions. For example, a close at or above the upper band suggests the market may be overextended (overbought), while a close at or below the lower band may indicate oversold conditions.
Visual Alerts:
The indicator plots the Bollinger Bands on the chart along with labels marking overbought and oversold conditions. Additionally, it marks potential bearish divergence with a downward triangle, providing a quick visual cue to traders.
Usage Suggestions:
Confluence with Other Signals:
Use the divergence signals and Bollinger Band conditions as filters. For example, even if another indicator suggests a long entry, you might avoid it if the price is overbought or if MACD divergence warns of weakening momentum.
Customization:
All key parameters, such as the MACD lengths, Bollinger Band period, and multiplier, are fully configurable. This flexibility allows you to adjust the indicator to suit different markets or trading styles.
Disclaimer:
This script is provided for educational purposes only. Always perform your own analysis and backtesting before trading with live capital.
DCA Price LevelsThe indicator is used to set price targets in the chart on the basis of waste.
Whenever the price falls from the current DCA price to minus 30 percent, a new price target is set.
There are a total of 10 price targets, so a drop of up to minus 71 percent is covered by the default setting.
The number of price targets can be set individually, up to a maximum of 10, and the percentages can also be changed.
MTF Support & Resistance📌 Multi-Timeframe Support & Resistance (MTF S&R) Indicator
🔎 Overview:
The MTF Support & Resistance Indicator is a powerful tool designed to help traders identify critical price levels where the market is likely to react. This indicator automatically detects support and resistance zones based on a user-defined lookback period and extends these levels dynamically on the chart. Additionally, it provides multi-timeframe (MTF) support and resistance zones, allowing traders to view higher timeframe key levels alongside their current timeframe.
Support and resistance levels are crucial for traders as they help in determining potential reversal points, breakout zones, and trend continuation signals. By incorporating multi-timeframe analysis, this indicator enhances decision-making by providing a broader perspective of price action.
✨ Key Features & Benefits:
✅ Automatic Support & Resistance Detection – No need to manually plot levels; the indicator calculates them dynamically based on historical price action.
✅ Multi-Timeframe (MTF) Levels – Enables traders to see higher timeframe S&R levels on their current chart for better trend confirmation.
✅ Customizable Lookback Period – Adjust sensitivity by modifying the number of historical bars considered when calculating support and resistance.
✅ Color-Coded Visualization –
Green Line → Support on the current timeframe
Red Line → Resistance on the current timeframe
Dashed Blue Line → Higher timeframe support
Dashed Orange Line → Higher timeframe resistance
✅ Dynamic Extension of Levels – Levels extend left and right for better visibility across multiple bars.
✅ Real-Time Updates – Automatically refreshes as new price data comes in.
✅ Non-Repainting – Ensures reliable support and resistance levels that do not change after the bar closes.
📈 How to Use the Indicator:
Identify Key Price Levels:
The green line represents support, where price may bounce.
The red line represents resistance, where price may reject.
The blue dashed line represents support on a higher timeframe, making it a stronger level.
The orange dashed line represents higher timeframe resistance, helping identify major breakout zones.
Trend Trading:
Look for price action around these levels to confirm breakouts or reversals.
Combine with trend indicators (like moving averages) to validate trade entries.
Range Trading:
If the price is bouncing between support and resistance, consider range trading strategies (buying at support, selling at resistance).
Breakout Trading:
If the price breaks above resistance, it could indicate a bullish trend continuation.
If the price breaks below support, it could signal a bearish trend continuation.
⚙️ Indicator Settings:
Lookback Period: Determines the number of historical bars used to calculate support and resistance.
Show Higher Timeframe Levels (MTF): Enable/disable MTF support and resistance levels.
Extend Bars: Extends the drawn lines for better visualization.
Support/Resistance Colors: Allows users to customize the appearance of the lines.
⚠️ Important Notes:
This indicator does NOT generate buy/sell signals—it serves as a technical tool to improve trading analysis.
Best Used With Other Indicators: Consider combining it with volume, moving averages, RSI, or price action strategies for more reliable trade setups.
Works on Any Market & Timeframe: Forex, stocks, commodities, indices, and cryptocurrencies.
Use Higher Timeframe Levels for Stronger Confirmations: If a higher timeframe support/resistance level aligns with a lower timeframe level, it may indicate a stronger price reaction.
🎯 Who Should Use This Indicator?
📌 Scalpers & Day Traders – Identify short-term support and resistance levels for quick trades.
📌 Swing Traders – Utilize higher timeframe levels for position entries and exits.
📌 Trend Traders – Confirm breakout zones and key price levels for trend-following strategies.
📌 Reversal Traders – Spot potential reversal zones at significant S&R levels.
Forward Curve Visualization ToolProvide the spot symbol and the futures product root, and the script automatically scans all relevant contracts for you—no more tedious manual searches. The result is a clean, intuitive chart showing the live forward curve in real time.
It also detects contango or backwardation conditions (based on spot < F1 < F2 < F3).
Future Features:
Plot historical snapshots of the curve (1 day, 1 week, or 1 month ago) to understand market trends over time.
Display additional metrics such as annualized basis, cost of carry (CoC), and even volume or open interest for deeper insights.
If you trade futures and watch the forward curve, this script will give you the actionable data you need and get more ideas or features you’d like to see. Let’s build them together!
Disclaimer
Please remember that past performance may not be indicative of future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
TrinityBar**TrinityBar Strategy Description**
The TrinityBar strategy is a price‐action based trading model that leverages Bill Williams’ bar thirds concept to generate entry signals and execute market orders automatically. Here’s how it works:
1. **Bar Thirds Calculation:**
The strategy calculates the range of both the current fully formed bar and the previous fully formed bar. It then divides each bar’s range into three equal parts (thirds).
- For the current bar, the lower third and upper third levels are computed.
- The same is done for the previous bar.
2. **Bar Type Classification:**
Each bar is classified into one of several types based on where its open and close fall relative to its thirds:
- **Bullish Patterns:**
- *1‑3 Bar:* Opens in the lower third and closes in the upper third.
- *2‑3 Bar:* Opens in the middle third and closes in the upper third.
- *3‑3 Bar:* Both open and close are in the upper third.
- **Bearish Patterns:**
- *3‑1 Bar:* Opens in the upper third and closes in the lower third.
- *2‑1 Bar:* Opens in the middle third and closes in the lower third.
- *1‑1 Bar:* Both open and close are in the lower third.
3. **Signal Generation:**
- **Bullish Signal:** A valid buy is generated when the previous bar exhibits any bullish pattern (1‑3, 2‑3, or 3‑3) and the current bar is either a 1‑3 or a 3‑3 bar.
- **Bearish Signal:** A valid sell is generated when the previous bar shows any bearish pattern (1‑1, 2‑1, or 3‑1) and the current bar is either a 1‑1 or a 3‑1 bar.
4. **Visual Alerts:**
When a valid signal is identified, the strategy plots a small triangle below the bar for a buy signal (labeled “B” in green) and a triangle above the bar for a sell signal (labeled “S” in red).
5. **Trade Execution:**
Once a signal is confirmed:
- If a bullish signal is generated, any short positions are closed, and if there is no existing long position, a market long order is entered.
- Conversely, if a bearish signal occurs, any long positions are closed, and a market short order is entered if not already in a short position.
This strategy is designed to capture significant price expansions by relying solely on price action and bar structure, without relying on lagging indicators. It provides a mechanical, systematic approach that removes emotional bias from trading decisions.