Quick Analysis [ProjeAdam]OVERVIEW:
The Quick Analysis indicator is a multi-symbol technical screener that aggregates key indicator values—RSI, TSI, ADX, and Supertrend—for up to 30 different symbols. It displays the data on a customizable dashboard table overlaid on the chart, enabling traders to quickly compare market conditions across multiple assets.
ALGORITHM:
1. Initialization and Input Setup
The script sets the indicator’s title, short title, and overlay option.
It configures the dashboard table by allowing users to toggle its display, set its position (e.g., Bottom Right), and choose its size.
Input parameters for the technical indicators (RSI, TSI, ADX, Supertrend) are defined.
Up to 30 symbols are provided with toggle options so that users can select which ones to include in the analysis.
2. Technical Indicator Calculations
Custom functions are defined to smooth data for TSI (using double EMA smoothing) and to calculate ADX based on directional movements.
The main function, which runs on each symbol via request.security, computes:
RSI based on the close price.
TSI using the change in price and smoothing techniques.
ADX by comparing positive and negative directional movements.
Supertrend to signal market direction changes.
3. Data Aggregation and Matrix Formation
A matrix is created to store the aggregated values (price, RSI, TSI, ADX, Supertrend) for each symbol.
For each enabled symbol, a custom function retrieves the current indicator values and adds them as a row to the matrix.
4. Table Visualization and Dynamic Updates
A dashboard table is initialized with user-defined location and size settings.
The table headers include “SYMBOL”, “PRICE”, “RSI”, “TSI”, “ADX”, and “Supertrend”.
For every row in the matrix, the table is updated with the corresponding data:
The symbol code is extracted and displayed.
The current price and computed indicator values are shown.
Conditional formatting is applied (RSI and TSI cells change color based on threshold levels, Supertrend is marked with “Down 📛” or “Up 🚀”).
5. Real-Time Data Updates
The table refreshes on every new bar, ensuring that the displayed data remains current and reflects the latest market conditions across the selected symbols.
INDICATOR SUMMARY: RSI, TSI, ADX, and Supertrend
RSI (Relative Strength Index): Measures the speed and change of price movements, oscillating between 0 and 100. Typically, values above 70 indicate overbought conditions, while values below 35 indicate oversold conditions.
TSI (True Strength Index): Uses double EMA smoothing to measure price momentum and helps identify trend strength and potential reversal points.
ADX (Average Directional Index): Measures the strength of a trend, regardless of its direction. Higher values suggest a strong trend, while lower values indicate a weak trend.
Supertrend: A trend-following indicator based on the Average True Range (ATR) that identifies the market direction and potential support/resistance levels. It typically displays visual signals such as “Up 🚀” or “Down 📛.”
HOW DOES THE INDICATOR WORK?
Data Gathering: Uses TradingView’s security function to request real-time data for multiple symbols simultaneously.
Indicator Computation: For each symbol, the script calculates RSI, TSI, ADX, and Supertrend using a blend of built-in Pine Script functions and custom smoothing algorithms.
Visualization: A dynamically updated table displays the results with conditional colors and symbols for immediate visual cues on market trends and potential trade signals.
SETTINGS PANEL
Dashboard Configuration: Options to toggle the Trend Table, select its position, and determine the table size.
Indicator Parameters: Customizable settings for RSI (length, overbought/oversold levels), TSI (smoothing lengths and thresholds), ADX (smoothing and DI length), and Supertrend (ATR length and factor).
Symbol Management: Enable/disable switches for each of the 30 symbols along with symbol input fields, allowing users to choose which assets to analyze.
BENEFITS OF THE QUICK ANALYSIS INDICATOR
Comprehensive Market Overview:
Aggregates key technical metrics for multiple symbols on a single chart.
Customizability and Flexibility:
Fully configurable dashboard and indicator settings allow tailoring to various trading strategies.
Time Efficiency:
Automates the process of monitoring multiple assets, saving traders time and effort.
Visual Clarity:
Conditional color coding and clear table formatting provide immediate insights into market conditions.
Enhanced Multi-Market Analysis:
The ability to toggle and compare up to 30 different symbols supports diversified market evaluation.
CUSTOMIZATION
Users can modify indicator periods, thresholds, and table aesthetics through the input panel.
The symbol selection mechanism enables dynamic analysis across various markets, facilitating comparative insights and strategic decision-making.
CONCLUSION
The Quick Analysis indicator serves as a powerful, multi-symbol screener for traders by consolidating crucial technical indicators into a single, easy-to-read dashboard. Its dynamic updates, extensive customization options, and clear visual representation make it an essential tool for real-time market analysis.
If you have any ideas to further enhance this tool—whether by integrating additional sources, refining calculations, or adding new features—please feel free to suggest them in DM.
Biến động
Emperor RSI CandleDescription:
The Emperor RSI Candle is a real-time, non-lagging trading indicator that colors candles based on RSI (Relative Strength Index) levels. It offers instant visual feedback on market momentum, making it easy to identify trend strength, overbought/oversold zones, and potential reversals with precision.
Unlike traditional RSI indicators, which display RSI values in a separate panel, Emperor RSI Candle integrates RSI signals directly into the candles, providing a cleaner, more intuitive charting experience. Its multi-timeframe RSI box shows RSI values across different timeframes, offering confluence confirmation for better trade decisions.
🔥 Emperor RSI Candle is original because it includes a multi-timeframe RSI box that displays RSI values from:
1 min → Monthly timeframes simultaneously.
📊 How this is unique:
Traders can instantly compare RSI values across different timeframes.
This helps them spot confluence and divergences, which is not possible with standard RSI indicators.
The multi-timeframe confluence feature makes the indicator highly effective for both short-term and long-term traders.
🚀 What the script does:
Real-time candle coloring based on RSI levels.
Multi-timeframe RSI box for confluence insights.
Customizable RSI settings for adaptability.
How it benefits traders:
Instant visual feedback for momentum and reversals.
No lag signals for precise trading decisions.
Flexible customization for different trading styles.
Unique visual signals:
Green, red, parrot green, and blue candles → Clearly indicating bullish/bearish momentum and overbought/oversold zones.
Multi-timeframe RSI box → For cross-timeframe confluence.
⚡️ 🔥 UNIQUE FEATURES 🔥:
✅ Multi-Timeframe RSI Box:
Displays RSI values from 1 min to monthly timeframes, helping traders confirm confluence across different timeframes.
✅ Fully Customizable RSI Levels & Display:
Modify RSI thresholds, source, and appearance to fit your trading style.
✅ Dynamic Candle Borders for Weak Signals:
Green border → Weak bullishness (RSI between 50-60).
Red border → Weak bearishness (RSI between 40-50).
✅ Lag-Free, Real-Time Accuracy:
No repainting or delay—instant visual signals for accurate decisions.
✅ Scalable for Any Trading Style:
Perfect for both intraday scalping and positional trading.
📊 🔥 HOW IT WORKS 🔥:
The indicator dynamically colors candles based on RSI values, providing real-time visual signals:
🟢 Above 60 RSI → Green candle:
Indicates bullish momentum, signaling potential upward continuation.
🟩 Above 80 RSI → Parrot green candle:
Overbought zone → Possible reversal or profit booking.
🟥 Below 40 RSI → Red candle:
Signals bearish momentum, indicating potential downward continuation.
🔵 Below 20 RSI → Blue candle:
Oversold zone → Possible reversal opportunity.
🔲 Neutral candles:
50-60 RSI → Green border: Weak bullishness.
40-50 RSI → Red border: Weak bearishness.
📊 🔥 MULTI-TIMEFRAME RSI BOX 🔥:
The Emperor RSI Candle includes an RSI box displaying multi-timeframe RSI values from 1 min to monthly. This provides:
✅ Confluence confirmation:
Compare RSI across multiple timeframes to strengthen trade conviction.
✅ Spot divergences:
Identify hidden trends by comparing smaller and larger timeframes.
✅ Validate trade entries/exits:
Use higher timeframe RSI to confirm smaller timeframe signals
⚙️ 🔥 HOW TO USE IT 🔥:
To maximize the accuracy and clarity of Emperor RSI Candle, follow these steps:
🔧 STEP 1: Chart Settings Configuration
Go to Chart Settings → Symbols
Uncheck the following options:
Body
Borders
Wick
✅ This ensures that only the Emperor Candle colors are visible, making the signals clear and distinct.
🔧 STEP 2: Style Settings for Emperor Candle
After applying the Emperor RSI Candle:
Go to Settings → Style tab
Wick section:
Select Color 2 and Color 3 → Set Opacity to 100%.
Border section:
Select Color 2 and Color 3 → Set Opacity to 100%.
✅ This ensures the candles display with full visibility and accurate colors.
⚙️ 🔥 CUSTOMIZATION OPTIONS 🔥:
Emperor RSI Candle offers full flexibility to match your trading style:
✅ RSI Length:
Modify the period used for RSI calculation (default: 10).
✅ Top & Bottom Levels:
Adjust the overbought (default: 80) and oversold (default: 20) thresholds.
✅ Intermediate Levels:
Up Level: Default: 60 → Bullish RSI threshold.
Down Level: Default: 40 → Bearish RSI threshold.
Mid Level: Default: 50 → Neutral zone.
✅ RSI Source:
Select the price source for RSI calculation (Close, Open, High, Low).
✅ RSI Period:
Customize the RSI calculation period (default: 10).
✅ Font Size:
Adjust the RSI box font size for better visibility.
✅ Box Position:
Choose where to display the RSI box:
Top Left / Top Center / Top Right
Bottom Left / Bottom Center / Bottom Right
💡 🔥 HOW IT IMPROVES TRADING 🔥:
✅ Clear trend identification:
Instantly recognize bullish, bearish, or neutral conditions through candle colors.
✅ Precise entries and exits:
Spot overbought and oversold zones with visual clarity.
✅ Multi-timeframe confirmation:
Validate trades with RSI confluence across multiple timeframes.
✅ No lag, real-time accuracy:
Immediate visual signals for faster and more reliable trade decisions.
✅ Customizable settings:
Tailor the indicator to fit your trading strategy and preferences.
✅ Works for all trading styles:
Suitable for scalping, day trading, and swing trading.
🔥How Traders Can Use Emperor RSI Candle for Trading:
🟢 Green Candles (Above 60 RSI) → Bullish Momentum:
Indicates strong upward movement → Ideal for long entries.
Traders can hold until RSI approaches 80 for profit booking.
🟥 Red Candles (Below 40 RSI) → Bearish Momentum:
Signals strong downward movement → Ideal for short trades.
Traders can exit or book profits near RSI 20.
2. Spotting Overbought and Oversold Zones for Reversals:
🟩 Parrot Green Candles (Above 80 RSI) → Overbought Zone:
Indicates potential for reversals or profit booking.
Traders can tighten stop-losses or exit positions.
🔵 Blue Candles (Below 20 RSI) → Oversold Zone:
Signals a potential reversal opportunity.
Traders can look for buy signals with confluence confirmation.
3. Catching Weak Bullish and Bearish Trends with Border Colors:
🟢 Green Border (RSI 50-60) → Weak Bullishness:
Indicates mild upward momentum.
Traders can consider cautious long entries.
🔴 Red Border (RSI 40-50) → Weak Bearishness:
Indicates mild downward pressure.
Traders can consider cautious short entries.
4. Using the RSI Multi-Timeframe Box for Confluence:
✅ Displays RSI values from 1 min to monthly timeframes.
Usage:
Confluence confirmation:
Multiple timeframes showing bullish RSI → Strong uptrend → Reliable buy signals.
Multiple timeframes showing bearish RSI → Strong downtrend → Reliable sell signals.
Spotting divergences:
If lower timeframes are bullish but higher timeframes are bearish, it indicates a potential reversal.
5. Customization Tips for Different Trading Styles:
✅ For Scalping:
Use a smaller RSI period (9-10) for faster signals.
Check the multi-timeframe RSI box to confirm signals quickly.
✅ For Swing Trading:
Use the default RSI period (14-15) for more accurate signals.
Focus on higher timeframes (1 hr, 4 hr, daily) for stronger trend confirmation.
StockLeave Risk ModuleOverview
This indicator provides a visual reference to determine position size and approximate risk-to-reward. It is designed to support trade planning by calculating equalized risk per trade based on a stop distance derived from volatility. Additionally, it displays potential outcomes relative to structural references on the chart, such as the mean price and Keltner band extremes.
This tool is not intended for precision or predictive analysis, but rather for estimative usage; offering supportive reference points that allow for quick evaluation of risk-to-reward and position size.
Equalized Risk Per Trade
The indicator calculates the number of shares that can be traded while maintaining consistent monetary risk. The formula is based on the distance between the current price and the visual stop reference, adjusting the position size proportionally.
Position Size = Dollar Risk / (Entry Price - Stop Price)
The monetary risk is calculated as a percentage of account size; both of which can be set in the indicator’s settings tab. This creates a consistent risk exposure across trades regardless of volatility or structural stop distance.
Stop Placement Reference
The visual stop reference is by default located at 2× ATR from the current price, providing a volatility-based anchor. While this value can be customized, it serves as a practical reference when a structural stop has not yet been defined. It allows quick scenario building and visual feedback.
Visual Risk-Reward Projection
The module provides approximate reward-to-risk (R/R) projections based on dynamic price references. These should not be interpreted as practical trade targets, but rather as estimations of average price volatility and structural movement. Their purpose is to help assess directional potential relative to predefined risk.
Upper Keltner Band (Upper): Represents the upper boundaries. In bullish events, prices may expand towards this zone, completing movement from mean to upper structural extreme.
Moving Average (Mean): Represents the midpoint of structure. In reversion events, prices may revert toward this zone, completing the move from extreme back to mean.
Lower Keltner Band (Lower): Represents the lower boundaries. In bearish events, price may expand towards this zone, completing movement from mean to lower structural extreme.
The tool calculates the R/R multiple between the current price and each of these reference points in relation to the visual stop reference. This allows for a quick evaluation of risk-reward potential based on structural context and prevailing volatility. These are visible in the Signal Bars indicator. These are reference points and should should be interpreted with contextual structure.
Chart Elements
ATR Dots: Plotted above and below the current price as reference points for theoretical stop placement. The default distance is set to 2× ATR but can be adjusted in the indicator settings.
Information Table: Displays the number of shares to trade, along with R/R projections to the mean and both Keltner bands. This offers a quick overview for evaluating position sizing and potential reward relative to risk.
This indicator is accompanied by the Signal Bars Indicator .
Ratio S/RRatio S/R - Intraday Support & Resistance Levels
Introduction
This script identifies key intraday support and resistance (S/R) levels where price tends to reverse frequently. It is designed specifically for intraday trading and aims to help traders find high-probability reversal zones.
The logic behind the script revolves around logarithmic returns, historical volatility, and ratio-based price levels. The script dynamically calculates price ranges using standard deviation-based volatility and applies preset ratio levels to determine potential support and resistance zones.
How It Works
Dynamic Range Calculation
The script calculates the price range based on the previous day’s logarithmic return volatility.
The range is then used to project different levels of price movement.
Reference Price
You can choose whether the reference price is from today’s open or yesterday’s close (oporcl setting).
This helps adapt the levels based on market behavior.
Ratio-Based Levels
The script applies specific ratios to the calculated range:
0.0833 (Minor Reversal Zone)
0.25 & 0.38 (Primary Reversal Zones)
0.62 & 0.75 (Significant Reversal Zones)
1.0 & 1.25 (Extreme Reversal Zones)
These levels act as potential support and resistance points.
Disclaimer: This is just for educational purpose . Trading is risky activity and how you use this tool is your own responsibility. The publisher of this tool does not make any claims.
02 SMC + BB Breakout (Improved)This strategy combines Smart Money Concepts (SMC) with Bollinger Band breakouts to identify potential trading opportunities. SMC focuses on identifying key price levels and market structure shifts, while Bollinger Bands help pinpoint overbought/oversold conditions and potential breakout points. The strategy also incorporates higher timeframe trend confirmation to filter out trades that go against the prevailing trend.
Key Components:
Bollinger Bands:
Calculated using a Simple Moving Average (SMA) of the closing price and a standard deviation multiplier.
The strategy uses the upper and lower bands to identify potential breakout points.
The SMA (basis) acts as a centerline and potential support/resistance level.
The fill between the upper and lower bands can be toggled by the user.
Higher Timeframe Trend Confirmation:
The strategy allows for optional confirmation of the current trend using a higher timeframe (e.g., daily).
It calculates the SMA of the higher timeframe's closing prices.
A bullish trend is confirmed if the higher timeframe's closing price is above its SMA.
This helps filter out trades that go against the prevailing long-term trend.
Smart Money Concepts (SMC):
Order Blocks:
Simplified as recent price clusters, identified by the highest high and lowest low over a specified lookback period.
These levels are considered potential areas of support or resistance.
Liquidity Zones (Swing Highs/Lows):
Identified by recent swing highs and lows, indicating areas where liquidity may be present.
The Swing highs and lows are calculated based on user defined lookback periods.
Market Structure Shift (MSS):
Identifies potential changes in market structure.
A bullish MSS occurs when the closing price breaks above a previous swing high.
A bearish MSS occurs when the closing price breaks below a previous swing low.
The swing high and low values used for the MSS are calculated based on the user defined swing length.
Entry Conditions:
Long Entry:
The closing price crosses above the upper Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bullish.
A bullish MSS must have occurred.
Short Entry:
The closing price crosses below the lower Bollinger Band.
If higher timeframe confirmation is enabled, the higher timeframe trend must be bearish.
A bearish MSS must have occurred.
Exit Conditions:
Long Exit:
The closing price crosses below the Bollinger Band basis.
Or the Closing price falls below 99% of the order block low.
Short Exit:
The closing price crosses above the Bollinger Band basis.
Or the closing price rises above 101% of the order block high.
Position Sizing:
The strategy calculates the position size based on a fixed percentage (5%) of the strategy's equity.
This helps manage risk by limiting the potential loss per trade.
Visualizations:
Bollinger Bands (upper, lower, and basis) are plotted on the chart.
SMC elements (order blocks, swing highs/lows) are plotted as lines, with user-adjustable visibility.
Entry and exit signals are plotted as shapes on the chart.
The Bollinger band fill opacity is adjustable by the user.
Trading Logic:
The strategy aims to capitalize on Bollinger Band breakouts that are confirmed by SMC signals and higher timeframe trend. It looks for breakouts that align with potential market structure shifts and key price levels (order blocks, swing highs/lows). The higher timeframe filter helps avoid trades that go against the overall trend.
In essence, the strategy attempts to identify high-probability breakout trades by combining momentum (Bollinger Bands) with structural analysis (SMC) and trend confirmation.
Key User-Adjustable Parameters:
Bollinger Bands Length
Standard Deviation Multiplier
Higher Timeframe
Higher Timeframe Confirmation (on/off)
SMC Elements Visibility (on/off)
Order block lookback length.
Swing lookback length.
Bollinger band fill opacity.
This detailed description should provide a comprehensive understanding of the strategy's logic and components.
***DISCLAIMER: This strategy is for educational purposes only. It is not financial advice. Past performance is not indicative of future results. Use at your own risk. Always perform thorough backtesting and forward testing before using any strategy in live trading.***
Volatility Layered Supertrend [NLR]We’ve all used Supertrend, but do you know where to actually enter a trade? Volatility Layered Supertrend (VLS) is here to solve that! This advanced trend-following indicator builds on the classic Supertrend by not only identifying trends and their strength but also guiding you to the best trade entry points. VLS divides the main long-term trend into “Strong” and “Weak” Zones, with a clear “Trade Entry Zone” to help you time your trades with precision. With layered trends, dynamic profit targets, and volatility-adaptive bands, VLS delivers actionable signals for any market.
Why I Created VLS Over a Plain Supertrend
I built VLS to address the gaps in traditional Supertrend usage and make trade entries clearer:
Single-Line Supertrend Issues: The default Supertrend sets stop-loss levels that are too wide, making it impractical for most traders to use effectively.
Unclear Entry Points: Standard Supertrend doesn’t tell you where to enter a trade, often leaving you guessing or entering too early or late.
Multi-Line Supertrend Enhancement: Many traders use short, medium, and long Supertrends, which is helpful but can lack focus. In VLS, I include Short, Medium, and Long trends (using multipliers 1 to 3), and add multipliers 4 and 5 to track extra long-term trends—helping to avoid fakeouts that sometimes occur with multiplier 3.
My Solution: I focused on the main long-term Supertrend and split it into “Weak Zone” and “Strength Zone” to show the trend’s reliability. I also defined a “Trade Entry Zone” (starting from the Mid Point, with the first layer’s background hidden for clarity) to guide you on where to enter trades. The zones include Short, Medium, and Long Trend layers for precise entries, exits, and stop-losses.
Practical Trading: This approach provides realistic stop-loss levels, clear entry points, and a “Profit Target” line that aligns with your risk tolerance, while filtering out false signals with longer-term trends.
Key Features
Layered Trend Zones: Short, Medium, Long, and Extra Long Trend layers (up to multipliers 4 and 5) for timing entries and exits.
Strong & Weak Zones: See when the trend is reliable (Strength Zone) or needs caution (Weak Zone).
Trade Entry Zone: A dedicated zone starting from the Mid Point (first layer’s background hidden) to show the best entry points.
Dynamic Profit Targets: A “Profit Target” line that adjusts with the trend for clear goals.
Volatility-Adaptive: Uses ATR to adapt to market conditions, ensuring reliable signals.
Color-Coded: Green for uptrends, red for downtrends—simple and clear.
How It Works
VLS enhances the main long-term Supertrend by dividing it into two zones:
Weak Zone: Indicates a less reliable trend—use tighter stop-losses or wait for the price to reach the Trade Entry Zone.
Strength Zone: Signals a strong trend—ideal for entries with wider stop-losses for bigger moves.
The “Trade Entry Zone” starts at the Mid Point (last layer’s background hidden for clarity), showing you the best area to enter trades. Each zone includes Short, Medium, Long, and Extra Long Trend sublevels (up to multipliers 4 and 5) for precise trade timing and to filter out fakeouts. The “Profit Target” updates dynamically based on trend direction and volatility, giving you a clear goal.
How to Use
Spot the Trend: Green bands = buy, red bands = sell.
Check Strength: Price in Strength Zone? Trend’s reliable—trade confidently. In Weak Zone? Use tighter stops or wait.
Enter Trades: Use the “Trade Entry Zone” (from the Mid Point upward) for the best entry points.
Use Sublevels: Short, Medium, Long, and Extra Long layers in each zone help fine-tune entries and exits.
Set Targets: Follow the Profit Target line for goals—it updates automatically.
Combine Tools: Pair with RSI, MACD, or support/resistance for added confirmation.
Settings
ATR Length: Adjust the ATR period (default 10) to change sensitivity.
Up/Down Colors: Customize colors—green for up, red for down, by default.
Time x Sales)Time x Sales Indicator (Enhanced Features)
This indicator displays a real-time Time and Sales (T&S) table with 10 columns: Timestamp, Price, Size (with arrows), Filled At (red for Ask, blue for Bid), Bid Size, Bid, Ask, Ask Size, Trades, and Average. It features dynamic color intensity, volume trend in the header, customizable themes (Basic, Dark Mode, Light Mode, Minimalist, Vibrant), highlighting for large trades, alternating row colors, thousands separators, and adjustable price decimals for enhanced trading analysis.
How to Use the Time x Sales Indicator
View the Table: The Time and Sales table appears on your chart (default: top-right) with 10 columns, each showing specific trade data:
Timestamp: Displays the time of each trade (e.g., "HH:MM:SS MM/DD"). Use this to track when trades occur.
Price: Shows the price at which the trade executed. Compare prices to see price movement trends.
Size: Indicates the trade volume (number of contracts/shares) with an arrow (↑ for price increase, ↓ for decrease, — for no change). Higher sizes suggest stronger market activity.
Filled At: Marks if the trade was at the "Bid" (blue, buyer-initiated) or "Ask" (red, seller-initiated). This helps identify buying or selling pressure.
Bid Size: Simulated size of buy orders at the bid price. Larger numbers indicate stronger buying interest.
Bid: Simulated bid price (slightly below the current price). It represents the highest price buyers are willing to pay.
Ask: Simulated ask price (slightly above the current price). It shows the lowest price sellers are offering.
Ask Size: Simulated size of sell orders at the ask price. Larger numbers suggest more selling interest.
Trades: Counts the number of trades in the update period. A higher count indicates more frequent trading activity.
Average: Shows the average trade size in the update period. Use this to gauge typical trade volume.
Customize Settings:
Adjust table position, number of rows, and sort order (Newest First/Last) in the indicator settings.
Set price decimal places and enable/disable thousands separators.
Choose a color theme (e.g., Dark Mode) and toggle buy/sell colors or dynamic intensity.
Highlight trades by setting size or price thresholds.
Monitor Trades: Watch the table update in real-time, with volume trends in the header (↑ for increasing, ↓ for decreasing, — for stable) and color-coded Filled At (red for Ask, blue for Bid).
Adjust Responsiveness: If updates are slow, reduce the "Update Cooldown (ms)" value in the settings (e.g., to 0 or 50) for faster refreshes.
Black–Scholes model - Options premium calculatorBlack-Scholes Options Pricing Calculator in Pine Script Introduction
The Black-Scholes model is one of the most widely used mathematical models for pricing options. It provides a theoretical estimate of the price of European-style options based on factors such as the underlying asset price, strike price, time to expiration, volatility, risk-free rate, and option type.
This Pine Script implementation of the Black-Scholes options pricing model enables traders to calculate call and put option prices directly within TradingView, helping them assess potential trades more efficiently.
What Does This Script Do?
This script allows traders to input essential option parameters and instantly calculate both call and put option prices using the Black-Scholes formula. It provides:
• A user-friendly interface for inputting option parameters.
• Automatic computation of option prices.
• Real-time updates as market data changes.
Key Features:
• Uses the Black-Scholes formula to compute European call and put option prices.
• User-defined inputs for stock price, strike price, time to expiration, volatility, and risk-free rate.
• Displays calculated option prices on the TradingView chart.
Understanding the Black-Scholes Formula:
The Black-Scholes model is given by the following equations:
C=S0N(d1)−Xe−rtN(d2)C = S_0 N(d_1) - Xe^{-rt} N(d_2) P=Xe−rtN(−d2)−S0N(−d1)P = Xe^{-rt} N(-d_2) - S_0 N(-d_1)
Where:
• CC = Call option price
• PP = Put option price
• S0S_0 = Current stock price
• XX = Strike price
• rr = Risk-free interest rate
• tt = Time to expiration (in years)
• σ\sigma = Volatility of the stock (annualized)
• N(x)N(x) = Cumulative standard normal distribution
• d1d_1 and d2d_2 are given by:
d1=ln(S0/X)+(r+σ2/2)tσtd_1 = \frac{ \ln(S_0/X) + (r + \sigma^2/2)t }{ \sigma \sqrt{t} } d2=d1−σtd_2 = d_1 - \sigma \sqrt{t}
This script implements these calculations efficiently in Pine Script to help traders quickly determine fair values for options based on current market conditions.
Example Calculation:
(The following example values were true at the time of publishing this script. Option prices fluctuate constantly, so actual values may vary.)
• Underlying asset price (NIFTY): 23,519.35
• ATM Call Strike Price: 23,500
• ATM Put Strike Price: 23,550
• IV (Implied Volatility) for Call Option: 8.1%
• IV (Implied Volatility) for Put Option: 10.1%
• Expiry Date: April 3, 2025
Using the Black-Scholes model, the calculated theoretical prices are:
• Theoretical ATM CE price: ₹129
• Theoretical ATM PE price: ₹118
For comparison, the actual option prices from the option chain table at the time of writing were:
• Actual ATM CE price: ₹139.70
• Actual ATM PE price: ₹120.30
As we can see, there is a larger difference between the theoretical price and actual market price for the ATM Call option compared to the ATM Put option.
If you're an experienced trader, you likely know how to use this kind of information to identify potential market inefficiencies or trading opportunities.
How to Use This Script:
1. Add the script to your TradingView chart.
2. Input the necessary parameters such as stock price, strike price, volatility, risk-free rate, and time to expiration.
3. View the calculated call and put option prices directly on the chart.
This Black-Scholes options pricing calculator provides a convenient way to compute theoretical option prices within TradingView. It helps traders analyse whether an option is fairly priced based on market conditions.
While the Black-Scholes model has its limitations (e.g., it does not account for early exercise of American options or dividend payments), it remains a powerful tool for European-style options pricing and a foundational concept in financial markets.
A handy little tool! Unfortunately, this script requires manual data entry since automatic data capture is currently not possible. If this ever becomes feasible in the future, an updated version will be released.
Try it out and let me know your feedback!
Disclaimer:
Please note that this is only for study/educational purpose and is just one of the many tools a trader may use.
Use it at your own risk.
Regards!
ATRs in Days📌 ATR in Days
This script tracks how price moves in relation to ATR over multiple days, providing a powerful volatility framework for traders.
🔹 Key Features:
✅ 4 ATRs in 5 Days – Measures if a stock has moved 4x its ATR within the last 5 days, identifying extreme volatility zones.
✅ Daily ATR Calculation – Tracks average true range over time to gauge market conditions.
✅ Clear Table Display – Real-time ATR readings for quick decision-making.
✅ Intraday & Swing Trading Compatible – Works across multiple timeframes for day traders & swing traders.
📊 How to Use:
Look for stocks that exceed 4 ATRs in 5 days to spot extended moves.
Use ATR as a reversion or continuation signal depending on market structure.
🚀 Perfect for traders looking to quantify volatility & structure trades effectively!
BB LevelsBB Levels — Volatility-Based Weekly Trading Ranges
Overview:
BB Levels is a multi-timeframe indicator that projects weekly trading ranges using historical price behavior and volatility modeling. It combines data from both the 4H and Daily timeframes to provide a dual-perspective view of expected price extremes.
Solid Lines → Based on the Daily timeframe (smoother, broader volatility)
Dashed Lines → Based on the 4H timeframe (finer, more reactive to short-term volatility)
How It Works:
The indicator employs a Markov Switching Model to estimate the prevailing market regime and generate a forecasted directional bias. It then applies average historical volatility to project a weekly range:
The centerline is a forecasted “zero level” based on the prior week’s close, adjusted by regime and trend forecast.
The upper and lower bounds are derived from average weekly volatility, scaled to reflect expected movement.
Two versions are shown:
Daily (solid): Represents the more conservative, long-term expectations.
4H (dashed): Captures short-term momentum and faster volatility shifts.
Important Note:
These levels represent statistical expectations, not fixed boundaries. Price may:
Consolidate within the dashed (4H) range during quiet periods
Break beyond the solid (Daily) range during news events or trending expansions
Designed For:
Swing traders seeking structured, volatility-adjusted weekly levels
Day traders targeting high-probability reversal zones
Strategists combining trend forecasting with expected price behavior
Open Range Volatility (High/Low %)Overview
The Open-to-High/Low Movement Indicator helps traders visualize the percentage change between the opening price and the highest & lowest points of each trading session. This indicator is particularly useful for identifying intraday volatility, momentum strength, and potential reversals.
Key Features
✅ Real-Time High/Low Percentage Movement – Calculates and plots the percentage movement from the opening price to both the session high (green line) and session low (red line).
✅ Separate Chart Pane – Keeps your main price chart clean while displaying movements in a separate panel.
✅ Zero Reference Line – Helps distinguish upward and downward movements.
✅ +10% and -10% Threshold Lines – Assists in identifying significant price swings.
✅ Customizable & Lightweight – Efficiently tracks market movements without slowing down your chart.
How to Use
When the green line moves higher, it indicates strong buying pressure after the open.
When the red line moves lower, it shows selling pressure from the open price.
If movements stay within a small range, the market is experiencing low volatility.
Extreme movements beyond ±10% can indicate potential breakout or reversal zones.
Best for:
📈 Day traders tracking intraday momentum
📊 Swing traders spotting volatility trends
⚡ Scalpers identifying quick price movements
💡 Volatility-based strategies
This indicator works across all timeframes and asset classes, including stocks, forex, commodities, and crypto.
🚀 Add this to your chart today and stay ahead of the market!
Spent Output Profit Ratio (SOPR) Z-Score | [DeV]SOPR Z-Score
The Spent Output Profit Ratio (SOPR) is an advanced on-chain metric designed to provide deep insights into Bitcoin market dynamics by measuring the ratio between the combined USD value of all Bitcoin outputs spent on a given day and their combined USD value at the time of creation (typically, their purchase price). As a member of the Realized Profit/Loss family of metrics, SOPR offers a window into aggregate seller behavior, effectively representing the USD amount received by sellers divided by the USD amount they originally paid. This indicator enhances this metric by normalizing it into a Z-Score, enabling a statistically robust analysis of market sentiment relative to historical trends, augmented by a suite of customizable features for precision and visualization.
SOPR Settings -
Lookback Length (Default: 150 days): Determines the historical window for calculating the Z-Score’s mean and standard deviation. A longer lookback captures broader market cycles, providing a stable baseline for identifying extreme deviations, which is particularly valuable for long-term strategic analysis.
Smoothing Period (Default: 100 days): Applies an EMA to the raw SOPR, balancing responsiveness to recent changes with noise reduction. This extended smoothing period ensures the indicator focuses on sustained shifts in seller behavior, ideal for institutional-grade trend analysis.
Moving Average Settings -
MA Lookback Length (Default: 90 days): Sets the period for the Z-Score’s moving average, offering a shorter-term trend signal relative to the 150-day Z-Score lookback. This contrast enhances the ability to detect momentum shifts within the broader context.
MA Type (Default: EMA): Provides six moving average types, from the simple SMA to the volume-weighted VWMA. The default EMA strikes an optimal balance between smoothness and responsiveness, while alternatives like HMA (Hull) or VWMA (volume-weighted) allow for specialized applications, such as emphasizing recent price action or incorporating volume dynamics.
Display Settings -
Show Moving Average (Default: True): Toggles the visibility of the Z-Score MA plot, enabling users to focus solely on the raw Z-Score when preferred.
Show Background Colors (Default: True): Activates dynamic background shading, enhancing visual interpretation of market regimes.
Background Color Source (Default: SOPR): Allows users to tie the background color to either the SOPR Z-Score’s midline (reflecting adjustedZScore > 0) or the MA’s trend direction (zScoreMA > zScoreMA ). This dual-source option provides flexibility to align the visual context with the primary analytical focus.
Analytical Applications -
Bear Market Resistance: When the Z-Score approaches or exceeds zero (raw SOPR near 1), it often signals resistance as sellers rush to exit at break-even, a pattern historically observed during downtrends. A rising Z-Score MA crossing zero can confirm this pressure.
Bull Market Support: Conversely, a Z-Score dropping below zero in uptrends indicates reluctance to sell at a loss, forming support as sell pressure diminishes. The MA’s bullish coloring reinforces confirmation of renewed buying interest.
Extreme Deviations: Values significantly above or below zero highlight overbought or oversold conditions, respectively, offering opportunities for contrarian positioning when paired with other on-chain or price-based metrics.
Gap Fill DetectorThe Gap Fill Detector is a visual tool designed to highlight potential price imbalances caused by sudden, sharp movements following periods of low volatility or indecision. These events can often result in "gaps" or "voids" in price action that may later attract a return move — commonly referred to as a gap fill.
This indicator helps traders visually identify these unique conditions and monitor whether price revisits the origin of the move. It does so by marking the location of the price gap and providing a clean, color-coded interface to track price interaction with that level over time.
🔧 Key Features
🔸 Highlight Zones
When the script detects a potential gap-forming move, the background of the triggering candle is highlighted. These areas represent potential moments of price imbalance or sudden breakout behavior.
🔸 Gap Fill Line
A horizontal line is drawn from the close of the candle before the spike (representing the likely gap origin). This line acts as a reference for tracking whether price returns to "fill" the gap. The line is persistent but will automatically hide once price intersects it, or if another gap signal occurs.
🔸 Intelligent Auto-Hide Logic
Once the gap line has been touched by price or interrupted by a new spike event, it is removed from view. This keeps the chart clean and avoids clutter from outdated signals.
🔸 Dynamic Fill Shading
The area between the current price and the gap line is filled with a color-coded visual cue:
🟩 Green Fill: When price is above the gap line — a possible bullish continuation.
🟪 Purple Fill: When price is below the gap line — a potential retracement or bearish correction. Fill transparency is customizable to blend with your chart style.
🔸 Stability Zones (Optional)
Users can optionally enable shaded background zones to mark extended periods of price stagnation. These zones may help identify moments where the market is "winding up" before releasing energy in the form of a fast move.
⚙️ Customization Options
Base highlight color & transparency
Enable/disable stability zone highlighting
Adjustable gap fill area transparency
✅ Use Cases
This tool is ideal for:
Intraday traders seeking gap fills or mean reversion setups
Swing traders identifying sudden breakouts for future re-entry
Visual traders who want a clean, automated way to spot and manage price dislocations
OG ATR RangeDescription:
The OG ATR Tool is a clean, visualized version of the Average True Range indicator for identifying volatility, stop-loss levels, and realistic price movement expectations.
How it works:
Calculates the average range (in points/pips) of recent candles.
Overlays ATR bands to help define breakout potential or squeeze zones.
Can be used to size trades or set dynamic stop-loss and target levels.
Best for:
Intraday traders who want to avoid unrealistic targets.
Volatility-based setups and breakout strategies.
Creating position sizing rules based on instrument volatility.
Pro Tip: Combine with your trend indicators to set sniper entries and exits that respect volatility.
PumpC Opening Range Breakout (ORB) Stretch RangePumpC ORB Stretch
The PumpC ORB Stretch is a volatility-based indicator that helps traders identify potential breakout zones by analyzing how price typically behaves around the open. This tool is inspired by concepts introduced by Toby Crabel in his well-known book “Day Trading with Short-Term Price Patterns and Opening Range Breakout.”
Rather than predicting market direction, this indicator highlights areas where price is likely to expand based on recent volatility. It is designed for traders who prefer dynamic, data-driven breakout levels over static support and resistance zones.
What Is the "Stretch"?
In Toby Crabel’s framework, the Stretch is the average of the smaller of two price moves:
The distance from the open to the high of the bar
The distance from the open to the low of the bar
This smaller value captures the “quiet side” of the candle and reflects recent price compression. Averaged over multiple periods (commonly 10 daily bars), it creates a baseline to assess how far price may move away from the open under typical market conditions.
How the Indicator Works
The PumpC ORB Stretch follows this process:
Uses a higher timeframe (such as daily) to calculate the open, high, and low.
For each bar, measures the smaller of the two distances: open to high or open to low.
Applies a moving average to the result over a user-defined number of bars (default is 10).
Multiplies the average stretch by customizable levels (e.g., 0.382, 1.0, 2.0).
Plots breakout levels above and below the open of the selected timeframe.
The result is a set of adaptive levels that expand or contract with market volatility.
Customization Options
Stretch Timeframe: Choose the timeframe used for stretch calculation (default: Daily).
Stretch Length: Set the number of bars to include in the moving average.
Breakout Levels: Enable or disable individual levels and define multipliers.
Color Settings: Customize colors for each range level for easy visual distinction.
Plot Style: Circular markers are used to reduce chart clutter and improve readability.
How to Use It
Use plotted levels to anticipate possible breakouts from the open.
Adjust stretch length to reflect short-term or longer-term volatility trends.
Combine this tool with momentum indicators, volume, or price action for confirmation.
Use levels to help guide stop placement or profit targets in breakout strategies.
Important Notes
This script is based on an interpretation of Crabel’s concepts and is not affiliated with Crabel Capital or the original author.
The indicator does not predict direction; it is a tool for context and structure.
It is recommended that users test and validate this tool in a simulated environment before applying it to live trading.
This indicator is intended for educational purposes only.
Licensing and Attribution
This script is built entirely in Pine Script v5 and follows TradingView’s open-source standards. It does not include any third-party or proprietary code. If you modify or share it, please credit the original idea and follow all TradingView script publishing rules.
Nasan Risk Score & Postion Size Estimator** THE RISK SCORE AND POSITION SIZE WILL ONLY BE CALCUTAED ON DIALY TIMEFRAME NOT IN OTHER TIMEFRAMES.
The typically accepted generic rule for risk management is not to risk more than 1% - 2 % of the capital in any given trade. It has its own basis however it does not take into account the stocks historic & current performance and does not consider the traders performance metrics (like win rate, profit ratio).
The Nasan Risk Score & Position size calculator takes into account all the listed parameters into account and estimates a Risk %. The position size is calculated using the estimated risk % , current ATR and a dynamically adjusted ATR multiple (ATR multiple is adjusted based on true range's volatility and stocks relative performance).
It follows a series of calculations:
Unadjusted Nasan Risk Score = (Min Risk)^a + b*
Min Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Max ATR%
Max Risk = ( 5 year weighted avg Annual Stock Return - 5 year weighted avg Annual Bench Return) / 5 year weighted avg Annual Min ATR%
The min and max return is calculated based on stocks excess return in comparison to the Benchmark return and adjusted for volatility of the stock.
When a stock underperforms the benchmark, the default is, it does not calculate a position size , however if we opt it to calculate it will use 1% for Min Risk% and 2% for Max Risk% but all the other calculations and scaling remain the same.
Rationale:
Stocks outperforming their benchmark with lower volatility (ATR%) score higher.
A stock with high returns but excessive volatility gets penalized.
This ensures volatility-adjusted performance is emphasized rather than absolute returns.
Depending on the risk preference aggressive or conservative
Aggressive Risk Scaling: a = max (m, n) and b = min (m, n)
Conservative Scaling: a = min (m, n) and b = max (m, n)
where n = traders win % /100 and m = 1 - (1/ (1+ profit ratio))
A default of 50% is used for win factor and 1.5 for profit ratio.
Aggressive risk scaling increases exposure when the strategy's strongest factor is favorable.
Conservative risk scaling ensures more stable risk levels by focusing on the weaker factor.
The Unadjusted Nasan risk is score is further refined based on a tolerance factor which is based on the stocks maximum annual drawdown and the trader's maximum draw down tolerance.
Tolerance = /100
The correction factor (Tolerance) adjusts the risk score based on downside risk. Here's how it works conceptually:
The formula calculates how much the stock's actual drawdown exceeds your acceptable limit.
If stocks maximum Annual drawdown is smaller than Trader's maximum acceptable drawdown % , this results in a positive correction factor (indicating the drawdown is within your acceptable range and increases the unadjusted score.
If stocks maximum Annual drawdown exceeds Trader's maximum acceptable drawdown %, the correction factor will decrease (indicating that the downside risk is greater than what you are comfortable with, so it will adjust the risk exposure).
Once the Risk Score (numerically equal to Risk %) The position size is calculated based on the current market conditions.
Nasan Risk Score (Risk%) = Unadjusted Nasan Risk Score * Tolerance.
Position Size = (Capital * Risk% )/ ATR-Multiplier * ATR
The ATR Multiplier is dynamically adjusted based on the stocks recent relative performance and the variability of the true range itself. It would range between 1 - 3.5.
The multiplier widens when conditions are not favorable decreasing the position size and increases position size when conditions are favorable.
This Calculation /Estimate Does not give you a very different result than the arbitrary 1% - 2%. However it does fine tune the % based on sock performance, traders performance and tolerance level.
BB Session RangesBB Session Ranges Indicator
Overview
The Bender Bot Session Ranges indicator is a powerful tool for traders who want to visualize and analyze important market sessions throughout the trading day. This indicator identifies and tracks price ranges during specific time periods, helping you spot potential trading opportunities based on session breakouts, retests, and range comparisons.
Key Features
• Multiple Session Tracking: Monitor up to 6 different time-based ranges simultaneously (pre-configured for NY AM Open, NY PM Open, Lunch, Premarket, Midnight Open, and a custom session).
• Range Visualization: Clearly displays high and low boundaries for each session with customizable colors and line styles.
• Historical Comparison: Tracks and displays the average size of ranges over time, helping you identify when current ranges are larger or smaller than typical.
• Flexible Time Settings: Easily configure exact session times based on your trading schedule and preferred markets.
• Range Extension Options: Extend range boundaries by bars, days, or weeks to track the longer-term influence of session ranges.
• Sidecar Information Display: Optional labels show range details, including size, percentage of average, and dollar value.
How It Works
The indicator identifies specific time-based sessions (for example, the first 5 minutes of the NY market open) and tracks the high and low prices established during these periods. Once a session is complete, the range boundaries are plotted on your chart and can be extended for further analysis. The indicator calculates the current range size and compares it to historical averages, giving you context for the day’s market behavior.
Sidecar Functionality
The sidecar feature is a key aspect of this indicator that helps keep your charts clean and organized. Instead of cluttering your price action with labels and annotations directly on the ranges, the sidecar system:
• Creates a dedicated information panel offset from the price action.
• Connects to ranges with discreet connecting lines.
• Displays key statistics like range size, dollar value, and percentage of average.
• Can be positioned at custom distances from the main chart (measured in bars).
• Allows you to see important data without interfering with your price analysis.
• Can be completely disabled when you prefer minimal chart elements.
• Helps maintain visual clarity even when tracking multiple sessions simultaneously.
This design philosophy puts trader experience first by separating information display from price action analysis, giving you the best of both worlds: clean charts and detailed information.
Setup Guide
1. Choose Your Sessions: Enable or disable each of the six available ranges by setting the Max Ranges to Plot parameter (use 0 to disable a range).
2. Configure Session Times: Set exact times for each range using standard 24-hour format (for example, 0930-0935 for 9:30-9:35 AM).
3. Customize Display: Select colors, line widths, and information display options for each range.
4. Set Extension Parameters: Choose how far to extend range lines (by a number of bars, days, or weeks, or select Always for continuous extension).
5. Configure Sidecar Labels: Set the offset for the information displays (use 0 to disable sidecar labels entirely).
Trading Applications
• Identify potential support and resistance levels based on session highs and lows.
• Compare current session ranges to historical averages to gauge volatility.
• Look for breakouts from established session ranges.
• Use range extensions to anticipate potential price targets.
• Monitor multiple session ranges to identify pattern correlations.
Advanced Usage
The indicator includes fields that help you assess range size relative to past performance, including dollar value calculations. This can be particularly useful for position sizing and risk management when trading breakouts from these ranges.
Future Development
We’re actively working on expanding this indicator to include robust strategy and alert functionality. This will allow traders to:
• Backtest trading strategies based on session range breakouts and retests.
• Customize entry, exit, and risk management parameters.
• Receive real-time alerts when price interacts with significant range levels.
• Set conditional alerts based on range size compared to historical averages.
• Automate trading decisions based on your specific session-based criteria.
If these strategy and alert features would be valuable for your trading, please let us know in the comments. Your feedback directly influences our development priorities and helps us create tools that best serve the trading community.
Notes
• All times are based on the America/New_York timezone.
• The indicator dynamically adjusts to different timeframes, providing consistent results whether you’re viewing 1-minute or daily charts.
• Range calculations are based on the highs and lows established during the defined sessions.
Momentum Volatility Ratio | AlphaNattMomentum Volatility Ratio | AlphaNatt
The Momentum Volatility Ratio (MVR) is a sophisticated indicator that measures price impulses relative to an asset's inherent volatility. Unlike standard momentum indicators, MVR adapts to changing market conditions by normalizing momentum against historical volatility patterns, helping traders identify truly significant price movements.
Key Features:
• Adapts automatically to each asset's volatility profile
• Distinguishes between normal market noise and significant impulses
• Beautiful gradient visualization with modern Quantra-inspired aesthetics
• Responsive and clear signals with minimal lag
• Customizable sensitivity and appearance settings
How It Works:
The MVR calculates normalized price momentum and adjusts it by recent volatility metrics. This volatility-adjustment ensures the indicator remains consistent across different market environments and timeframes. When price momentum exceeds what would be expected given the asset's normal volatility, the indicator shows a significant impulse that traders can act upon.
Indicator Components:
• Cyan Histogram/Background - Represents positive momentum impulses
• Magenta Histogram/Background - Represents negative momentum impulses
• Neutral Bands - Define the transition between normal and significant impulses
• Gradient Background - Provides visual context for impulse strength
• Smooth Histogram - Shows the main impulse signal with a beautiful glow effect
Trading Signals:
1. Strong Positive Impulse - When cyan histogram bars grow significantly above the zero line
2. Strong Negative Impulse - When magenta histogram bars extend significantly below the zero line
3. Impulse Weakening - When histogram bars begin to shrink toward the zero line
4. Momentum Shift - When the histogram changes color, indicating a potential trend change
Customizable Parameters:
• Length - Base calculation period for momentum (default: 6)
• Volatility Lookback - Historical period for volatility calculation (default: 100)
• Neutral Bands Length - Smoothing period for neutral bands (default: 15)
• Neutral Bands Multiplier - Controls width of neutral bands (default: 0.5)
• Standard Deviation Lookback - Period for standard deviation calculation (default: 150)
• Standard Deviation Multiplier - Controls sensitivity of extreme bands (default: 2.5)
• Style - Choose between Classic, Modern, and Signal visualization modes
Best Practices:
• Use MVR alongside price action for confirmation
• Watch for extreme readings followed by momentum shifts
• Pay attention to divergences between price and MVR
• Consider longer-term trends when interpreting signals
• Use shorter settings for more frequent signals, longer settings for less noise
About the Opus Series:
The MVR indicator is part of the Opus series of premium-quality technical indicators designed with both functional excellence and aesthetic beauty. Opus indicators feature smooth gradients, crisp visualization, and powerful analytical capabilities to enhance your trading experience.
For questions, feedback, or custom indicator requests, please feel free to leave a comment or contact me directly.
Happy Trading!
Not financial Advice
Long Term Profitable Swing | AbbasA Story of a Profitable Swing Trading Strategy
Imagine you're sailing across the ocean, looking for the perfect wave to ride. Swing trading is quite similar—you're navigating the stock market, searching for the ideal moments to enter and exit trades. This strategy, created by Abbas, helps you find those waves and ride them effectively to profitable outcomes.
🌊 Finding the Perfect Wave (Entry)
Our journey begins with two simple signs that tell us a great trading opportunity is forming:
- Moving Averages: We use two lines that follow price trends—the faster one (EMA 16) reacts quickly to recent price moves, and the slower one (EMA 30) gives us a longer-term perspective. When the faster line crosses above the slower line, it's like a clear signal saying, "Hey! The wave is rising, and prices might move higher!"
- RSI Momentum: Next, we check a tool called the RSI, which measures momentum (how strongly prices are moving). If the RSI number is above 50, it means there's enough strength behind this rising wave to carry us forward.
When both signals appear together, that's our green light. It's time to jump on our surfboard and start riding this promising wave.
⚓ Safely Riding the Wave (Risk Management)
While we're riding this wave, we want to ensure we're safe from sudden surprises. To do this, we use something called the Average True Range (ATR), which measures how volatile (or bumpy) the price movements are:
- Stop-Loss: To avoid falling too hard, we set a safety line (stop-loss) 8 times the ATR below our entry price. This helps ensure we exit if the wave suddenly turns against us, protecting us from heavy losses.
- Take Profit: We also set a goal to exit the trade at 11 times the ATR above our entry. This way, we capture significant profits when the wave reaches a nice high point.
🌟 Multiple Rides, Bigger Adventures
This strategy allows us to take multiple positions simultaneously—like riding several waves at once, up to 5. Each trade we make uses only 10% of our trading capital, keeping risks manageable and giving us multiple opportunities to win big.
🗺️ Easy to Follow Settings
Here are the basic settings we use:
- Fast EMA**: 16
- Slow EMA**: 30
- RSI Length**: 9
- RSI Threshold**: 50
- ATR Length**: 21
- ATR Stop-Loss Multiplier**: 8
- ATR Take-Profit Multiplier**: 11
These settings are flexible—you can adjust them to better suit different markets or your personal trading style.
🎉 Riding the Waves of Success
This simple yet powerful swing trading approach helps you confidently enter trades, clearly know when to exit, and effectively manage your risk. It’s a reliable way to ride market waves, capture profits, and minimize losses.
Happy trading, and may you find many profitable waves to ride! 🌊✨
Please test, and take into account that it depends on taking multiple longs within the swing, and you only get to invest 25/30% of your equity.
Correlation Coefficient TableThis Pine Script generates a dynamic table for analyzing how multiple assets correlate with a chosen benchmark (e.g., NZ50G). Users can input up to 12 asset symbols, customize the benchmark, and define the beta calculation periods (e.g., 15, 30, 90, 180 days). The script calculates Correlation values for each asset over these periods and computes the average beta for better insights.
The table includes:
Asset symbols: Displayed in the first row.
Correlation values: Calculated for each defined period and displayed in subsequent columns.
Average Correlation: Presented in the final column as an overall measure of correlation strength.
Color coding: Background colors indicate beta magnitude (green for high positive beta, yellow for near-neutral beta, red for negative beta).
ATR & PTR TableThe ATR & PTR Table Indicator displays a dynamic table that provides Average True Range (measures market volatility over 1D, 1W, and 1M timeframes), Price trading range (difference between the high and low prices over the same periods) & percentage of the typical range that has been traded. This indicator will help traders identify potential breakout zones and assess volatility across multiple timeframes.
This had been optimized to show ATR and PTR on every time frame. The (1D) represents ATR on whatever timeframe you are currently on.
Time Compression ZonesTime Compression Zones is an experimental indicator based on the idea that markets often "go silent" before making a strong move. During these moments, volatility drops, price action slows down, and energy accumulates beneath the surface — often followed by an explosive breakout.
The indicator identifies "time compression zones" — periods where the current volatility drops below a specific threshold relative to its moving average. These areas are highlighted on the chart and may serve as early signals of upcoming market expansion.
Time Compression Zones — это экспериментальный индикатор, основанный на идее, что рынок перед сильным движением часто "замирает". В такие моменты волатильность падает, движение становится вялым, но внутри копится энергия, которая вскоре может "взорваться" в виде импульса вверх или вниз.
This is not a directional indicator — it highlights pre-breakout conditions
Best used on 1H to 4H timeframes
Ideal for cryptocurrencies, gold, and futures
//RU
Индикатор определяет зоны "временного сжатия" — участки, где текущая волатильность падает ниже определённого порога относительно своей средней величины. Эти участки визуально выделяются на графике и могут указывать на приближающийся выход из "зоны накопления".
Индикатор не даёт направленного сигнала — он показывает периоды ожидания.
Лучше всего работает на 1H–4H таймфреймах
Подходит для криптовалют, фьючерсов, золота
ATR SL and TP with Candle Freeze & DataWindowThis indicator uses the Average True Range (ATR) to automatically calculate your stop loss (SL) and take profit (TP) levels based on the current market volatility and your chosen multipliers. Here's how it works:
ATR Calculation:
The indicator computes the ATR, which measures the average market volatility over a set period. This value helps gauge how much the price typically moves.
SL and TP Determination:
Depending on whether you're in a long or short trade, the SL and TP are calculated relative to the current price:
For a long trade, the stop loss is set below the current price (by subtracting a multiple of the ATR) and the take profit is set above it (by adding a multiple of the ATR).
For a short trade, the calculations are reversed.
Candle Freeze Feature:
Once a new candle starts, the calculated SL and TP values are "frozen" for that candle. This means they remain constant during the candle's formation, preventing them from updating continuously as the price fluctuates. This can make it easier to plan your trades without the levels shifting mid-candle.
Data Window & Labels:
The SL and TP values are plotted on the chart as lines and displayed in labels for quick reference. Additionally, they appear in TradingView's Data Window, so you can easily copy the price numbers if needed.
Overall, the indicator is designed to help you manage your trades by setting dynamic, volatility-adjusted SL and TP levels that only update at the start of each new candle, aligning with your chosen timeframe. Let me know if you have any more questions or need further adjustments!
Composite Reversal IndicatorOverview
The "Composite Reversal Indicator" aggregates five technical signals to produce a composite score that ranges from -5 (strongly bearish) to +5 (strongly bullish). These signals come from:
Relative Strength Index (RSI)
Moving Average Convergence Divergence (MACD)
Accumulation/Distribution (A/D)
Volume relative to its moving average
Price proximity to support and resistance levels
Each signal contributes a value of +1 (bullish), -1 (bearish), or 0 (neutral) to the total score. The raw score is plotted as a histogram, and a smoothed version is plotted as a colored line to highlight trends.
Step-by-Step Explanation
1. Customizable Inputs
The indicator starts with user-defined inputs that allow traders to tweak its settings. These inputs include:
RSI: Length (e.g., 14), oversold level (e.g., 30), and overbought level (e.g., 70).
MACD: Fast length (e.g., 12), slow length (e.g., 26), and signal length (e.g., 9).
Volume: Moving average length (e.g., 20) and multipliers for high (e.g., 1.5) and low (e.g., 0.5) volume thresholds.
Price Levels: Period for support and resistance (e.g., 50) and proximity percentage (e.g., 2%).
Score Smoothing: Length for smoothing the score (e.g., 5).
These inputs make the indicator adaptable to different trading styles, assets, or timeframes.
2. Indicator Calculations
The script calculates five key indicators using the input parameters:
RSI: Measures momentum and identifies overbought or oversold conditions.
Formula: rsi = ta.rsi(close, rsi_length)
Example: With a length of 14, it analyzes the past 14 bars of closing prices.
MACD: Tracks trend and momentum using two exponential moving averages (EMAs).
Formula: = ta.macd(close, macd_fast, macd_slow, macd_signal)
Components: MACD line (fast EMA - slow EMA), signal line (EMA of MACD line).
Accumulation/Distribution (A/D): A volume-based indicator showing buying or selling pressure.
Formula: ad = ta.accdist
Reflects cumulative flow based on price and volume.
Volume Moving Average: A simple moving average (SMA) of trading volume.
Formula: vol_ma = ta.sma(volume, vol_ma_length)
Example: A 20-bar SMA smooths volume data.
Support and Resistance Levels: Key price levels based on historical lows and highs.
Formulas:
support = ta.lowest(low, price_level_period)
resistance = ta.highest(high, price_level_period)
Example: Over 50 bars, it finds the lowest low and highest high.
These calculations provide the raw data for generating signals.
3. Signal Generation
Each indicator produces a signal based on specific conditions:
RSI Signal:
+1: RSI < oversold level (e.g., < 30) → potential bullish reversal.
-1: RSI > overbought level (e.g., > 70) → potential bearish reversal.
0: Otherwise.
Logic: Extreme RSI values suggest price may reverse.
MACD Signal:
+1: MACD line > signal line → bullish momentum.
-1: MACD line < signal line → bearish momentum.
0: Equal.
Logic: Crossovers indicate trend shifts.
A/D Signal:
+1: Current A/D > previous A/D → accumulation (bullish).
-1: Current A/D < previous A/D → distribution (bearish).
0: Unchanged.
Logic: Rising A/D shows buying pressure.
Volume Signal:
+1: Volume > high threshold (e.g., 1.5 × volume MA) → strong activity (bullish).
-1: Volume < low threshold (e.g., 0.5 × volume MA) → weak activity (bearish).
0: Otherwise.
Logic: Volume spikes often confirm reversals.
Price Signal:
+1: Close near support (within proximity %, e.g., 2%) → potential bounce.
-1: Close near resistance (within proximity %) → potential rejection.
0: Otherwise.
Logic: Price near key levels signals reversal zones.
4. Composite Score
The raw composite score is the sum of the five signals:
Formula: score = rsi_signal + macd_signal + ad_signal + vol_signal + price_signal
Range: -5 (all signals bearish) to +5 (all signals bullish).
Purpose: Combines multiple perspectives into one number.
5. Smoothed Score
A smoothed version of the score reduces noise:
Formula: score_ma = ta.sma(score, score_ma_length)
Example: With a length of 5, it averages the score over 5 bars.
Purpose: Highlights the trend rather than short-term fluctuations.
6. Visualization
The indicator plots two elements:
Raw Score: A gray histogram showing the composite score per bar.
Style: plot.style_histogram
Color: Gray.
Smoothed Score: A line that changes color:
Green: Score > 0 (bullish).
Red: Score < 0 (bearish).
Gray: Score = 0 (neutral).
Style: plot.style_line, thicker line (e.g., linewidth=2).
These visuals make it easy to spot potential reversals.
How It Works Together
The indicator combines signals from:
RSI: Momentum extremes.
MACD: Trend shifts.
A/D: Buying/selling pressure.
Volume: Confirmation of moves.
Price Levels: Key reversal zones.
By summing these into a composite score, it filters out noise and provides a unified signal. A high positive score (e.g., +3 to +5) suggests a bullish reversal, while a low negative score (e.g., -3 to -5) suggests a bearish reversal. The smoothed score helps traders focus on the trend.
Practical Use
Bullish Reversal: Smoothed score is green and rising → look for buying opportunities.
Bearish Reversal: Smoothed score is red and falling → consider selling or shorting.
Neutral: Score near 0 → wait for clearer signals.
Traders can adjust inputs to suit their strategy, making it versatile for stocks, forex, or crypto.