Pro BTB Pour Samadi Indicator [TradingFinder] Back To Breakeven🔵 Introduction
The Pro BTB (Professional Back To Breakeven) strategy is one of the most advanced price action setups, designed and taught by Mohammad Ali Poursamadi, an international Iranian trader and a well-known instructor of financial market analysis.
The main logic of this strategy is based on the natural behavior of the market :
Breakout of a key level: Price moves beyond an important support or resistance.
Retest / Back To Breakeven: Price returns to the broken level.
Continuation of the main trend: Entry at this point allows alignment with the dominant market direction.
To better understand Pro BTB, it is necessary to first know the concept of a Spike. A spike refers to a sudden and powerful movement of price in one direction, usually caused by heavy order flow. Such a move creates an Imbalance between buyers and sellers. Because the market does not have enough time to distribute orders fairly, it leaves an Inefficiency on the chart.
The direct result of this process is the formation of a Fair Value Gap (FVG) a gap between candles that shows trades were not distributed evenly. In simple terms: the spike is the cause, and Imbalance, Inefficiency, and FVG are its consequences.
In practice, Pro BTB works effectively in both bullish and bearish structures. In a Bullish Setup, a bullish spike first breaks a resistance level. Then, when price returns to that same level, a safe and low-risk buying opportunity is created. Conversely, in a Bearish Setup, a bearish spike breaks a support level, and when price comes back to the broken level, it provides the best conditions for a short entry. These two examples illustrate how Pro BTB logic provides precise, low-risk entries in both directions of the market.
🔵 How to Use
The Pro BTB (Back To Breakeven) strategy allows traders to enter precisely after price returns to the breakout level; this way the entry aligns with the natural market flow while risk is minimized. In practice, this method is simple yet powerful: first, identify a valid breakout on a key level, then wait for price to return to that level, and finally, take the entry in the direction of the main trend.
🟣 Bullish Setup
When a bullish spike occurs and a key resistance is broken, price usually returns to the same level. This level, now acting as support, provides the best opportunity for a long entry. In this scenario, the stop-loss is placed behind the breakout candle or slightly below the broken level, and the take-profit target should be defined with at least a 1:2 risk-to-reward ratio. With strong momentum, higher targets can also be considered.
🟣 Bearish Setup
In a bearish scenario, a bearish spike breaks a key support. After the breakout, price usually returns to the same level, which now acts as resistance. This creates the best conditions for a short entry. The stop-loss is placed behind the breakout candle or slightly above the broken level, while the take-profit target is set with a risk-to-reward ratio greater than 1:2.
🟣 General Rules of Pro BTB
To apply Pro BTB correctly, several key rules must be followed :
The breakout must be valid and occur on a key level.
Always wait for the retest; do not enter immediately after the breakout.
Entry should only happen when price touches the broken level and shows candlestick confirmation.
The stop-loss (SL) must be placed behind the breakout candle or the broken level.
The take-profit (TP) must always be at least twice the trade risk.
For higher reliability, the breakout should align with the trend on higher timeframes.
🟣 Six Entry Methods in Pro BTB
For greater flexibility, Pro BTB offers six standard entry methods :
Market Entry : Enter immediately at the breakout level.
Limit Order : Place a limit order on the breakout level.
Stop Order : Enter only after confirmation of continuation.
Confirmation Candle : Enter after a confirmation candle closes on the level.
Pattern Entry : Enter based on candlestick patterns such as Pin Bar or Engulfing.
Zone Entry : Enter from a zone instead of an exact point to account for market noise.
🔵 Setting
🟣 Spike Filter | Movement
Minimum Spike Bars : Defines the minimum number of consecutive candles required for a valid spike.
Movement Power : Enables or disables the momentum-based spike filter.
Movement Power Level : Sets the strength threshold; higher values filter out weaker moves and only detect strong spikes.
🟣 Spike Filter | Gap
Gap Filter : Enables or disables the gap filter.
Gap Type : Selects which type of gap should be detected (All Gaps, Significant, Structural, Major).
🟣 Spike Filter | Doji
Doji Tolerance : Defines whether doji candles are allowed within a spike.
Max Doji Body Ratio : Maximum ratio of body-to-total candle size for classifying a candle as a doji.
Max Doji in Spike Ratio : Maximum percentage of doji candles allowed within a spike.
🟣 Position Management
Stop-Loss Threshold : Enables or disables the stop-loss threshold feature.
Stop-Loss Threshold Value : Defines the value of the stop-loss threshold for risk management.
Risk-Reward Ratio : Sets the desired risk-to-reward ratio (e.g., 1:1 or 1:2).
Include SL Threshold in R:R : Determines whether the stop-loss threshold is included in risk-to-reward calculations.
🟣 Display Settings
Display Mode : Chooses between Setup (showing setups) or Signal (showing trade signals).
Show Entry Levels: Displays entry levels on the chart (buy/sell zones) when enabled
Only Display the Last Position : Displays only the most recent position on the chart when enabled.
Setup Width Drawing : Adjusts the visual width of the setup drawings on the chart for better visibility.
🟣 Alert
Alert : Enables alert notifications. When turned on, you can set TradingView alerts to receive notifications once the setup or signal conditions are met
🔵 Conclusion
The Pro BTB (Back To Breakeven) strategy is a smart and structured entry method based on natural market behavior after a breakout and retest of the broken level. It helps traders avoid emotional, high-risk entries by waiting for market confirmation and entering precisely at a point that aligns with the main trend and sits closest to the key level.
The simplicity of its rules, flexibility in entry methods, and a risk-to-reward ratio above 2 have made Pro BTB one of the most popular tools among price action traders. Nevertheless, as with any strategy, it is recommended to practice it in demo accounts or through personal backtesting before applying it to real trading, in order to find the entry conditions that best suit your trading style.
Educational
PongExperience PONG! The classic arcade game, now on your charts!
With this indicator, you can finally achieve your lifelong dream of beating the Markets. . . at PONG!
Pong is jam-packed with features! Such as:
2 Paddles
A moving dot
Floating numbers
The idea of a net
This indicator is solely a visualization, it serves simply as an exercise to depict what is capable through PineScript. It can be used to re-skin other indicators or data, but on its own, is not intended as a market indicator.
With that out of the way...
> PONG
The Pong indicator is a recreation of the classic arcade game Pong developed to pit the markets against the cold hard logic of a CPU player.
Given the lack of interaction that is capable, the game is not played in the typical sense, by a player and computer or 2 players.
This version of Pong uses the chart price movements to control the "Market" Paddle, and it is contrasted by a (not AI) "CPU" Paddle, which is controlled by its own set of logic.
> Market Paddle
The Market Paddle is controlled by a data source which can be input by the user.
By default (Auto Mode), the Market Paddle is controlled through a fixed length Donchian channel range, pinning the range high to 100 and range low to 0. As seen below.
This can be altered to use data from different symbols or indicators, and can optionally be smoothed using multiple types of Moving Averages.
In the chart below, you can see how the RSI indicator is imported and smoothed to control the Market Paddle.
Note: The Market Paddle follows the moving average. If not desired, simply set the "Smoothing" input to "NONE".
> CPU Paddle
In simple terms, the CPU Paddle is a handicapped Aimbot.
Its logic is, more or less, "move directly towards the ball's vertical location".
If it were allowed to have full range of the screen, it would be impossible for it to lose a point. Due to this, we must slow it down to "play fair"... as fair as that may be.
The CPU Paddle is allowed to move at a rate specified by a certain Percent of its vertical width. By default, this is set to 2%.
Each update, the CPU Paddle can advance up or down 2% of its vertical width. The directional movement is determined based on the angle of the ball, and it's current position relative to the CPU Paddle's position. Given that it is not a direct follow, it may at times seem more... "human".
When a point is scored, the CPU paddle maintains its position, similar to the original Pong game, the paddles were controlled solely by the raw output of the controllers and did not reset.
> Ball
At the start of each point, the ball begins at the center of the screen and moves in a randomly determined angle at its base speed.
The direction is determined by the player who scored the last point. The loser of the last point "serves" the ball.
Given the circumstances, serving is a gigantic advantage. So the loser serving is just another place where the Market is given an advantage.
The ball's base speed is 1, it will move 1 (horizontal) bar on each update of the script. This speed can "technically" increase to infinity over time, if given the perfect rally. This is due to the hit logic as described below.
Note: The minimum ball speed is also 1.
> Bonk Math
When the ball hits a paddle, essentially 3 outcomes can occur, each resulting in the ball's direction being changed from positive to negative.
Action A: Its angle is doubled, and its speed is doubled.
Action B: Its angle is reversed, and its speed is decreased if it is going faster than base speed.
Action C: Its angle is preserved, and its speed is preserved. "Basic Bounce"
Each paddle is segmented into 3 zones, with the higher and lower tips (20%) of the paddles producing special actions.
The central 60% of each paddle produces a basic bounce. The special actions are determined by the trajectory of the ball and location on the paddle.
> Custom Mode
As stated above, the script loads in "Auto Mode" by default. While this works fine to simply watch the gameplay, the Custom Mode unlocks the ability to visualize countless possibilities of indicators and analyses playing Pong!
In the chart below, we have set up the game to use the NYSE TICK Index as our Market Player. The NYSE TICK Index shows the number of NYSE stocks trading on an uptick minus those on a downtick. Its values fluctuate throughout the day, typically ranging between +1000 and -1000.
Therefore, we have set up Pong to use Ticker USI:TICK and set the Upper Boundary to 1000 and Lower Boundary to -1000. With this method, the paddle is directly controlled by the overall (NYSE) market behaviors.
As seen in a chart earlier, you can also take advantage of the Custom Mode to overlay Pong onto traditional oscillators for use anywhere!
> Styles
This version of Pong comes stocked with 5 colorways to suit your chart vibes!
> Pro Tips & Additional Information
- This game has sound! For the full experience, set alerts for this indicator and a notification sound will play on each hit!*
*Due to server processing, the notification sounds are not precisely played at each hit. :(
- In auto mode, decreasing the length used will give an advantage to the market, as its actions become more sporadic over this window.
- The CPU logic system actually allows the market to have a "technical" edge, since the Market Paddle is not bound to any speed, and is solely controlled by the raw market movements/data input.
- This type of visualization only works on live charts, charts without updates will not see any movement.
- Indicator sources can only be imported from other indicators on the same chart.
- The base screen resolution is 159 bars wide, with the height determined by the boundaries.
- When using a symbol and an outside source, be mindful that the script is attempting to pull the source from the input symbol. Data can appear wonky when not considering the interactions of these inputs.
There are many small interesting details that can't be seen through the description. For example, the mid-line is made from a box. This is because a line object would not appear on top of the box used for the screen. For those keen eye'd coders, feel free to poke around in the source code to make the game truly custom.
Just remember:
The market may never be fair, but now at least it can play Pong!
Enjoy!
WaveMacBollI wanted to see the two indicators in the candle chart, not in a separate window. And within the Bollinger band, it seemed to put it fine.
Important Note on Line Styles
Due to TradingView's multi-timeframe environment restrictions (timeframe = '', timeframe_gaps = true), I couldn't implement dotted or dashed line styles programmatically. The indicator uses solid lines by default.
If you prefer dotted/dashed lines for better visual distinction:
Add the indicator to your chart
Click on the indicator settings (gear icon)
Go to "Style" tab
Manually change line styles for each plot
Unfortunately, PineScript doesn't support line.new() or similar drawing functions in multi-timeframe mode, limiting our styling options to basic plot styles.
If you know a good solution for implementing dotted/dashed lines in multi-timeframe indicators without using drawing objects, please share it in the comments! I'd love to improve this aspect of the indicator
RARA @JSV_TraderRARA @JSV_Trader
This indicator helps you calculate the range of the PRE-PRE-Open and Pre-Open candles.
Please use this indicator in M30.
Follow on IG: @JSV_Trader
Traders Tool by DeepanIndiaThis powerful Pine Script is designed to support both beginner and advanced traders by providing a comprehensive trading setup alongside core fundamental tools to enhance decision-making
Sortable Relative Performance | viResearchSortable Relative Performance | viResearch
Conceptual Foundation and Purpose
The Sortable Relative Performance indicator from viResearch is designed as a multi-asset ranking and comparison system that allows traders to evaluate the relative strength of up to 14 different assets over a user-defined lookback period. Unlike single-symbol indicators, this tool provides a comparative view of performance, making it ideal for traders seeking to understand how assets perform relative to each other within a watchlist, sector, or market segment. The indicator calculates the percentage return of each asset from a chosen starting point and presents the results both graphically and in a sorted, tabular format, helping traders identify outperformers and underperformers at a glance.
Technical Composition and Methodology
At its core, the script calculates the relative performance of each selected asset by comparing its current closing price with the closing price from the lookback period. This performance metric is expressed as a percentage and computed using Pine Script’s request.security() function, allowing for seamless cross-asset analysis within a single pane. Each asset is visually represented as a vertical column, color-coded according to a predefined identity map that reflects common asset branding. The best-performing asset is dynamically labeled on the chart, displaying its name and current return, while a real-time performance table updates and ranks all active assets in descending order based on their return values. The table and columns automatically adjust based on the user’s selection, creating an interactive and responsive comparative dashboard.
Features and Configuration
The indicator includes a customizable date filter, allowing traders to activate the display from a specific start date. This is particularly useful for performance reviews tied to events, such as earnings reports, Fed meetings, or macroeconomic releases. The lookback period is adjustable and determines how far back in time performance is measured, making the tool adaptable to both short-term and long-term strategies. Traders can toggle individual assets on or off, enabling focused analysis on specific coins, stocks, or indices. Up to 14 assets can be analyzed simultaneously, with each one clearly distinguished by unique, branded colors in both the plot and the ranking table. The script intelligently highlights the top performer with a floating label, drawing immediate attention to the strongest asset within the group.
Strategic Use and Application
This indicator is especially valuable for traders employing relative strength or momentum-based strategies. By visualizing asset performance in real time, it becomes easier to rotate capital into strong assets and away from laggards. Whether tracking cryptocurrencies, sectors, or forex pairs, the ability to assess comparative returns without switching charts provides an operational edge. The tool supports portfolio analysis, sector rotation, and cross-market studies, making it suitable for discretionary traders, systematic investors, and even macro analysts looking for a visual breakdown of market behavior.
Conclusion and Practical Value
The Sortable Relative Performance indicator by viResearch delivers a clean and effective way to measure and rank asset performance over time. By combining visual clarity with real-time calculation and dynamic sorting, it offers a powerful lens through which traders can evaluate market leadership and laggard behavior. Its flexibility and modular design ensure it can be integrated into a wide range of strategies and trading styles. Whether you're managing a crypto portfolio or monitoring traditional markets, this tool provides essential insights into where momentum resides and how capital is flowing across assets.
Note: Backtests are based on past results and are not indicative of future performance.
Volume-Weighted RSI & Multi-Normalized MACD### Description for Publishing: Volume-Weighted RSI & Multi-Normalized MACD
**Overview**
The "Volume-Weighted RSI & Multi-Normalized MACD" indicator is a powerful and versatile tool designed for traders seeking enhanced momentum and trend analysis. Combining a volume-weighted Relative Strength Index (VW-RSI) with a customizable Moving Average Convergence Divergence (MACD) featuring multiple normalization methods, this indicator provides deep insights into market dynamics. It supports multi-timeframe (MTF) analysis and includes an optional stepped plotting mode for discrete signal visualization, making it ideal for both trend-following and mean-reversion strategies across various markets (stocks, forex, crypto, etc.).
**Key Features**
1. **Volume-Weighted RSI (VW-RSI)**:
- A modified RSI that incorporates trading volume for greater sensitivity to market activity.
- Normalized to a user-defined range (default: -50 to +50) for consistent analysis.
- Optional smoothing with multiple moving average types (SMA, EMA, WMA, VWMA, SMMA, or SMA with Bollinger Bands) to reduce noise and highlight trends.
- Overbought (+20) and oversold (-20) levels for quick reference.
2. **Multi-Normalized MACD**:
- Offers six normalization methods for MACD, allowing traders to tailor the output to their strategy:
- Normalized Volume Weighted MACD (unbounded).
- Min-Max Normalization (bounded).
- Volatility Normalization (unbounded, volatility-adjusted).
- Volatility Normalization with Min-Max (bounded).
- Hyperbolic Tangent Normalization (bounded).
- Arctangent Normalization (bounded).
- Min-Max with Smoothing (bounded).
- All bounded methods scale to the user-defined range (default: -50 to +50), ensuring comparability with VW-RSI.
- Dynamic color changes for MACD line (lime/red) and histogram (aqua/blue/red/maroon) based on momentum and signal line crosses.
3. **Stepped Plotting Mode**:
- Optional mode to plot RSI and MACD as discrete, stepped lines, reducing noise by only updating when values change significantly (configurable thresholds).
- Ideal for traders focusing on clear, actionable signal changes.
4. **Multi-Timeframe Support**:
- Configurable timeframe input (default: chart timeframe) for analyzing RSI and MACD on higher or lower timeframes, enhancing cross-timeframe strategies.
5. **Customizable Display**:
- Toggle options to show/hide MACD line, signal line, histogram, and cross dots.
- Bollinger Bands for RSI smoothing (optional) with adjustable standard deviation multiplier.
- Clear visual cues with horizontal lines for overbought/oversold levels, midline, and MACD bounds.
**Usage Instructions**
1. **Add to Chart**: Apply the indicator to any symbol (e.g., BTCUSD, SPY) on any timeframe (1H, 1D, etc.).
2. **Configure Settings**:
- **General**: Adjust `Lower Bound` (-50 default) and `Upper Bound` (+50 default) for the output range. Set `Timeframe` for MTF analysis. Enable `Stepped?` for discrete plotting.
- **RSI**: Choose `Price Source` (default: ohlc4), `RSI Length` (default: 9), and smoothing options (e.g., EMA, Bollinger Bands). Adjust `RSI Diff Threshold` for stepped mode.
- **MACD**: Select `Price Source`, `Fast Length` (9), `Slow Length` (21), `Signal Length` (9), and a normalization method (default: Volatility Min-Max). Adjust `MACD Diff Threshold` for stepped mode.
- **Display Options**: Toggle MACD components and histogram colors for clarity.
3. **Interpretation**:
- **VW-RSI**: Watch for crosses above +20 (overbought) or below -20 (oversold) for potential reversals. Use smoothed RSI or Bollinger Bands for trend confirmation.
- **MACD**: Look for MACD/Signal line crosses (dots indicate crossings) and histogram changes for momentum shifts. Bounded normalizations align with RSI for unified analysis.
- **Stepped Mode**: Focus on significant changes in RSI/MACD for clearer signals.
4. **Companion Overlay**: For visualization on the main price chart, use the companion script "VW-RSI & MACD Price Overlay" (available separately, requires this script to be published). It plots RSI and MACD as price-scaled echo lines, with toggles to show/hide and customizable scaling (high/low or ATR).
**Who Is This For?**
- **Trend Traders**: Use MACD normalizations and MTF to identify momentum shifts across timeframes.
- **Mean-Reversion Traders**: Leverage VW-RSI’s overbought/oversold signals for entry/exit points.
- **Technical Analysts**: Customize normalization and smoothing to match specific market conditions.
- **All Markets**: Works on stocks, forex, cryptocurrencies, and more, with any timeframe.
**Notes**
- Unbounded MACD normalizations (`enable_nvw`, `enable_vol`) may produce values outside -50/+50, suitable for volatility-focused strategies.
- For price chart overlay, publish this script and use its ID in the companion script’s `request.security` call.
- Adjust scaling inputs in the companion script for optimal visualization on volatile or stable assets.
**Author’s Note**
Developed by NEPOLIX, this indicator combines volume-weighted precision with flexible normalization for robust technical analysis. Feedback and suggestions are welcome to enhance future versions!
Custom Candle Coloring (3% Drop / Breakout / Follow-through)Naveen's custom bars. It helps with custom color of the bars to see significant candle movements and their interpretations
felci The first row shows HIGH values of NIFTY.
The second row shows LOW values of NIFTY.
Some values are negative (like -2058, -300, -486)—these could indicate changes or differences rather than absolute index values.
The table seems color-coded in the image: green, orange, and light colors—probably to highlight ranges or thresholds.
Options Max Pain Calculator [BackQuant]Options Max Pain Calculator
A visualization tool that models option expiry dynamics by calculating "max pain" levels, displaying synthetic open interest curves, gamma exposure profiles, and pin-risk zones to help identify where market makers have the least payout exposure.
What is Max Pain?
Max Pain is the theoretical expiration price where the total dollar value of outstanding options would be minimized. At this price level, option holders collectively experience maximum losses while option writers (typically market makers) have minimal payout obligations. This creates a natural gravitational pull as expiration approaches.
Core Features
Visual Analysis Components:
Max Pain Line: Horizontal line showing the calculated minimum pain level
Strike Level Grid: Major support and resistance levels at key option strikes
Pin Zone: Highlighted area around max pain where price may gravitate
Pain Heatmap: Color-coded visualization showing pain distribution across prices
Gamma Exposure Profile: Bar chart displaying net gamma at each strike level
Real-time Dashboard: Summary statistics and risk metrics
Synthetic Market Modeling**
Since Pine Script cannot access live options data, the indicator creates realistic synthetic open interest distributions based on configurable market parameters including volume patterns, put/call ratios, and market maker positioning.
How It Works
Strike Generation:
The tool creates a grid of option strikes centered around the current price. You can control the range, density, and whether strikes snap to realistic market increments.
Open Interest Modeling:
Using your inputs for average volume, put/call ratios, and market maker behavior, the indicator generates synthetic open interest that mirrors real market dynamics:
Higher volume at-the-money with decay as strikes move further out
Adjustable put/call bias to reflect current market sentiment
Market maker inventory effects and typical short-gamma positioning
Weekly options boost for near-term expirations
Pain Calculation:
For each potential expiry price, the tool calculates total option payouts:
Call options contribute pain when finishing in-the-money
Put options contribute pain when finishing in-the-money
The strike with minimum total pain becomes the Max Pain level
Gamma Analysis:
Net gamma exposure is calculated at each strike using standard option pricing models, showing where hedging flows may be most intense. Positive gamma creates price support while negative gamma can amplify moves.
Key Settings
Basic Configuration:
Number of Strikes: Controls grid density (recommended: 15-25)
Days to Expiration: Time until option expiry
Strike Range: Price range around current level (recommended: 8-15%)
Strike Increment: Spacing between strikes
Market Parameters:
Average Daily Volume: Baseline for synthetic open interest
Put/Call Volume Ratio: Market sentiment bias (>1.0 = bearish, <1.0 = bullish) It does not work if set to 1.0
Implied Volatility: Current option volatility estimate
Market Maker Factors: Dealer positioning and hedging intensity
Display Options:
Model Complexity: Simple (line only), Standard (+ zones), Advanced (+ heatmap/gamma)
Visual Elements: Toggle individual components on/off
Theme: Dark/Light mode
Update Frequency: Real-time or daily calculation
Reading the Display
Dashboard Table (Top Right):
Current Price vs Max Pain Level
Distance to Pain: Percentage gap (smaller = higher pin risk)
Pin Risk Assessment: HIGH/MEDIUM/LOW based on proximity and time
Days to Expiry and Strike Count
Model complexity level
Visual Elements:
Red Line: Max Pain level where payout is minimized
Colored Zone: Pin risk area around max pain
Dotted Lines: Major strike levels (green = support, orange = resistance)
Color Bar: Pain heatmap (blue = high pain, red = low pain/max pain zones)
Horizontal Bars: Gamma exposure (green = positive, red = negative)
Yellow Dotted Line: Gamma flip level where hedging behavior changes
Trading Applications
Expiration Pinning:
When price is near max pain with limited time remaining, there's increased probability of gravitating toward that level as market makers hedge their positions.
Support and Resistance:
High open interest strikes often act as magnets, with max pain representing the strongest gravitational pull.
Volatility Expectations:
Above gamma flip: Expect dampened volatility (long gamma environment)
Below gamma flip: Expect amplified moves (short gamma environment)
Risk Assessment:
The pin risk indicator helps gauge likelihood of price manipulation near expiry, with HIGH risk suggesting potential range-bound action.
Best Practices
Setup Recommendations
Start with Model Complexity set to "Standard"
Use realistic strike ranges (8-12% for most assets)
Set put/call ratio based on current market sentiment
Adjust implied volatility to match current levels
Interpretation Guidelines:
Small distance to pain + short time = high pin probability
Large gamma bars indicate key hedging levels to monitor
Heatmap intensity shows strength of pain concentration
Multiple nearby strikes can create wider pin zones
Update Strategy:
Use "Daily" updates for cleaner visuals during trading hours
Switch to "Every Bar" for real-time analysis near expiration
Monitor changes in max pain level as new options activity emerges
Important Disclaimers
This is a modeling tool using synthetic data, not live market information. While the calculations are mathematically sound and the modeling realistic, actual market dynamics involve numerous factors not captured in any single indicator.
Max pain represents theoretical minimum payout levels and suggests where natural market forces may create gravitational pull, but it does not guarantee price movement or predict exact expiration levels. Market gaps, news events, and changing volatility can override these dynamics.
Use this tool as additional context for your analysis, not as a standalone trading signal. The synthetic nature of the data makes it most valuable for understanding market structure and potential zones of interest rather than precise price prediction.
Technical Notes
The indicator uses established option pricing principles with simplified implementations optimized for Pine Script performance. Gamma calculations use standard financial models while pain calculations follow the industry-standard definition of minimized option payouts.
All visual elements use fixed positioning to prevent movement when scrolling charts, and the tool includes performance optimizations to handle real-time calculation without timeout errors.
Universal Gann Square & Cube LevelsUniversal Gann Square & Cube Levels - Dynamic Support/Resistance
Description:
📊 UNIVERSAL GANN LEVELS INDICATOR
This powerful indicator automatically plots Gann Square and Cube levels around the current stock price, providing dynamic support and resistance levels based on W.D. Gann's mathematical theories.
🎯 KEY FEATURES:
✅ Auto-Adaptive: Works for ANY stock price (₹20 to ₹100,000+)
✅ Real-time Detection: Uses current close price automatically
✅ Dual Level System: Square levels (black) + Cube levels (red)
✅ Customizable Range: Adjust percentage range (5% to 50%)
✅ Clean Display: Toggle square/cube lines independently
✅ Universal Compatibility: Works on all timeframes and instruments
📈 HOW IT WORKS:
Square Levels (Black Lines): Based on perfect squares (n²) around current price
Cube Levels (Red Lines): Based on perfect cubes (n³) around current price
Smart Range: Automatically calculates relevant levels within your specified percentage range
Info Display: Shows current price and level counts
⚙️ SETTINGS:
Price Range %: Control how many levels appear (default: 15%)
Show Square Levels: Toggle black square lines on/off
Show Cube Levels: Toggle red cube lines on/off
🔥 PERFECT FOR:
Day traders seeking precise entry/exit points
Swing traders identifying key support/resistance zones
Gann theory practitioners and students
Multi-timeframe analysis across all instruments
💡 USAGE TIPS:
Use 10-20% range for active day trading
Use 30-50% range for swing trading analysis
Watch for price reactions at square/cube intersections
Combine with volume analysis for confirmation
🌟 WHY THIS INDICATOR?
Unlike fixed Gann calculators, this indicator dynamically adapts to ANY price level, making it truly universal for Indian stocks, crypto, forex, and commodities.
⚠️ DISCLAIMER:
This indicator is for educational and informational purposes only. It is not financial advice and should not be considered as a recommendation to buy or sell any security. Trading involves significant risk of loss and may not be suitable for all investors. Past performance does not guarantee future results. Always conduct your own research and consult with a qualified financial advisor before making any investment decisions. The developer assumes no responsibility for any trading losses incurred through the use of this indicator.
📋 COMPATIBILITY:
All TradingView plans
All timeframes (1m to 1M)
Stocks, Crypto, Forex, Commodities
Mobile and desktop platforms
MTF-RISK [Module+]Description
MTF-RISK is a futures risk management tool that calculates standardized position sizing across multiple CME micro contracts, anchored to higher-timeframe structure. By combining multi-timeframe reference levels with a contract-based dollar-per-point model, it allows traders to maintain consistent risk across different futures markets.
Example:
User has selected the 1H timeframe for the risk table. Once an hourly candle closes, the high and low of that completed hour are locked as reference boundaries.
Lower timeframe candles (e.g., 1m, 5m, 15m) reference these established 1H boundaries to calculate:
Distance in points from the current close to the HTF high or low.
Corresponding dollar risk based on the user-defined Max Risk per Trade ($) setting.
The risk table updates in real-time, showing the current stop distance, calculated contract size, and resulting risk in dollars for both upward and downward directions.
Benefit: Traders always maintain a fixed dollar risk, regardless of intraday price movement, while using HTF structure as the anchor for accurate and consistent position sizing.
1. Higher Timeframe Anchor
Always uses the last fully closed candle from the selected higher timeframe (default: 60m).
Captures the prior HTF high and low as reference boundaries.
Lower timeframe closers (e.g., 1m, 5m, 15m bars) reference these established HTF boundaries to measure stop distances and calculate risk.
Use: Ensures all position sizing is tied to completed HTF structure, providing a consistent framework for intraday trades.
2. Risk Model Engine
Traders define maximum dollar risk per trade.
The system calculates allowable micro contracts based on stop distance (current close → HTF high/low).
Supported contracts and their point values:
MNQ (Micro Nasdaq 100): $2.00 per point
MES (Micro S&P 500): $5.00 per point
MYM (Micro Dow Jones): $0.50 per point
MGC (Micro Gold): $10.00 per point
Formula:
Contracts = Max Risk ÷ (Stop Distance × TSE:VALUE per Point)
Risk ↑: Based on distance to HTF high.
Risk ↓: Based on distance to HTF low.
Use: Provides consistent dollar risk sizing across different futures contracts and multiple intraday timeframes.
3. Risk Table Overlay
Compact, real-time on-chart table with customizable styling.
Columns:
OP: Operation time (adjusted by user’s timezone offset).
Points ↑ / ↓: Stop distances in points relative to HTF boundaries.
Risk ↑ / ↓ ($): Dollar exposure at those stops.
Micros ↑ / ↓: Allowable contract count.
Asset: Displays selected futures contract in the header.
Custom features:
Independent text/background colors per column.
Highlighted latest row for clarity.
Adjustable outline, row colors, and text size.
Use: Gives traders immediate insight into position sizing without leaving the chart.
Intended Use:
This is a risk visualization module, not a trade signal generator. Traders can use it to:
Standardize risk sizing across multiple CME micro futures.
Quickly evaluate trade setups relative to HTF structure.
Measure stop distances from lower timeframe closes while referencing HTF boundaries.
Maintain consistency in risk management regardless of the instrument traded.
Limitations & Disclaimers:
Calculations assume standard CME tick values for MNQ, MES, MYM, and MGC.
Other markets may not align with these dollar-per-point values.
This indicator does not predict direction, generate entries, or guarantee outcomes.
For educational and informational purposes only.
Trading involves risk; always use proper risk management.
Closed-source (Protected): Logic is visible on charts, but source code is hidden.
Simple Turnover (Enhanced v2)📊 Simple Turnover (Enhanced)
🔹 Overview
The Simple Turnover Indicator calculates a stock’s turnover by combining both price and volume, and then compares it against quarterly highs. This helps traders quickly gauge whether market participation in a move is strong enough to confirm a breakout, or weak and likely to be false.
Unlike volume alone, turnover considers both traded volume and price level, giving a truer reflection of capital flow in/out of a stock.
________________________________________
🔹 Formulae Used
1. Average Price (SMA)
AvgPrice=SMA(Close,n)
2. Average Volume (SMA)
AvgVol=SMA(Volume,n)
3. Turnover (Raw)
Turnover raw=AvgPrice × AvgVol
4. Unit Adjustment
• If Millions → Turnover = Turnover raw × 10^−6
• If Crores → Turnover = Turnover raw × 10^−7
• If Raw → Turnover = Turnover raw
5. Quarterly High Turnover (qHigh)
Within each calendar quarter (Jan–Mar, Apr–Jun, Jul–Sep, Oct–Dec), we track the maximum turnover seen:
qHigh=max (Turnover within current quarter)
________________________________________
🔹 Visualization
• Bars → Color follows price candle:
o Green if Close ≥ Open
o Red if Close < Open
• Blue Line → Rolling Quarterly High Turnover (qHigh)
________________________________________
🔹 Strategy Use Case
The Simple Turnover Indicator is most effective for confirming true vs false breakouts.
• A true breakout should be supported by increasing turnover, showing real capital backing the move.
• A false breakout often occurs with weak or declining turnover, suggesting lack of conviction.
📌 Example Strategy (3H timeframe):
1. Identify a demand zone using your preferred supply-demand indicator.
2. From this demand zone, monitor turnover bars.
3. A potential long entry is validated when:
o The current turnover bar is at least 20% higher than the previous one or two bars.
o Example setting: SMA length = 5 (i.e., turnover = 5-bar average close × 5-bar average volume).
4. This confirms strong participation in the move, increasing probability of a sustained breakout.
________________________________________
🔹 Disclaimer
⚠️ This indicator/strategy does not guarantee 100% accurate results.
It is intended to improve the probability of identifying true breakouts.
The actual success of the strategy will depend on price action, market momentum, and prevailing market conditions.
Always use this as a supporting tool along with broader trading analysis and risk management.
RMA EMA Crossover | MisinkoMasterThe RMA EMA Crossover (REMAC) is a trend-following overlay indicator designed to detect shifts in market momentum using the interaction between a smoothed RMA (Relative Moving Average) and its EMA (Exponential Moving Average) counterpart.
This combination provides fast, adaptive signals while reducing noise, making it suitable for a wide range of markets and timeframes.
🔎 Methodology
RMA Calculation
The Relative Moving Average (RMA) is calculated over the user-defined length.
RMA is a type of smoothed moving average that reacts more gradually than a standard EMA, providing a stable baseline.
EMA of RMA
An Exponential Moving Average (EMA) is then applied to the RMA, creating a dual-layer moving average system.
This combination amplifies trend signals while reducing false crossovers.
Trend Detection (Crossover Logic)
Bullish Signal (Trend Up) → When RMA crosses above EMA.
Bearish Signal (Trend Down) → When EMA crosses above RMA.
This simple crossover system identifies the direction of momentum shifts efficiently.
📈 Visualization
RMA and EMA are plotted directly on the chart.
Colors adapt dynamically to the current trend:
Cyan / Green hues → RMA above EMA (bullish momentum).
Magenta / Red hues → EMA above RMA (bearish momentum).
Filled areas between the two lines highlight zones of trend alignment or divergence, making it easier to spot reversals at a glance.
⚡ Features
Adjustable length parameter for RMA and EMA.
Overlay format allows for direct integration with price charts.
Visual trend scoring via color and fill for rapid assessment.
Works well across all asset classes: crypto, forex, stocks, indices.
✅ Use Cases
Trend Following → Stay on the right side of the market by following momentum shifts.
Reversal Detection → Crossovers highlight early trend changes.
Filter for Trading Systems → Use as a confirmation overlay for other indicators or strategies.
Visual Market Insight → Filled zones provide immediate context for trend strength.
Beta SignalsThe Beta Buy/Sell Signal Indicator provides visual cues for potential trade setups by combining multiple technical conditions, including RSI, MACD, SMA, volume filters, and price action. It highlights buy and sell signals when these conditions align, helping traders observe potential short-term opportunities across various market conditions.
Key Features:
Buy/Sell Signals – Signals appear as markers on your chart indicating potential entry points.
RSI Bounce Alerts – Identifies RSI crossing key thresholds (35 for bullish, 65 for bearish) in combination with other technical conditions.
SMA & MACD Filters – Confirms trade setups using trend (SMA) and momentum (MACD) indicators.
Volume & Price Action Filters – Optional volume filter and price movement checks ensure signals are only shown under specific market conditions.
Higher Timeframe RSI Filter – Optional filter for confirming trend strength from a higher timeframe.
Configurable Inputs – Users can adjust RSI length, MACD parameters, SMA period, and other filters to match their preferred trading style.
Usage:
Suitable for short-term trading or as a confirmation tool alongside other strategies.
Signals are designed for observation and strategy testing; they do not guarantee results.
Alerts can be set up for buy and sell bounce signals to assist in monitoring potential setups in real-time.
Skywalker Strong Signals The Skywalker Scanner is a technical analysis tool designed to help traders evaluate market conditions by combining multiple signals into a single system.
Key Features:
EMA Trend Tracking – Fast and slow EMAs visually highlight bullish and bearish market zones.
RSI Alerts – Provides warnings when RSI reaches overbought or oversold levels to help identify potential momentum shifts.
Volume Filter – Signals are confirmed only when volume exceeds a moving average threshold.
Buy & Sell Conditions – Alerts trigger when EMA crossovers align with RSI thresholds, MACD momentum, and candle confirmation.
How It Works:
Instead of relying on a single indicator, the Skywalker Scanner filters setups so that buy or sell signals only appear when multiple conditions agree. This aims to reduce false positives and provide traders with clearer potential trade opportunities.
Usage:
Suitable across multiple timeframes, from scalping to swing trading.
Can be used standalone or as a confirmation tool alongside other strategies.
Does not guarantee results; intended for educational purposes only.
Cumulative Outperformance | viResearchCumulative Outperformance | viResearch
Conceptual Foundation and Innovation
The "Cumulative Outperformance" indicator by viResearch is a relative strength analysis tool designed to measure an asset’s cumulative performance against a chosen benchmark over a user-defined period. Rooted in comparative return analysis, this indicator allows traders and analysts to assess whether an asset is outperforming or underperforming a broader market or sector, offering insights into trend strength and leadership.
Unlike traditional relative strength indicators that may rely on static ratio comparisons, this script uses cumulative return differentials to provide a more contextual understanding of long-term performance trends. A clean visual representation and dynamic text summary are provided to highlight not only the degree of outperformance but also the directional status — making it accessible to both novice and advanced users.
Technical Composition and Calculation
The indicator compares the cumulative returns of the selected asset and a benchmark symbol over a specified lookback period (length). Returns are calculated as the percent change from the current price to the price length bars ago.
This differential is plotted and color-coded, with a baseline zero line to make outperformance and underperformance visually distinct. A dynamic table in the bottom-right corner displays real-time values for the benchmark symbol, the current outperformance percentage, and a status label (e.g., "Outperforming", "Underperforming", or "Even").
Additionally, a floating label is plotted directly on the chart to make the latest outperformance value immediately visible.
Features and User Inputs
The script includes the following customizable inputs:
Start Date: Defines the point from which to begin tracking outperformance data.
Length: The period over which cumulative returns are measured.
Benchmark Symbol: Select any market index, stock, or crypto as the benchmark (e.g., INDEX:BTCUSD, SPX, etc.).
Practical Applications
This indicator is especially effective in:
Identifying Market Leaders: Compare sectors, stocks, or altcoins against a leading benchmark to identify outperformers.
Sector Rotation Strategies: Monitor when certain assets begin to outperform or lag behind the broader market.
Cross-Market Analysis: Compare crypto pairs, equities, or commodities to their sector benchmarks to find relative strength opportunities.
Visual Aids and Alerts
A purple outperformance line highlights the degree of cumulative difference.
A horizontal dotted white line marks the baseline (zero performance difference).
Real-time table overlay updates the benchmark name, performance delta, and relative status.
Alerts are built-in to notify users when assets begin to outperform or underperform, helping you stay ahead of major shifts.
Advantages and Strategic Value
Benchmark Flexibility: Analyze any asset class against any benchmark of your choice.
Visual Clarity: Dynamic labels and tables make performance tracking intuitive and immediate.
No Repainting: Calculations are based on closed bar data for consistent backtesting and real-time use.
Summary and Usage Tips
The "Cumulative Outperformance | viResearch" script offers a clean and effective way to visualize relative strength between any asset and its benchmark. By focusing on cumulative returns over time, it filters out short-term noise and gives a strategic view of long-term strength or weakness. Use this tool in combination with other momentum or trend-following indicators to refine your market entries and asset selection.
Note: Backtests are based on past results and are not indicative of future performance.
Denys_MVT (Sessions Boxes)Denys_MVT (Sessions Boxes)
This indicator highlights the main trading sessions — Asia, Frankfurt, London, and New York — directly on the chart.
It helps traders visually separate market activity during different times of the day and quickly understand which session is currently active.
🔹 How it works
You can choose between Box Mode (draws a box around the session’s high and low) or Fill Mode (background color for the session).
Each session has its own customizable time range and color.
Labels can be placed automatically at the beginning of each session.
The script uses the time() function with your selected UTC offset to precisely map session times.
🔹 Features
Displays Asia, Frankfurt, London, and New York sessions.
Option to toggle between boxes and background shading.
Adjustable transparency and session colors.
Session labels for easier visual reference.
Works on any symbol and timeframe.
🔹 How to use
Add the indicator to your chart.
Set your local UTC offset in the settings (default: UTC+2).
Enable/disable sessions, change colors, or switch between Box/Fill mode.
Use the session highlights to better understand when volatility typically increases and how different sessions interact.
KCP Twine 2 [Dr.K.C.Prakash]KCP Twine 2
The indicator is a trend-following, range-filtered signal system.
It combines two smoothed volatility filters (fast & slow) and adds conditions for trend confirmation, momentum, and signal strength before showing BUY and SELL labels on the chart.
📊 Best Use Cases
Intraday trading: Works well on 5m, 15m, 1h timeframes to filter noise.
Swing trading: On 4h / Daily charts, helps spot clean trend reversals.
Trend confirmation tool: Can be used alongside other systems (like VWAP, Supertrend, or price action setups) to confirm trend bias.
⚠️ Limitations
Fewer signals (since filters are strict).
Might lag slightly in fast reversals (due to confirmation bars).
Works best in trending conditions, may chop in sideways markets.
Bull sailor intraday SR BY RahulSpecial indicator for intraday support and resistance with his acurrcy
Transaction Value Alert (4Cr+)Transactions with a value of INR 4 crore or above on a one-minute candle indicate FII or DII activity and confirms momentum and is an excellent indicator for the intraday trading
MTF MomentumUniqueness:
MTF Momentum is designed to provide true multiple-timeframe information at once on a single screen with as little clutter as possible. What makes MTF Momentum unique is the way it condenses the perspectives of our other internal models into a single bullish or bearish slope near the current candle, then automatically draws the same bullish or bearish momentum slopes of the next higher timeframes. The structure is engineered to highlight shifts in momentum as they happen on the current candle (angled lines), marking potential reversal points as they build (red and green diamonds), and provides a numerical Q-Score that draws a horizontal marker for elevated Q-Score exhaustion. The design avoids telling you when to buy or sell. Instead, it structures the raw inputs in a way that makes interpretation easier. That makes it useful whether you’re trading actively or simply learning to recognize how momentum flows across layers.
Usefulness:
This indicator is designed to work across multiple timeframes. Instead of juggling the same indicator on 3 different screens, you can see a unified picture that captures both the local momentum and higher timeframes that provide time-dimensional context. When short-term and higher-timeframe angles point in the same direction, MTF Momentum makes that visible in a straightforward way and may help highlight when momentum is consistent across multiple timeframes. When short-term layers push against a stronger higher timeframe, it signals that momentum may be shifting or exhausting. This indicator provides an efficient workflow and helps reduce clutter.
How It Works:
At its core, MTF Momentum is a blend of momentum readings from multiple sources — RSI slopes, EMA stacks, Gaussian smoothing, Fisher-style transforms, and MACD widening analysis built from the same shared core mathematical engines as our other indicators. The uniqueness of this indicator is not tied to any single formula as each component is well-known, but it is in the way they are layered, smoothed, and consolidated that entirely new readings are created.
The process begins with multiple RSI calculations, offset and averaged to reduce jitter. These are smoothed through EMA stacks of varying lengths, then run through Gaussian-style filters that emphasize directional change while filtering noise. The slope differences across these layers form the foundation of the momentum calculation. This momentum reading is then checked against MACD widening conditions. MACD gap expansion is treated as a momentum confirmation — widening gaps with price in agreement add weight, while narrowing gaps or misaligned candles reduce confidence. Additional derivative logic, including Fisher-style transforms, is applied to normalize the outputs and make them more stable across different assets.
Multi-timeframe integration comes from using request.security to pull higher timeframe versions of the same structures that are on the base chart. For example, you can see a one-minute chart overlaid with five-minute and fifteen-minute context. The blending is seamless — higher timeframe momentum is displayed alongside lower timeframe signals that help the user see where current timeframe momentum is in relation to higher timeframes.
How to Use the MTF Momentum Indicator:
Applying the MTF Momentum indicator is straightforward, but interpretation depends on your process.
To use, load the indicator on your preferred base timeframe. Use this general guideline to setup your indicators:
Base timeframe -> 1st HTF -> 2nd HTF
1min -> 5min -> 15min
5min -> 15min -> 1hr
15min -> 1hr -> 4hr
1hr -> 4hr -> 1day
4hr -> 1day -> Weekly
1day -> Weekly -> Monthly
Weekly -> Monthly -> Yearly
When used at base timeframes at 1 hour or lower, higher timeframe lines ARE drawn automatically.
When using a base timeframe above 1 hour (e.g., 4h, Daily), higher-timeframe slopes are NOT drawn automatically. To view them, switch to the higher-timeframe chart itself (for example, Daily or Weekly) and draw an arrow along the slope using TradingView’s drawing tools. Once placed, the arrow will remain visible when you return to your lower base timeframe chart, giving you the higher-timeframe context alongside your current view. This step is optional, purely for visual reference, and does not affect the indicator’s calculations.
These are your higher timeframe momentum angles that can help provide context to the automatically drawn angle on your current timeframe. You can even practice drawing these lines on the lower timeframes such as using a 5min base and 15min and 1hr HTF charts. You can compare your manually drawn angles with the automatic HTF lines by enabling them in the INPUTS tab of the MTF Momentum settings menu.
Q-SCORE:
The Q-Score label presents two values ranging from 0 to 100. These values are a numerical translation of the same momentum conditions our other indicators display visually. Higher values indicate stronger readings of exhaustion within the current trend model, while lower values indicate less. You can think of this as similar to a distribution curve, where some states occur less frequently at the extreme ends of the range and more frequently near the middle. Q-Score values are provided as contextual information only and do not predict reversals or guarantee outcomes.
Blue Dotted & Solid Horizontal line:
The aqua blue horizontal line is a visual representation of the Q-Score values. When one or both numerical values is below 85 the line stays dotted -- it is only when both numerical values exceed 85 that the line changes from dotted to solid.
Green & Red Diamonds:
Diamonds mark areas where the underlying model detects counter-trend behavior. They may flicker on the current candle during intrabar calculations but are locked in at candle close and never get altered or repainted.
Red diamonds highlight points where the model detects counter-trend pressure during a bullish phase. Green diamonds highlight counter-trend pressure during a bearish phase. These markers reflect where momentum conditions have shifted relative to the prevailing trend. They appear where short-term dynamics differ from the broader trend. Traders can interpret these areas in their own context; the diamonds themselves do not predict reversals or guarantee outcomes.
Example ways to use the MTF Momentum indicator:
Look for agreement -- when both your base timeframe and higher timeframe momentums are pointing in the same direction, it reflects stronger alignment. This may help identify areas of trend continuation.
Watch for divergence -- if your short-term momentum pushes opposite to the higher timeframe, it flags a potential transition.
Disclaimer:
This tool does not generate buy or sell signals. It is a framework for visualizing momentum across layers, allowing you to incorporate that information into your own decision-making. How you apply it depends entirely on your goals, timeframe, and risk tolerance. This indicator is provided for educational and informational purposes only. It does not constitute financial advice, trading advice, or investment recommendations. Trading involves risk, and you may lose some or all of your capital. Past performance is not a guarantee of future results. You are solely responsible for any decisions you make — always trade to the best of your own abilities and within your own risk tolerance.
Release Notes:
v1.0 (Initial Release)