Swing Finder By Akash
This script is designed to highlight areas on a chart where there are **three or more consecutive candles** of the same color (bullish or bearish). It provides a visual indication of extended bullish or bearish momentum by changing the background color and marking the starting point of these areas.
### **How it works:**
1. **Identifying Bullish and Bearish Candles:**
- **Bullish candles** are defined as candles where the closing price is higher than the opening price (close > open).
- **Bearish candles** are defined as candles where the closing price is lower than the opening price (close < open).
2. **Consecutive Candle Counters:**
- A counter for **bullish candles** (`bullishCount`) and **bearish candles** (`bearishCount`) is maintained to track consecutive occurrences of bullish and bearish candles.
- These counters are **incremented** when consecutive bullish or bearish candles occur. They are **reset** to zero whenever a trend reversal happens (e.g., from bullish to bearish or vice versa).
3. **Area Marking:**
- If there are **three or more consecutive bullish candles**, the background is highlighted in **green** to indicate a bullish area.
- If there are **three or more consecutive bearish candles**, the background is highlighted in **red** to indicate a bearish area.
- A **green label** is plotted below the bars where the bullish area starts, and a **red label** is plotted above the bars where the bearish area starts.
### **Visual Indicators:**
- **Background Color:**
- **Green** for areas with 3 or more consecutive bullish candles.
- **Red** for areas with 3 or more consecutive bearish candles.
- **Labels:**
- A **green label** is plotted below the chart to mark the start of a bullish area.
- A **red label** is plotted above the chart to mark the start of a bearish area.
### **Usage:**
- This indicator can help traders identify strong trends, as consecutive bullish or bearish candles often indicate extended momentum in one direction.
- By marking these areas, traders can potentially look for entry points or identify when trends may be losing strength or reversing.
---
Feel free to adjust the description if you'd like it to reflect more specific details based on your use case!
Candlestick analysis
Risk-Based Position Size ProRisk-Based Position Size Indicator
Overview:
The Risk-Based Position Size Indicator helps traders determine the appropriate position size for each trade based on their total capital and risk percentage. This indicator dynamically calculates position size using two different methods:
Wick Range (High - Low): Calculates position size based on the total range of the candlestick.
Candle Body (Close - Open): Calculates position size using only the body of the candlestick, ignoring wicks.
It provides a visual representation of position sizing as a histogram and adjusts dynamically based on price movement.
Key Features:
✅ Two Calculation Modes:
Wick Range (Red Bars) – Uses the entire candlestick range (High - Low).
Candle Body (Blue Bars) – Uses only the difference between Close and Open.
✅ Customizable Risk Settings:
Define Total Capital (default: $100,000).
Set Risk Percentage per trade (default: 1%).
✅ Automatic Position Sizing:
Adjusts position size dynamically for each candlestick.
Prevents division errors when the range is zero.
✅ Rounding Option:
Toggle rounding of position size for better readability.
✅ Clear Visual Representation:
Displayed as a histogram for easy interpretation.
Red bars for Wick Range, Blue bars for Candle Body calculations.
How to Use:
Add the indicator to your TradingView chart.
Set your Total Capital and Risk Percentage in the settings.
Choose a Calculation Method:
Wick Range: Uses High - Low for sizing.
Candle Body: Uses absolute difference of Close - Open.
If desired, enable Round Position Size for easier interpretation.
Observe the histogram bars to see the calculated position size for each candle.
This indicator is useful for risk management, ensuring that position sizes are aligned with account size and market volatility. 🚀
New Features & Fixes:
✅ User can select decimal precision (0 to 5 places) from the settings.
✅ If rounding is enabled, values are rounded based on the chosen precision.
✅ If rounding is disabled, original values are shown without forced rounding.
✅ Wick Range (Red) & Candle Body (Blue) are still plotted together.
Now, you have full control over how many decimal places to display! 🎯
Cryptogenik's Inflation-Adjusted Candles v2025Inflation-Adjusted Price Indicator by Cryptogenik
This indicator adjusts price data for inflation, allowing you to visualize how stock/asset prices would look with constant purchasing power. By using Consumer Price Index (CPI) data from FRED, it transforms nominal prices into inflation-adjusted values that reflect real-world purchasing power.
What This Indicator Does
The Inflation-Adjusted Price indicator converts traditional price charts to show what prices would be if the purchasing power of currency remained constant. This is essential for long-term analysis, as it removes the distortion caused by inflation when comparing prices across different time periods.
Key Features
Displays inflation-adjusted price candles alongside original prices
Uses official CPI data from the Federal Reserve (FRED:CPIAUCSL)
Allows easy comparison between nominal and real prices
Helps identify true price movements by filtering out the effects of inflation
Perfect for long-term investors and macroeconomic analysis
How To Use It
Apply the indicator to any chart
Green/red candles show the inflation-adjusted prices
Gray line shows the original unadjusted price
The information label displays the current CPI value
This indicator is particularly valuable for analyzing stocks, commodities, and other assets over periods of 5+ years, where inflation effects become significant. It helps answer the question: "Has this asset truly increased in value, or is the price increase just reflecting inflation?"
Technical Details
The indicator calculates adjusted prices using the formula: (price / CPI) * 100, which effectively shows prices as a percentage of current purchasing power. This approach normalizes all prices to a consistent standard, making historical comparisons more meaningful.
Cryptogenik's Inflation-Adjusted Candles v2025
Previous Day LevelsThis indicator plots the previous day's high, low, and 50% levels, providing a framework for analyzing price behavior relative to these key levels.
Full Description:
The Previous Day Levels indicator is a tool designed to help traders analyze price action based on key levels from the previous trading session. By plotting the high, low, and mid-point (50%) of the prior day’s range, traders can assess potential market bias and directional tendencies for the current trading day.
Key Features:
Plots the previous day’s high (100%), low (0%), and intermediate levels (25%, 50%, 75%).
Allows users to customize line visibility, color, style, and width.
Helps traders identify potential support and resistance zones.
Provides a bias framework for determining whether price is more likely to target the previous high or low based on behavior around the 50% level.
Use Case:
This indicator is particularly useful for intraday and short-term traders who incorporate price action into their strategy.
If price trades above the 50% level and holds, it suggests a bullish bias, indicating that price may aim for the previous day's high.
If price trades below the 50% level and holds, it suggests a bearish bias, indicating that price may aim for the previous day's low.
The high and low levels can act as key support and resistance zones, where price may react or reverse.
How to Use:
Apply the indicator to your chart.
Observe how price interacts with the 50% level.
Use price behavior around these levels to establish a directional bias.
Adjust the line styles and colors to match your personal preference.
Disclaimer:
This indicator is a tool for market analysis and does not provide financial advice. Always perform your own analysis and risk management when trading.
Strong Engulfing Candlestick (With Alerts)Detect only Strong Bullish and Strong Bearish Engulfing candle patterns and provide visual signals along with alerts.
Key Features
Bullish Engulfing Detection:
Conditions:
Current candle's close > open (bullish).
Previous candle's close < open (bearish).
Current candle's high ≥ Previous candle's high (includes wicks).
Current candle's low ≤ Previous candle's low (includes wicks).
The body of the current bullish candle is stronger than the previous bearish candle.
Signal: Plots a green upward arrow below the bar when conditions are met.
Bearish Engulfing Detection:
Conditions:
Current candle's close < open (bearish).
Previous candle's close > open (bullish).
Current candle's high ≥ Previous candle's high (includes wicks).
Current candle's low ≤ Previous candle's low (includes wicks).
The body of the current bearish candle is stronger than the previous bullish candle.
Signal: Plots a red downward arrow above the bar when conditions are met.
Alerts:
Custom alerts are included for both bullish and bearish engulfing patterns:
Bullish Alert Message: "Strong Bullish Engulfing detected!"
Bearish Alert Message: "Strong Bearish Engulfing detected!"
Hierarchical + K-Means Clustering Strategy===== USER GUIDE =====
Hierarchical + K-Means Clustering Strategy
OVERVIEW:
This strategy combines hierarchical clustering and K-means algorithms to analyze market volatility patterns
and generate trading signals. It uses a modified SuperTrend indicator with ATR-based volatility clustering
to identify potential trend changes and market conditions.
KEY FEATURES:
- Advanced volatility analysis using hierarchical clustering and K-means algorithms
- Modified SuperTrend indicator for trend identification
- Multiple filter options including moving average and ADX trend strength
- Volume-based exit mechanism to protect profits
- Customizable appearance settings
SETTINGS EXPLANATION:
1. SuperTrend Settings:
- ATR Length: Period for ATR calculation (default: 11)
- SuperTrend Factor: Multiplier for ATR to determine trend bands (default: 3)
2. Hierarchical Clustering Settings:
- Training Data Length: Number of bars used for clustering analysis (default: 200)
3. Appearance Settings:
- Transparency 1 & 2: Control the opacity of trend lines and fills
- Bullish/Bearish Color: Colors for uptrend and downtrend visualization
4. Time Settings:
- Start Year/Month: Define when the strategy should start executing trades
5. Filter Settings:
- Moving Average Filter: Uses SMA to filter trades (only enter when price is on correct side of MA)
- Trend Strength Filter: Uses ADX to ensure trades are taken in strong trend conditions
6. Volume Stop Loss Settings:
- Volume Ratio Threshold: Controls sensitivity of volume-based exits
- Monitoring Delay Bars: Number of bars to wait before monitoring volume for exit signals
HOW TO USE:
1. Apply the indicator to your chart
2. Adjust settings according to your trading preferences and timeframe
3. Long signals appear when price crosses above the SuperTrend line (▲k marker)
4. Short signals appear when price crosses below the SuperTrend line (▼k marker)
5. The strategy automatically manages exits based on volume balance conditions
INTERPRETATION:
- Green line/area: Bullish trend - consider long positions
- Red line/area: Bearish trend - consider short positions
- Yellow line: Moving average for additional trend confirmation
- Volume balance exits occur when buying/selling pressure equalizes
RECOMMENDED TIMEFRAMES:
This strategy works best on 1H, 4H, and daily charts for most markets.
For highly volatile assets, shorter timeframes may also be effective.
RISK MANAGEMENT:
Always use proper position sizing and consider setting additional stop losses
beyond the strategy's built-in exit mechanisms.
===== END OF USER GUIDE =====
CLS Patterns + Price Action Levels📌 Key Features:
✅ CLS Candle Patterns Detection:
CLS Type 1 (Sweeps & Closes Opposite) – Confirms liquidity sweeps with opposite direction close.
CLS Type 2 (Sweeps but No Opposite Close) – Identifies liquidity traps without full reversal.
CLS Type 3 (Engulfing Candles) – Strong momentum shifts with engulfing price action.
CLS Type 4 (Order Block Reversals) – Institutional order flow recognition.
✅ Institutional & Price Action Levels:
250 Pip Institutional Levels – Major S&R zones for Forex & Indices.
Minor Quarter Points (25 Pips) – Intraday precision for refined entries.
✅ Liquidity Imbalance & Order Flow Gaps:
Detects early impulse moves & liquidity voids
Highlights areas of market inefficiency & potential reversals
✅ Higher Timeframe EMA for Trend Confirmation:
Customizable Weekly 3 EMA Overlay
Dynamic color change based on price action
✅ Built-in Alerts for CLS Patterns:
Real-time alerts for CLS buy/sell signals
Configurable notifications for trade execution
🎯 How to Use:
1️⃣ Enable CLS Pattern Signals to spot liquidity sweep candles with directional confirmation.
2️⃣ Use Institutional & QP Levels to identify key areas where price is likely to react.
3️⃣ Monitor Liquidity Imbalances to detect inefficient price moves that may fill.
4️⃣ Confirm Trend with HTF EMA to trade with momentum.
5️⃣ Set Alerts for CLS patterns and key price levels to stay ahead of the market.
This indicator is ideal for Forex, Indices, and Crypto traders looking to refine their entries with precise price action confirmations.
TWAP & VWAP CombinedThis script integrates Time Weighted Average Price (TWAP) and Volume Weighted Average Price (VWAP) into a single TradingView indicator, allowing traders to analyze both price-weighted and volume-weighted trends simultaneously.
Features:
TWAP Calculation:
Computes the average price over a specified anchor period (e.g., daily).
Resets and recalculates TWAP when the anchor period changes.
Uses the OHLC4 (Open, High, Low, Close average) as the default price source.
VWAP Calculation:
Computes the VWAP based on the selected anchor period (Session, Week, Month, etc.).
Allows the option to hide VWAP when the timeframe is 1D or higher.
Uses HLC3 (High, Low, Close average) as the default source.
Dynamically resets VWAP at the start of a new period.
Customization Options:
Users can modify the source price for TWAP and VWAP calculations.
Adjustable offsets for both indicators to shift plots forward or backward.
Ability to select different VWAP anchor periods, including earnings, dividends, and splits.
Error Handling:
Displays an error message if volume data is missing, ensuring VWAP functions correctly.
Mushir's Inside Candle IndicatorThis indicator detects inside candle formations on the chart’s current timeframe. It highlights when a candle’s range is fully engulfed by the previous candle’s range, provided the previous candle meets specific criteria.
How It Works ?
It shows the formation of inside candle on the charts to help in find trades.
Mother Candle Validation
The previous candle must be a “leg candle” with a strong body and minimal wicks relative to its body size, ensuring a robust structure.
Inside Candle Detection
The current candle qualifies as an inside candle if:
Its high is ≤ the previous candle’s high.
Its low is ≥ the previous candle’s low.
Why Use This Indicator?
Adapts to the chart’s current timeframe—no manual adjustments needed.
Easily gives you the identification of inside candles
Minimalistic Design
Better results in trending market
How to use it?
- when the inside candle is formed there are certain conditions:
1. if the next candle first crosses the high of inside candle, look for a potential buy trade with RR as 2:1 while stoploss being just below the low of inside candle.
2. if the next candle first crosses the low of inside candle, look for a potential sell trade with RR as 2:1 while stoploss being just above the high of inside candle.
3. if 2:1 is achieved, then increase the partial target to 3:1 while bringing the stoploss to the entry point.
4. if the high is crossed first and then the low is crossed or vice versa then the trade is invalidated.
Happy Trading!
Mehul - ADX Zero LagThis script combines two popular technical indicators into a single visualization:
1. **Average Directional Index (ADX)**:
- Measures trend strength on a scale from 0-100 (now normalized to 0-1 by dividing by 100)
- Displayed as a red line
- Adjustable smoothing and length parameters
2. **Zero Lag MACD (Modified Moving Average Convergence Divergence)**:
- An enhanced version of the traditional MACD with reduced lag
- Shows the relationship between fast and slow moving averages
- Main components include:
- MACD line (black)
- Signal line (gray)
- Histogram (green for positive, purple for negative)
- EMA of the MACD line (red)
- Optional crossing dots
Key features of the combined indicator:
- **Scale Adjustment**: Both indicators can be scaled independently (adxScale and macdScale parameters)
- **Visibility Toggles**: Each indicator can be shown or hidden
- **Advanced Customization**: Parameters for both indicators can be fine-tuned
- **Algorithm Selection**: Option to choose between the "Glaz" algorithm or the "real" zero lag algorithm
- **Display Options**: Toggles for visualization elements like crossing dots
The most significant technical aspect is that both indicators are displayed in the same pane with compatible scaling, achieved by normalizing the ADX values and applying user-defined scale factors to both indicators.
This combined indicator is designed to give traders a comprehensive view of both trend strength (from ADX) and momentum/direction (from Zero Lag MACD) in a single, easy-to-read visualization.
GRID EXTENSIONGRID EXTENSION
Overview
The GRID EXTENSION is a simple grid-based indicator for TradingView, built with Pine Script v6. It plots horizontal price levels starting from a user-defined anchor price, with spacing set by a tick increment. Use it to identify key support, resistance, or price zones on charts for Crypto, Forex, or Futures.
Key Features
Custom Grid Levels: Plot up to 22 levels (e.g., 0, 0.25, 1.25, -2.50) with options to show/hide, set values, and choose colors.
Market-Specific Tick Increments: Select your asset type (Crypto, Forex, Futures) and choose from a range of tick increments tailored for each market:
Crypto: 1 to 5000 ticks (e.g., 100 ticks = $0.001 on ADA/USD, 5000 ticks = $50 on BTC/USD).
Forex: 5 to 5000 ticks (e.g., 100 ticks = 1 pip on EUR/USD, 5000 ticks = 50 pips).
Futures: 1 to 2500 ticks (e.g., 25 ticks = 6.25 points on E-mini S&P 500, $312.50 per contract).
Visual Options:
Extend lines to the right.
Show price and level labels (as values or percentages).
Place labels on the left or right.
Adjust background transparency for filled areas between levels.
How to Use
Set Asset Type: Choose "Crypto," "Forex," or "Futures" to match your chart.
Set Anchor Price: Enter a starting price for the grid.
Pick Tick Increment: Select a tick increment from the dropdown, following the guidance for your asset type (see Key Features).
Customize Levels: Turn levels on/off, set values, and pick colors.
Add to Chart: Apply the indicator to see the grid on your chart.
Tips
Use levels to mark support/resistance zones for entries or exits.
Extend lines to project future price zones.
Choose smaller increments (e.g., 5 ticks) for scalping, or larger ones (e.g., 1000 ticks) for swing trading.
Combine with indicators like moving averages for better signals.
Settings
Asset Type: Select "Crypto," "Forex," or "Futures" (default: "Crypto").
Anchor Price: Starting price for the grid (default: 0.0).
Tick Increment: Space between levels (options: 1, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000). Choose based on asset type.
Extend Right: Extend lines to the right (default: true).
Show Prices: Show price labels (default: true).
Show Levels: Show level values or percentages (default: true).
Format: Display levels as "Values" or "Percent" (default: "Values").
Labels Position: Place labels on "Left" or "Right" (default: "Left").
Background Transparency: Set transparency for filled areas (default: 100, range 0-100).
Level Options: Enable/disable levels, set values, and choose colors.
Notes
Set the anchor price to a key level (like a recent high or low) for best results.
Check the tick increment tooltip to ensure the spacing suits your market type.
Works on any chart, best for clear price trends or ranges.
Acknowledgments
Made with Pine Script v6 for TradingView. This is v1.0—feedback welcome for future updates!
Essa - Yearly High, Low & MidYearly High, Low & Midpoint Indicator
This TradingView indicator helps traders track key yearly price levels by plotting the high, low, and midpoint values for each year within a user-specified range.
Features & Functionality:
Automatic Yearly Calculation: Determines the highest and lowest price for each year and computes the midpoint as their average.
Clear & Customisable Visuals:
The Yearly High is plotted as a solid green line.
The Yearly Low appears as a solid red line.
The Midpoint is displayed as a blue dashed line for easy distinction
Detailed Labels:
Each level is labeled at the far right of the chart, showing the year, level type (High, Low, or Mid), and price (e.g., 2016 High - 1.20000).
Labels are right-aligned in white, ensuring clear visibility against any background.
This indicator is perfect for traders who rely on long-term technical analysis, providing a quick and structured way to visualise significant yearly price levels.
BRT CHARTS MTFDescription of the Indicator
This indicator is designed to visualize and analyze price movements across multiple timeframes simultaneously. It displays candles from selected time intervals directly on the current chart, allowing traders to quickly assess market conditions without switching between different timeframes. This is particularly useful for traders who use multi-timeframe analysis to make trading decisions.
Key Features of the Indicator:
1. Displaying Candles from Multiple Timeframes:
- The indicator allows you to select three timeframes (e.g., 1 hour, 4 hours, and 1 day) and displays their candles on the current chart. This helps to see the overall market picture without switching between charts.
- Candles are displayed as vertical columns, each containing the body and wicks (shadows) of the candle. The colors of the candles (green for bullish and red for bearish) are customizable.
2. Dynamic Updates:
- The indicator automatically updates the candles as new data arrives, allowing you to track market changes in real time.
3. Customizable Number of Candles:
- The user can choose how many candles to display for each timeframe (default is 4 candles). This allows the indicator to be adapted to individual needs.
4. Range Display (High/Low):
- The indicator can show High and Low levels for each timeframe, helping to identify key support and resistance levels.
- It is also possible to display the Mid level (average between High and Low), which can be useful for identifying consolidation zones.
5. Data Table:
- The indicator supports displaying a table with key levels (High, Low, Mid) for each timeframe. The table can be placed in any corner of the chart, and its size and text/background colors are customizable.
6. Flexible Appearance Settings:
- The user can customize the colors of the candles, their wicks, High/Low/Mid levels, as well as the placement of the columns on the chart.
How the Indicator Helps in Trading:
- Multi-Timeframe Analysis: The indicator allows you to analyze multiple timeframes simultaneously, helping to better understand the overall trend and find entry points. For example, if the trend is bullish on the daily timeframe and there is a correction on the hourly timeframe, this could be a good opportunity to buy.
- Identifying Key Levels: Displaying High, Low, and Mid levels helps quickly identify support and resistance zones, which is useful for setting stop-loss and take-profit levels.
- Time-Saving: The indicator eliminates the need to switch between timeframes, speeding up the analysis and decision-making process.
- Visual Clarity: Visualizing candles from different timeframes on a single chart makes analysis more convenient and intuitive.
Example Use Cases:
1. Trend Trading: If a clear uptrend is visible on the daily timeframe and a correction is occurring on the hourly timeframe, you can look for buy opportunities near support levels.
2. Range Trading: If the price is moving sideways across all timeframes, you can use High and Low levels to trade from the boundaries of the range.
3. Identifying Reversal Points: If the price approaches a key resistance level on the higher timeframe and a bearish candle forms on the lower timeframe, this could be a signal to sell.
Conclusion:
This indicator is a powerful tool for traders who use multi-timeframe analysis. It helps quickly assess market conditions, identify key levels, and make informed trading decisions. Thanks to its flexible settings, the indicator can be adapted to any trading style and visualization preferences.
5 Consecutive Candle Alert Multi-TimeframeMaximize your trading strategy with our sophisticated "5 Consecutive Candle Alert Multi-Timeframe" indicator, designed for the TradingView platform using Pine Script version 6. This custom indicator is meticulously crafted to monitor five consecutive green or red candles across multiple key timeframes, including 1-minute, 5-minute, 15-minute, 1-hour, and 4-hour charts.
**Key Features:**
- **Multi-Timeframe Analysis:** Simultaneously tracks and alerts on consecutive candle patterns across five different timeframes, providing a comprehensive view of market momentum and trend consistency.
- **Custom Alerts:** Receive real-time notifications when five consecutive green or red candles close on any of the specified timeframes. These alerts are tailored to keep you abreast of significant market movements, enabling timely and informed trading decisions.
- **Easy Visualization:** Uses distinct plotting features to clearly mark the occurrence of these patterns directly on your trading chart. Green labels below the bar indicate a bullish streak, while red labels above the bar denote a bearish streak, making it visually intuitive.
- **Precision and Confirmation:** Integrates Pine Script's `barstate.isconfirmed` to ensure alerts are based on fully formed candles, adding an extra layer of precision to your trading signals.
**Ideal for Traders Who:**
- Are momentum or trend traders looking for clear signals of market continuation or potential exhaustion.
- Want to enhance their trading decisions by analyzing behavior across multiple timeframes from a single chart.
- Prefer to be alerted about significant events without the need to constantly monitor the charts.
**How to Use:**
Simply add this script to your TradingView chart, customize the alert settings in the TradingView UI according to your preferences, and start receiving alerts that help you capitalize on market movements efficiently and effectively.
Leverage the power of advanced scripting to make your trading as proactive and responsive as possible. Try out our "5 Consecutive Candle Alert Multi-Timeframe" indicator today and experience a significant improvement in your trading approach!
Range%This indicator displays the range of each candle i.e. High minus Low as a percentage of the previous closing price. It does not account for gaps, making it particularly useful for intraday trading. By tracking the volatility cycle of candles, this indicator helps identify periods of increased or decreased market volatility, allowing traders to pinpoint the best days to execute trades.
If the Range% is below low line candles will turn White and If Range% is above the High Line Candles will turn Red.
Two-Candle Highs & LowsSimple indicator which highlights highs and lows as two-candle reversal patterns:
1. High pattern : A bullish candle followed by a bearish candle, marking the highest price of the two.
2. Low pattern : A bearish candle followed by a bullish candle, marking the lowest price of the two.
It draws horizontal lines at the high/low levels, making it useful for price action analysis such as identifying potential reversals or support/resistance zones.
Nimu Market on Paper
Multi-Timeframe Analysis Tool is a powerful visual aid for identifying trends, reversals, and key price movements across multiple timeframes — particularly useful for intraday traders and those using technical analysis strategies
Timeframes & Data Collection:
The script tracks multiple timeframes (1m, 5m, 15m, 30m, 1H, 2H, 4H, 8H), storing their open, high, low, and close prices in arrays (trdh, trdc, trdo, trdl).
It uses request.security() to fetch these values for the current symbol and specified timeframes
.
User Inputs:
Base Timeframe: Chooses the primary timeframe for analysis.
Bar Count: Determines how many bars to display.
Border Thickness: Sets the visual thickness of box borders.
Colors: Configurable for bullish, bearish, background, and borders
Visual Elements:
Dynamic Boxes: Drawn using box.new(), these illustrate the range between high and low prices with the percentage change displayed inside.
Candlestick Plots: Rendered for each tracked timeframe using plotcandle(), colored according to bullish or bearish price action and styled based on timeframe scaling.
Regression Line: A linear regression line plotted over the selected timeframe’s close prices to capture trend direction.
Logic & Presentation:
Determines the right timeframe index based on user input (base).
Calculates percentage change from high to low and visualizes it with shaded boxes.
Automatically deletes older boxes to maintain clarity.
Customizes candle appearance based on timeframe granularity.
Momentum Candle Identifier # Momentum Candle Identifier
This indicator helps traders identify significant momentum candles by analyzing candle body size relative to recent price action (think after consolidation periods). Unlike traditional volatility indicators, this tool specifically focuses on price movement captured by the candle body (open to close distance), filtering out potentially misleading wicks.
## How It Works
- The indicator calculates the average candle body size over a user-defined lookback period
- Momentum candles are identified when their body size exceeds the average by a customizable threshold multiplier
- Bullish momentum candles (close > open) are highlighted in a user defined color
- Bearish momentum candles (close < open) are highlighted in a user defined color
- A real-time information panel displays key metrics including current average body size and threshold values
## Key Features
- Focus on candle body size rather than full range (high to low)
- Custom lookback period to adapt to different timeframes
- Adjustable threshold multiplier to fine-tune sensitivity
- Customizable colors for bullish and bearish momentum candles
- Optional labels for momentum candles
- Information panel showing lookback settings, average size, and momentum candle count
## Usage Tips
- Use shorter lookback periods (3-5) for more signals in choppy markets
- Use longer lookback periods (8-20) to identify only the most significant momentum moves
- Higher threshold multipliers (2.0+) will identify only the strongest momentum candles
- Combine with trend indicators to find potential reversal or continuation signals
- Look for clusters of momentum candles to identify strong shifts in market sentiment
This indicator helps identify candles that represent significant price movement relative to recent activity, potentially signaling changes in market momentum, sentiment shifts, or the beginning of new trends.
Supertrend TP SL (PRO)2. Main Components:
Supertrend Indicator:
Theoretical basis: The Supertrend indicator is based on two main concepts: Average True Range (ATR) and Factor. ATR measures the extent of price fluctuations in a given period of time, while Factor determines the sensitivity of the indicator to price changes.
Mechanism of operation: The indicator calculates two possible lines: one line representing the potential support level and another line representing the potential resistance level. The selection of the appropriate line depends on the current price direction. When the price is above the line, the indicator is considered to be in an uptrend, and vice versa.
Customizable inputs:
atrPeriod: Allows the trader to specify the time period for calculating the ATR. Shorter periods make the indicator more sensitive to price changes, while longer periods reduce its sensitivity.
factor: Allows the adjustment of the factor. Higher values make the indicator less likely to give false signals, but they may also delay entry signals.
Risk Management:
Take Profit and Stop Loss Orders:
TPPoints: Specifies the distance between the entry price and the take profit level. This distance is expressed in points, and is converted to an actual price value using syminfo.mintick (the smallest possible price movement of the traded asset).
SLPoints: Specifies the distance between the entry price and the stop loss level.
Importance: These orders allow the trader to specify the maximum loss he is willing to take and the profit target he is aiming to achieve, which helps in effective risk management.
Activate/Disable Trades:
isLongEnabled: Allows buy trades to be enabled or disabled, which allows the trader to trade in one direction only (for example, only trade in the uptrend during a bull market).
isShortEnabled: Allows sell trades to be enabled or disabled.
isTakeProfitEnabled: Allows take profit orders to be enabled or disabled. The trader may wish to disable them if he prefers to manage his trades manually.
isStopLossEnabled: Allows you to enable or disable stop loss orders. Although disabling them may seem tempting in some cases, it is a very risky move.
Visual Customization:
Line Style and Width:
lineStyle: Allows the trader to choose the style of lines used to draw TP and SL levels (Solid, Dashed, Dotted).
lineWidth: Sets the thickness of the lines.
Label Size:
labelSize: Allows you to set the size of the labels that display TP and SL levels (Small, Normal, Large).
Colors:
bullColor, bearColor, tpColor, slColor: Allows the trader to customize the colors of the different elements on the chart, making visual analysis easier.
3. Strategy Logic:
Determining Entry Signals: The strategy relies on the Supertrend indicator to determine entry signals. When the Supertrend trend changes from bearish to bullish, a buy trade is triggered (if isLongEnabled is enabled). When the trend changes from bullish to bearish, a sell trade is triggered (if isShortEnabled is enabled).
Order Execution: Once the entry signal is triggered, the strategy automatically places buy or sell orders.
Trade Management: After opening a trade, the strategy monitors the price and automatically triggers Take Profit and Stop Loss orders if the price reaches the specified levels.
Visualization: The strategy displays useful information on the chart, such as TP and SL lines, entry and exit signals, which helps the trader understand the strategy’s behavior and evaluate its performance.
4. Advanced Tips:
Optimizing Settings: The strategy’s performance can be improved by adjusting different input values. For example, the trader can experiment with different values for atrPeriod and factor to improve the accuracy of Supertrend signals.
Combining Indicators: This strategy can be combined with other indicators to improve the accuracy of entry signals. For example, the Relative Strength Index (RSI) can be used to confirm Supertrend signals.
Time Analysis: The strategy’s performance can be analyzed over different time periods to evaluate its effectiveness in various market conditions.
Strategy Testing: Before using the strategy in real trading, it should be tested on historical data (Backtesting) to evaluate its performance and determine the optimal settings.
5. Associated Risks:
False Signals: The Supertrend indicator may sometimes give false signals, especially in volatile markets.
Losses: Even with the use of stop loss orders, the trader may be exposed to significant losses.
Over-optimization: Over-optimization of settings on historical data may lead to misleading results. The trader should be careful about generalizing the results to future data.
Over-reliance on automation: The automated strategy should not be relied upon completely. The trader should monitor the trades and make appropriate decisions when necessary.
6. Disclaimer:
I am not a licensed financial advisor. This strategy is provided for educational and illustrative purposes only and should not be considered as investment advice. Trading in financial markets involves significant risks and you may lose your invested capital. Before making any investment decisions, consult a qualified financial advisor and conduct your own research. You alone are responsible for your trading decisions and their results. By using this strategy, you acknowledge and agree that I am not responsible for any losses or damages you may incur.
2. المكونات الرئيسية:
مؤشر Supertrend:
الأساس النظري: يعتمد مؤشر Supertrend على مفهومين رئيسيين هما: متوسط المدى الحقيقي (Average True Range - ATR) ومعامل الضرب (Factor). ATR يقيس مدى تقلبات الأسعار في فترة زمنية محددة، بينما Factor يحدد مدى حساسية المؤشر لتغيرات الأسعار.
آلية العمل: يقوم المؤشر بحساب خطين محتملين: خط يمثل مستوى الدعم المحتمل وخط آخر يمثل مستوى المقاومة المحتمل. يعتمد اختيار الخط المناسب على اتجاه السعر الحالي. عندما يكون السعر أعلى من الخط، يعتبر المؤشر في اتجاه صاعد، والعكس صحيح.
المدخلات القابلة للتخصيص:
atrPeriod: يتيح للمتداول تحديد الفترة الزمنية لحساب ATR. الفترات الأقصر تجعل المؤشر أكثر حساسية لتغيرات الأسعار، بينما الفترات الأطول تقلل من حساسيته.
factor: يسمح بتعديل معامل الضرب. القيم الأعلى تجعل المؤشر أقل عرضة لإعطاء إشارات خاطئة، ولكنها قد تؤخر أيضًا إشارات الدخول.
إدارة المخاطر:
أوامر جني الأرباح وإيقاف الخسارة:
TPPoints: يحدد المسافة بين سعر الدخول ومستوى جني الأرباح. يتم التعبير عن هذه المسافة بالنقاط (Points)، ويتم تحويلها إلى قيمة سعرية فعلية باستخدام syminfo.mintick (أصغر حركة سعرية ممكنة للأصل المتداول).
SLPoints: يحدد المسافة بين سعر الدخول ومستوى إيقاف الخسارة.
الأهمية: تتيح هذه الأوامر للمتداول تحديد الحد الأقصى للخسارة التي يرغب في تحملها والهدف الربحي الذي يسعى لتحقيقه، مما يساعد على إدارة المخاطر بشكل فعال.
تفعيل/تعطيل الصفقات:
isLongEnabled: يسمح بتفعيل أو تعطيل صفقات الشراء، مما يمكن المتداول من التداول في اتجاه واحد فقط (على سبيل المثال، التداول فقط في الاتجاه الصاعد خلال سوق صاعدة).
isShortEnabled: يسمح بتفعيل أو تعطيل صفقات البيع.
isTakeProfitEnabled: يسمح بتفعيل أو تعطيل أوامر جني الأرباح. قد يرغب المتداول في تعطيلها إذا كان يفضل إدارة صفقاته يدويًا.
isStopLossEnabled: يسمح بتفعيل أو تعطيل أوامر إيقاف الخسارة. على الرغم من أن تعطيلها قد يبدو مغريًا في بعض الحالات، إلا أنه يعتبر خطوة محفوفة بالمخاطر للغاية.
التخصيص المرئي:
نمط وعرض الخطوط:
lineStyle: يتيح للمتداول اختيار نمط الخطوط المستخدمة لرسم مستويات TP و SL (Solid, Dashed, Dotted).
lineWidth: يحدد سمك الخطوط.
حجم الملصقات:
labelSize: يسمح بتحديد حجم الملصقات التي تعرض مستويات TP و SL (Small, Normal, Large).
الألوان:
bullColor, bearColor, tpColor, slColor: تتيح للمتداول تخصيص ألوان العناصر المختلفة على الرسم البياني، مما يسهل عملية التحليل البصري.
3. منطق عمل الاستراتيجية:
تحديد إشارات الدخول: تعتمد الاستراتيجية على مؤشر Supertrend لتحديد إشارات الدخول. عندما يتغير اتجاه Supertrend من هابط إلى صاعد، يتم تفعيل صفقة شراء (إذا كانت isLongEnabled مفعلة). وعندما يتغير الاتجاه من صاعد إلى هابط، يتم تفعيل صفقة بيع (إذا كانت isShortEnabled مفعلة).
تنفيذ الأوامر: بمجرد تفعيل إشارة الدخول، تقوم الاستراتيجية بوضع أوامر الشراء أو البيع تلقائيًا.
إدارة الصفقات: بعد فتح الصفقة، تقوم الاستراتيجية بمراقبة السعر وتفعيل أوامر جني الأرباح وإيقاف الخسارة تلقائيًا في حالة وصول السعر إلى المستويات المحددة.
التمثيل المرئي: تعرض الاستراتيجية معلومات مفيدة على الرسم البياني، مثل خطوط TP و SL وإشارات الدخول والخروج، مما يساعد المتداول على فهم سلوك الاستراتيجية وتقييم أدائها.
4. نصائح متقدمة:
تحسين الإعدادات: يمكن تحسين أداء الاستراتيجية من خلال تعديل قيم المدخلات المختلفة. على سبيل المثال، يمكن للمتداول تجربة قيم مختلفة لـ atrPeriod و factor لتحسين دقة إشارات Supertrend.
الجمع بين المؤشرات: يمكن دمج هذه الاستراتيجية مع مؤشرات أخرى لتحسين دقة إشارات الدخول. على سبيل المثال، يمكن استخدام مؤشر القوة النسبية (RSI) لتأكيد إشارات Supertrend.
التحليل الزمني: يمكن تحليل أداء الاستراتيجية على مدى فترات زمنية مختلفة لتقييم مدى فعاليتها في ظروف السوق المتنوعة.
اختبار الاستراتيجية: قبل استخدام الاستراتيجية في التداول الحقيقي، يجب اختبارها على بيانات تاريخية (Backtesting) لتقييم أدائها وتحديد الإعدادات المثلى.
5. المخاطر المرتبطة:
الإشارات الخاطئة: قد يعطي مؤشر Supertrend إشارات خاطئة في بعض الأحيان، خاصة في الأسواق المتقلبة.
الخسائر: حتى مع استخدام أوامر إيقاف الخسارة، قد يتعرض المتداول لخسائر كبيرة.
التحسين المفرط: قد يؤدي التحسين المفرط للإعدادات على بيانات تاريخية إلى نتائج مضللة. يجب أن يكون المتداول حذرًا بشأن تعميم النتائج على البيانات المستقبلية.
الاعتماد الزائد على الأتمتة: يجب عدم الاعتماد بشكل كامل على الاستراتيجية الآلية. يجب على المتداول مراقبة الصفقات واتخاذ القرارات المناسبة عند الضرورة.
6. إخلاء المسؤولية:
أنا لست مستشارًا ماليًا مرخصًا. هذه الاستراتيجية مقدمة لأغراض تعليمية وتوضيحية فقط، ولا ينبغي اعتبارها نصيحة استثمارية. التداول في الأسواق المالية ينطوي على مخاطر كبيرة، وقد تخسر رأس المال المستثمر. قبل اتخاذ أي قرارات استثمارية، استشر مستشارًا ماليًا مؤهلاً وقم بإجراء بحثك الخاص. أنت وحدك المسؤول عن قراراتك التجارية ونتائجها. باستخدام هذه الاستراتيجية، فإنك تقر وتوافق على أنني لست مسؤولاً عن أي خسائر أو أضرار قد تتكبدها.
Zen ABR### **Average Bar Range (ABR) Levels** – A Simple Yet Powerful Scalping Tool
The **ABR Levels** indicator dynamically calculates the **average bar range** and plots three key levels on your chart:
✅ **0.5x ABR** – Half the average bar range
✅ **1x ABR** – The full average bar range
✅ **2x ABR** – Double the average bar range
This provides an **instant volatility gauge**, helping traders adjust position size, stop losses, and targets **based on current market conditions** rather than arbitrary numbers.
### **How It Works**
- The indicator calculates **the average range of the last 8 bars** (default setting, adjustable).
- The **ABR levels update in real time**, appearing in the **top-right corner of your chart** for easy reference.
- Works across **any instrument and timeframe** – great for scalpers and intraday traders.
### **Why Use ABR Levels?**
🚀 **Avoid oversized losses** – Trade dynamically instead of using fixed stops and targets.
📉 **Recognize shifts in market conditions** – Identify when volatility is expanding or contracting.
🎯 **Refine your entries & exits** – Use ABR levels to **scale** your positions intelligently.
### **Pro Tip:**
Never enter a trade **aiming for half-R** profits. If a trade goes badly, **you might manage it to break even or half-R**, but aiming for tiny wins will **wreck your long-term edge**.
🔹 **This script is open-source!** If you're not on TradingView, you can copy the code into any AI tool to generate it for your platform. 🚀
Heikin-Ashi Reversals with Region & DotsIf you want to use Heiken Ashi candles as a way to screen for bullish and bearish reversal.
Green background is stay long and strong. Red background = potential top or bearish continuation.
Yellow dots show strong red heiken ashi candles with small upside wicks. The next candle determines whether it should be green or red. If next heiken ashi candle closes above the current candle = green, bull trend still in line. If next heiken ashi candle closes below, then time to sell
Sniper Trade Pro (ES 15-Min) - Topstep Optimized🔹 Overview
Sniper Trade Pro is an advanced algorithmic trading strategy designed specifically for E-mini S&P 500 (ES) Futures on the 15-minute timeframe. This strategy is optimized for Topstep 50K evaluations, incorporating strict risk management to comply with their max $1,000 daily loss limit while maintaining a high probability of success.
It uses a multi-confirmation approach, integrating:
✅ Money Flow Divergence (MFD) → To track liquidity imbalances and institutional accumulation/distribution.
✅ Trend Confirmation (EMA + VWAP) → To identify strong trend direction and avoid choppy markets.
✅ ADX Strength Filter → To ensure entries only occur in trending conditions, avoiding weak setups.
✅ Break-Even & Dynamic Stop-Losses → To reduce drawdowns and protect profits dynamically.
This script automatically generates Buy and Sell signals and provides built-in risk management for automated trading execution through TradingView Webhooks.
🔹 How Does This Strategy Work?
📌 1. Trend Confirmation (EMA + VWAP)
The strategy uses:
✔ 9-EMA & 21-EMA: Fast-moving averages to detect short-term momentum.
✔ VWAP (Volume-Weighted Average Price): Ensures trades align with institutional volume flow.
How it works:
Bullish Condition: 9-EMA above 21-EMA AND price above VWAP → Confirms buy trend.
Bearish Condition: 9-EMA below 21-EMA AND price below VWAP → Confirms sell trend.
📌 2. Liquidity & Money Flow Divergence (MFD)
This indicator measures liquidity shifts by tracking momentum changes in price and volume.
✔ MFD Calculation:
Uses Exponential Moving Average (EMA) of Momentum (MOM) to detect changes in buying/selling pressure.
If MFD is above its moving average, it signals liquidity inflows → bullish strength.
If MFD is below its moving average, it signals liquidity outflows → bearish weakness.
Why is this important?
Detects when Smart Money is accumulating or distributing before major moves.
Filters out false breakouts by confirming momentum strength before entry.
📌 3. Trade Entry Triggers (Candlestick Patterns & ADX Filter)
To avoid random entries, the strategy waits for specific candlestick confirmations with ADX trend strength:
✔ Bullish Entry (Buy Signal) → Requires:
Bullish Engulfing Candle (Reversal confirmation)
ADX > 20 (Ensures strong trending conditions)
MFD above its moving average (Liquidity inflows)
9-EMA > 21-EMA & price above VWAP (Trend confirmation)
✔ Bearish Entry (Sell Signal) → Requires:
Bearish Engulfing Candle (Reversal confirmation)
ADX > 20 (Ensures strong trending conditions)
MFD below its moving average (Liquidity outflows)
9-EMA < 21-EMA & price below VWAP (Trend confirmation)
📌 4. Risk Management & Profit Protection
This strategy is built with strict risk management to maintain low drawdowns and maximize profits:
✔ Dynamic Position Sizing → Automatically adjusts trade size to risk a fixed $400 per trade.
✔ Adaptive Stop-Losses → Uses ATR-based stop-loss (0.8x ATR) to adapt to market volatility.
✔ Take-Profit Targets → Fixed at 2x ATR for a Risk:Reward ratio of 2:1.
✔ Break-Even Protection → Moves stop-loss to entry once price moves 1x ATR in profit, locking in gains.
✔ Max Daily Loss Limit (-$1,000) → Stops trading if total losses exceed $1,000, complying with Topstep rules.
Time Box Breakout IndicatorPlots Boxes with breakout signals on whatever timeframe the user selects.
Allows for users to see higher timeframe ranges on lower timeframes.
Useful for scalpers taking advantage of momentum, combined with support and resistance on higher timeframes.
Aids in visualizing risk, ranges and trends.
Wick Order IndicatorThe script tells you what formed first in the wick, the high or the low.
If the high formed first, the upper wick would be labeled 1 and lower wick would be labeled 2.
If the low formed first, the lower wick would be labeled 1 and higher wick would be labeled 2.
If there's only one wick or no wicks, there would be no labels.