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!
Indicadores e estratégias
Combined RSI EnsembleA combined RSI Ensemble indicator that colors candles based on both overbought (≥80) and oversold (≤30) conditions using three RSI lengths (14, 9, 5). It assigns distinct colors for varying levels of overbought (gray, yellow, orange, red) and oversold (gray, light green, dark green, neon green) signals. The script also registers “Surely Overbought/Oversold” and “Probably Overbought/Oversold” signals for use in scanning, backtesting, and alerts.
Based on: trendspider.com
Road 2 RichesThe Road 2 Riches indicator is a precision-based visual overlay designed to help traders identify and capitalize on high-probability time windows across global market sessions. It automatically plots the Asian, London, and New York killzones directly onto your chart, giving you a clean, time-anchored framework to anticipate volatility shifts, liquidity injections, and potential breakout setups.
Multi-TF 👀### Multi-Timeframe Analysis (MTF-Analysis)
**Overview**
The Multi-Timeframe Analysis indicator is a powerful visualization tool designed for traders who incorporate multi-timeframe (MTF) strategies into their decision-making process. It overlays compact, customizable candle representations from up to four higher timeframes directly on your chart, positioned to the right of the last bar for quick reference. This allows you to monitor price action, momentum via EMAs, and key levels like Fair Value Gaps (FVGs) across multiple resolutions without switching charts. Built with efficiency in mind, it supports automatic timeframe detection, real-time updates, and a clean, non-intrusive design that enhances your trading workflow.
Ideal for day traders, swing traders, and scalpers, this indicator helps identify alignments between timeframes, spot potential reversals or continuations, and validate entries/exits based on higher-timeframe context. It leverages Pine Script v6 for smooth performance, with optimizations to handle up to 5000 bars back and extensive drawing limits.
**Key Features**
- **Multi-Timeframe Candle Display**: Renders recent candles (configurable from 5 to 100 per timeframe) from selected higher timeframes (e.g., 5m, 15m, 1H, 4H) as compact bars with customizable width, spacing, and padding. Bullish and bearish candles are color-coded for instant recognition.
- **Automatic Timeframe Adaptation**: When enabled, the indicator intelligently selects complementary timeframes based on your chart's resolution (e.g., on a 1m chart, it might show 5m, 15m, and 1H). Manual overrides are available for full control.
- **EMA Overlays**: Plots EMA9, EMA21, and EMA50 on each MTF section using a user-defined source (e.g., OHLC/4, close). EMAs can be dashed for clarity and enabled/disabled per timeframe, helping to gauge momentum and trend strength.
- **Fair Value Gaps (FVGs)**: Detects bullish (+FVG) and bearish (-FVG) gaps with a configurable lookback length (5-50 bars). Gaps are visualized as dotted boxes extending from the candle, highlighting potential support/resistance zones or imbalances.
- **Time Labels and Debugging**: Displays timestamp labels under every fourth candle for chronological context. A debug mode expands spacing and adds detailed labels (e.g., OHLC, volume, EMA values) for testing and verification.
- **Customization Options**: Extensive inputs for colors (bodies, wicks, EMAs, FVGs), label sizes/styles, and layout ensure seamless integration with your chart theme. Supports futures symbols with a time offset adjustment.
- **Performance Optimizations**: Uses arrays for efficient data management, clears drawings on realtime updates or timeframe changes, and limits buffer sizes to prevent overload.
**How to Use**
1. Add the indicator to your chart via TradingView's "Indicators" menu.
2. Configure timeframes: Enable/disable up to four TFs and set the number of candles to display. Use "Auto Timeframe" for smart defaults.
3. Adjust EMAs: Select the source type and toggle per TF to focus on relevant momentum signals (e.g., EMA9 crossovers for short-term trades).
4. Enable FVGs: Activate per TF and tweak the length to suit your market (shorter for volatile assets, longer for trends).
5. Fine-tune appearance: Modify padding, candle width, and colors to avoid clutter. Use debug mode during setup.
6. Interpret: Align your chart's price action with MTF candles—look for confluence in trends, FVGs filling as support/resistance, or EMA alignments for high-probability setups.
**Input Settings**
- **General**: Hour offset for time adjustments (useful for futures).
- **Timeframes**: Enable TFs 1-4, select resolutions (e.g., "5m"), and set candle counts. Auto mode simplifies this.
- **FVG/iFVG**: Toggle per TF, customize colors and detection length.
- **EMA**: Enable per TF, choose source, colors, and dashed style.
- **Candle Appearance**: Bull/bear colors for bodies/wicks, width/spacing/padding, label size/color.
- **Debug**: Expands view for detailed inspection.
**Notes**
- This indicator is non-repainting and updates in realtime, but performance may vary on lower timeframes with many candles—reduce counts if needed.
- FVGs are calculated locally on recent bars for efficiency; historical gaps beyond the buffer aren't shown.
- Compatible with all symbols, but best on volatile markets like forex, crypto, or indices.
- Feedback welcome—updates may include more MA types or advanced FVG filters.
Enhance your edge with multi-timeframe insights—try MTF-Analysis today!
TF-Gated CCI x MA + ConsCount + Vol S/R — Signal (v2.6)This is a strategy based on 3 indicators with a view of predicting price of the market in the next 1.5-7.5 minutes depending on the chart you are using. it is best suitable to use with brokers like Tickz.
Support & resistance gapsThis script will draw support and resistance gaps on the price chart.
It is heavily influenced by Nick Drendel . You can learn more about support and resistance gaps and how he draws them in the following video on youtube: The Secret Weapon Traders Ignore: Mastering Unfilled Gaps
The following settings are available:
Untested gaps background color and border color (default gray)
Support gaps background color and border color (default green)
Resistance gaps background color and border color (default red)
Number of days to look back (default one year)
Option to include the current day during market hours (default true)
CDC Action Zone (TH) by MeowToolsThe CDC Action Zone indicator is like a stock market traffic light — it tells you when it’s green to go and when it’s red to stop. By combining just two EMAs (12 and 26), it highlights Buy and Sell zones clearly, cutting through market noise and keeping you on the right side of the trend. Think of it as a radar that spots the big moves before most people notice, giving you the confidence to ride the trend and exit before getting trapped. Meow 😺 give it a try and see how it can help your portfolio take off 🚀📈
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
Take Profit CalculatorRelease Notes: Take Profit Calculator v1.0
Introduction
Introducing the Real-Time Take Profit Calculator, a dynamic tool for TradingView designed to instantly calculate and display your target exit price. This indicator eliminates the need for manual calculations, allowing scalpers and day traders to see their profit targets directly on the chart as the market moves.
Key Features
Dynamic Target Calculation: The take-profit line is not static. It recalculates on every tick, moving with the current price to show you the exact target based on a real-time entry point.
Full Trade Customization:
Margin: Set the amount of capital (in USDT) you are allocating to the trade.
Leverage: Input your desired leverage to accurately calculate the total position size.
Desired Profit: Specify your target profit in USDT, and the indicator will calculate the corresponding price level.
Long & Short Support: Easily switch between "Long" and "Short" trade directions. The indicator will adjust the calculation and the visual style accordingly.
Customizable Display:
Change the color and width of the take-profit line for both long and short scenarios.
Toggle a price label on or off for a cleaner chart view.
How to Use
Add to Chart: Apply the "Take Profit Calculator" indicator to your chart.
Open Settings: Double-click the indicator name or the line itself to open the settings panel.
Enter Your Parameters: Under "Trade Parameters," fill in your Margin, Leverage, and Desired Profit.
Select Direction: Choose either "Long" or "Short" from the Trade Direction dropdown.
Analyze: The horizontal line on your chart now represents the exact price you need to reach
AWESOME Momentum & Trend MeterMomentum + Trend Meter Indicator –
Imagine the stock chart is a road, and we want to know which way the cars are going (trend) and how fast they are moving (momentum). This indicator gives us two special meters to see that.
1. Momentum Meter (AO Baseline)
Think of AO (Awesome Oscillator) as a ruler that tells us if the road is going uphill (bullish) or downhill (bearish).
MACD is like a speedometer that tells us how fast the cars are moving.
Colors show how strong the movement is:
Dark green = strong uphill (good for buying)
Light green = uphill but slow
Dark red = strong downhill (good for selling)
Light red = downhill but slow
rey = mixed signals, be careful!
So, this meter tells you: “The trend is up/down, and the speed is fast/slow.”
2. Trend Meter (All 3 Trend Meters Align + WaveTrend)
This meter looks at three different signals (like checking the weather, traffic lights, and road signs) to see if they all agree on the trend.
Circles mean all three signals say the same direction (all green = bullish, all red = bearish).
Crosses mean all three signals agree AND the momentum is strong (extra confirmation).
The background color also shows the trend: green = up, red = down.
So, this meter tells you: “All signs agree — it’s safe to follow the trend.”
How You Can Use It
Look for Momentum Meter and Trend Meter agreeing:
Both show green → good time to buy.
Both show red → good time to sell.
Grey areas or light colors → be careful, the trend is weak or confusing.
This indicator doesn’t guess, it just shows the trend and momentum clearly.
It’s like having two helpers:
One tells you which way the road goes (Momentum Meter)
The other tells you if it’s safe to move (Trend Meter).
MACD Josh MACD Study — Visual Crossover Tags
Overview:
This script displays MACD signals in a clear, visual way by showing:
Histogram = EMA(Fast) − EMA(Slow)
Signal = EMA(Histogram, Signal Length)
It adds labels and arrows to help you see crossover events between the Histogram and the Signal line more easily.
⚠️ Disclaimer: This tool is for educational and research purposes only. It is not financial advice or an investment recommendation. Past performance does not guarantee future results. Users should make their own decisions and manage risk responsibly.
Features
Central Zero Line with Signal and Histogram plots
Optional labels/arrows to highlight Histogram–Signal crossovers
Alerts for crossover and crossunder events, integrated with TradingView’s alert system
Standard adjustable inputs: Fast EMA, Slow EMA, Signal EMA
How to Interpret (for study only)
When the Histogram crosses above the Signal, a visual label/arrow marks a positive MACD event
When the Histogram crosses below the Signal, a visual label/arrow marks a negative MACD event
The “BUY/SELL” labels are visual study tags only — they do not represent trade instructions or recommendations
Responsible Usage Tips
Test across multiple timeframes and different assets
Combine with higher-timeframe trend, support/resistance, or volume for confirmation
Use alerts with caution, and always test in a demo environment first
Technical Notes
The script does not use future data and does not repaint signals once bars are closed
Results depend on market conditions and may vary across assets and timeframes
License & Credits
Written in Pine Script® v5 for TradingView
The indicator name shown on chart is for labeling purposes only and carries no implication of advice or solicitation
Key Levels: Open & Midday🔹 Opening Candle (9:30 AM New York Time)
Plots the high and low of the first 5-minute candle after the market opens.
🔹 12:30 PM Candle (3 hours after open)
Plots the high and low of the candle formed exactly 3 hours after the market opens.
These levels are useful for:
Identifying support/resistance zones.
Creating breakout or reversal strategies.
Tracking intraday momentum shifts.
📌 Important Notes:
Designed for 5-minute charts.
Make sure your chart is set to New York time (exchange time) for accurate levels.
Happy Trading!
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
Buyer vs Seller ControlBuyer vs Seller Control Analysis
Technical indicator measuring market participation through candlestick wick analysis
Overview:
This indicator analyzes the relationship between closing prices and candlestick wicks to measure buying and selling pressure. It calculates two key metrics and displays their moving averages to help identify market sentiment shifts.
Calculation Method:
The indicator measures two distinct values for each candle:
Buyer Control Value: Distance from candle low to closing price (close - low)
Seller Control Value: Distance from candle high to closing price (high - close)
Both values are then smoothed using a Simple Moving Average (default period: 20) to reduce noise and show clearer trends.
Visual Components:
Lime Line: 20-period SMA of buyer control values
Fuchsia Line: 20-period SMA of seller control values
Area Fill: Colored region between the two lines
Histogram: Difference between buyer and seller control SMAs
Zero Reference Line: Horizontal line at zero level
Information Table: Current numerical values (optional display)
Interpretation:
When the lime line (buyer control) is above the fuchsia line (seller control), it indicates that recent candles have been closing closer to their highs than to their lows on average.
When the fuchsia line is above the lime line, recent candles have been closing closer to their lows than to their highs on average.
Fill Color Logic:
Lime (green) fill appears when buyer control SMA > seller control SMA
Fuchsia (red) fill appears when seller control SMA > buyer control SMA
Fill transparency adjusts based on the magnitude of difference between the two SMAs
Stronger differences result in more opaque fills
Settings:
Moving Average Period: Adjustable from 1-200 periods (default: 20)
Show Info Table: Toggle to display/hide the numerical values table
Technical Notes:
The indicator works on any timeframe
Values are displayed in the same units as the underlying asset's price
The histogram shows the mathematical difference between the two SMA lines
Transparency calculation uses a 50-period lookback for dynamic scaling
This indicator provides a quantitative approach to analyzing candlestick patterns by focusing on where prices close relative to their intraday ranges.
Volume-Price Divergence Indicator (OBV + VWAP, Multi-Timeframe)Description:
This indicator helps you identify volume-price divergences and potential trend weakness across any specified timeframe.
Features:
Volume bars with moving average – green for bullish, red for bearish, with orange SMA to detect low-volume situations.
Custom OBV calculation with divergence detection – highlights when price makes new highs/lows but OBV does not.
VWAP deviation alerts – signals when price moves far from VWAP while volume remains low, indicating potential fake breakouts.
Fully configurable – select any reference timeframe, adjust volume MA, OBV period, and VWAP deviation threshold.
Visual markers – easily spot bullish/bearish divergences and volume-price mismatches directly on your chart.
Use case:
Spot early trend exhaustion points.
Identify fake breakouts or weak rallies/drops.
Combine with your existing trading strategy for more informed entries and exits.
ATH Projection (2013, 2017, 2021 -> 2025)//@version=6
indicator(title="ATH Projection (2013, 2017, 2021 -> 2025)", overlay=true, max_labels_count=20, max_lines_count=20)
// ----------- Inputs (ATH manuels) -----------
t1 = input.time(defval=timestamp("2013-12-01T00:00:00"), title="Date ATH #1 (2013)")
p1 = input.float(defval=1100.0, title="Prix ATH #1 (2013)")
t2 = input.time(defval=timestamp("2017-12-01T00:00:00"), title="Date ATH #2 (2017)")
p2 = input.float(defval=20000.0, title="Prix ATH #2 (2017)")
t3 = input.time(defval=timestamp("2021-11-01T00:00:00"), title="Date ATH #3 (2021)")
p3 = input.float(defval=69000.0, title="Prix ATH #3 (2021)")
// Projection future (ex: fin 2025)
t_proj = input.time(defval=timestamp("2025-12-01T00:00:00"), title="Date cible (fin 2025)")
// ----------- Utilitaire -----------
f_days(t) => ((t - t1) / 86400000.0) + 1.0 // nb jours depuis t1 (+1 pour éviter log(0))
// ----------- Coordonnées X (jours) -----------
x1 = f_days(t1)
x2 = f_days(t2)
x3 = f_days(t3)
xP = f_days(t_proj)
// ----------- Régression power-law (3 points) -----------
X1 = math.log(x1), Y1 = math.log(p1)
X2 = math.log(x2), Y2 = math.log(p2)
X3 = math.log(x3), Y3 = math.log(p3)
n = 3.0
sumX = X1 + X2 + X3
sumY = Y1 + Y2 + Y3
sumX2 = X1*X1 + X2*X2 + X3*X3
sumXY = X1*Y1 + X2*Y2 + X3*Y3
denom = n*sumX2 - sumX*sumX
var float a = na
var float b = na
b := denom != 0 ? (n*sumXY - sumX*sumY) / denom : na
a := na(b) ? na : math.exp((sumY - b*sumX) / n)
// ----------- Courbe au fil des barres -----------
x_now = f_days(time)
curve = (not na(a) and not na(b) and x_now > 0) ? a * math.pow(x_now, b) : na
plot(series=curve, title="Courbe prévision (power-law)", color=color.fuchsia, linewidth=2)
// ----------- Projection fin 2025 -----------
proj2025 = (not na(a) and not na(b) and xP > 0) ? a * math.pow(xP, b) : na
bi_proj = ta.valuewhen(time >= t_proj, bar_index, 0)
x_for_label = na(bi_proj) ? bar_index : bi_proj
// Label affichant la projection
var label lbl = na
if barstate.islast and not na(proj2025)
txt = "Projection 2025 ≈ " + str.tostring(proj2025, format.price)
if na(lbl)
lbl := label.new(x=x_for_label, y=proj2025, text=txt, xloc=xloc.bar_index, style=label.style_label_up, color=color.green, textcolor=color.white, size=size.normal)
else
label.set_x(id=lbl, x=x_for_label)
label.set_y(id=lbl, y=proj2025)
label.set_text(id=lbl, text=txt)
Adaptive Market Regime Identifier [LuciTech]What it Does:
AMRI visually identifies and categorizes the market into six primary regimes directly on your chart using a color-coded background. These regimes are:
-Strong Bull Trend: Characterized by robust upward momentum and low volatility.
-Weak Bull Trend: Indicates upward momentum with less conviction or higher volatility.
-Strong Bear Trend: Defined by powerful downward momentum and low volatility.
-Weak Bear Trend: Suggests downward momentum with less force or increased volatility.
-Consolidation: Periods of low volatility and sideways price action.
-Volatile Chop: High volatility without clear directional bias, often seen during transitions or indecision.
By clearly delineating these states, AMRI helps traders quickly grasp the overarching market context, enabling them to apply strategies best suited for the current conditions (e.g., trend-following in strong trends, range-bound strategies in consolidation, or caution in volatile chop).
How it Works (The Adaptive Edge)
AMRI achieves its adaptive classification by continuously analyzing three core market dimensions, with each component dynamically adjusting to current market conditions:
1.Adaptive Moving Average (KAMA): The indicator utilizes the Kaufman Adaptive Moving Average (KAMA) to gauge trend direction and strength. KAMA is unique because it adjusts its smoothing period based on market efficiency (noise vs. direction). In trending markets, it becomes more responsive, while in choppy markets, it smooths out noise, providing a more reliable trend signal than static moving averages.
2.Adaptive Average True Range (ATR): Volatility is measured using an adaptive version of the Average True Range. Similar to KAMA, this ATR dynamically adjusts its sensitivity to reflect real-time changes in market volatility. This helps AMRI differentiate between calm, ranging markets and highly volatile, directional moves or chaotic periods.
3.Normalized Slope Analysis: The slope of the KAMA is normalized against the Adaptive ATR. This normalization provides a robust measure of trend strength that is relative to the current market volatility, making the thresholds for strong and weak trends more meaningful across different instruments and timeframes.
These adaptive components work in concert to provide a nuanced and responsive classification of the market regime, minimizing lag and reducing false signals often associated with fixed-parameter indicators.
Key Features & Originality:
-Dynamic Regime Classification: AMRI stands out by not just indicating trend or range, but by classifying the type of market regime, offering a higher-level analytical framework. This is a meta-indicator that provides context for all other trading tools.
-Adaptive Core Metrics: The use of KAMA and an Adaptive ATR ensures that the indicator remains relevant and responsive across diverse market conditions, automatically adjusting to changes in volatility and trend efficiency. This self-adjusting nature is a significant advantage over indicators with static lookback periods.
-Visual Clarity: The color-coded background provides an immediate, at-a-glance understanding of the current market regime, reducing cognitive load and allowing for quicker decision-making.
-Contextual Trading: By identifying the prevailing regime, AMRI empowers traders to select and apply strategies that are most effective for that specific environment, helping to avoid costly mistakes of using a trend-following strategy in a ranging market, or vice-versa.
-Originality: While components like KAMA and ATR are known, their adaptive integration into a comprehensive, multi-regime classification system, combined with normalized slope analysis for trend strength, offers a novel approach to market analysis not commonly found in publicly available indicators.
ローソク実体ブレイク(日足・4H・1H対応, ON/OFF切替付き, リプレイ安定版, テーブル表示付き)When a candlestick breaks at the body of the opposite candlestick, a horizontal line is drawn at the high and low of the broken candlestick. An arrow is drawn in the direction of the break. Available in three timeframes: daily, 4-hour, and 1-hour. Table display and individual on/off options. Might be useful for candlestick logic.
Volume DMAO [DCAUT]█ Volume DMAO Indicator
📊 OVERVIEW
The Volume DMAO (Dual Moving Average Oscillator) applies PPO-style calculation to volume data rather than price. It measures the percentage difference between fast and slow moving averages of volume, providing insights into volume momentum and market participation trends.
🎯 CONCEPTS
Signal Interpretation
Positive Values : Current volume above historical average (expansion phase)
Negative Values : Current volume below historical average (contraction phase)
Rising Trend : Volume momentum accelerating (increasing participation)
Falling Trend : Volume momentum decelerating (decreasing participation)
Primary Applications
Volume Confirmation : Validate price movements with volume momentum analysis
Divergence Detection : Spot potential reversals when volume diverges from price
Trend Strength : Assess volume participation in price trends
Entry/Exit Signals : Time trades based on volume momentum shifts
📋 PARAMETER SETUP
Input Parameters
Fast Length : Period for fast moving average (default: 12)
Slow Length : Period for slow moving average (default: 50)
MA Type : Moving average algorithm (default: EMA)
📊 COLOR CODING
Histogram Colors
Dark Green : Positive and rising (strong volume expansion)
Light Green : Positive and falling (weakening volume expansion)
Light Red : Negative and rising (recovering from volume contraction)
Dark Red : Negative and falling (strong volume contraction)
💡 CORE VALUE
Unlike traditional volume indicators, Volume DMAO provides normalized percentage readings that:
- Enable comparison across different timeframes and instruments
- Reveal volume momentum changes before price movements
- Identify market phases through volume participation analysis
Pops EMA Breakout Suite - PDH/PDL + PMH/PML + 13/48/200📘 How to Use the Pops EMA Breakout Suite
This script combines Previous Day Levels, Pre-Market Levels, and your EMA fan (13/48/200) into a repeatable trading framework. It’s designed for SPY, QQQ, IWM, and leading stocks — but can be applied anywhere.
🔹 Step 1: Check the Opening Condition
Price must open inside yesterday’s high (PDH) and yesterday’s low (PDL).
This tells you the market is “balanced” and ready for a breakout trade.
🔹 Step 2: Mark the Pre-Market Range (4:00–9:30 ET)
The script automatically plots:
PMH = Pre-Market High (blue line)
PML = Pre-Market Low (blue line)
These are your first breakout trigger levels.
🔹 Step 3: Wait for the Break
If price breaks above PMH, look for longs/calls targeting PDH.
If price breaks below PML, look for shorts/puts targeting PDL.
If price chops between PMH and PML → this is the No-Trade Zone. Sit on hands.
🔹 Step 4: Use the 2-Min EMA Fan for Entry
On a 2-minute chart:
Fast EMA (13, yellow) → entry trigger.
Mid EMA (48, purple) → short-term trend guide.
Slow EMA (200, red) → big-picture filter.
Entry Rule:
After breakout, wait for a pullback to the 13 EMA.
Enter when price rejects and continues in breakout direction.
Stop-loss = just past the 13 EMA.
🔹 Step 5: Manage the Trade
First targets = PDH/PDL zones.
Optional scaling = VWAP, Fib retrace, or major support/resistance.
Trail remainder with the 13 EMA.
🔹 Step 6: Alerts & Automation
The script has built-in alerts you can set:
“Break Above PM High” → signals breakout long.
“Break Below PM Low” → signals breakout short.
“2-min Long Entry” → confirms pullback long.
“2-min Short Entry” → confirms pullback short.
👉 In short: Levels (PDH/PDL, PMH/PML) give you the roadmap. EMAs give you the timing.
Double Top/Bottom Screener with Distance. Thank you for providing the error messages! There are two issues to address based on your input:
Error: "Value with NA type cannot be assigned to a variable that was defined without type keyword"
This occurs because in Pine Script, when a variable like distanceToNearest is used without an explicit type declaration (e.g., var float distanceToNearest), assigning na directly to it can cause a type mismatch error if the variable’s type isn’t pre-defined. The fix is to either declare distanceToNearest with a type (e.g., var float) or ensure the assignment aligns with Pine Script’s typing rules.
Warning: "Version 5 of Pine Script® is outdated. We recommend using the current version, which is 6. (PINE_VERSION_OUTDATED)"
TradingView has updated to Pine Script version 6, which includes new features and improvements. While version 5 still works, upgrading to version 6 is recommended for better compatibility and future support. The transition is mostly seamless, but we’ll need to adjust the script accordingly.
VWAP Bollinger CrossBased on the crossover of the moving average and VWAP, this indicator can help you find a trend. It is not recommended to use it only for entries. Try it and I hope it can help you.
Opening Range IndicatorComplete Trading Guide: Opening Range Breakout Strategy
What Are Opening Ranges?
Opening ranges capture the high and low prices during the first few minutes of market open. These levels often act as key support and resistance throughout the trading day because:
Heavy volume occurs at market open as overnight orders execute
Institutional activity is concentrated during opening minutes
Price discovery happens as market participants react to overnight news
Psychological levels are established that traders watch all day
Understanding the Three Timeframes
OR5 (5-Minute Range: 9:30-9:35 AM)
Most sensitive - captures immediate market reaction
Quick signals but higher false breakout rate
Best for scalping and momentum trading
Use for early entry when conviction is high
OR15 (15-Minute Range: 9:30-9:45 AM)
Balanced approach - most popular among day traders
Moderate sensitivity with better reliability
Good for swing trades lasting several hours
Primary timeframe for most strategies
OR30 (30-Minute Range: 9:30-10:00 AM)
Most reliable but slower signals
Lower false breakout rate
Best for position trades and trend following
Use when looking for major moves
Core Trading Strategies
Strategy 1: Basic Breakout
Setup:
Wait for price to break above OR15 high or below OR15 low
Enter on the breakout candle close
Stop loss: Opposite side of the range
Target: 2-3x the range size
Example:
OR15 range: $100.00 - $102.00 (Range = $2.00)
Long entry: Break above $102.00
Stop loss: $99.50 (below OR15 low)
Target: $104.00+ (2x range size)
Strategy 2: Multiple Confirmation
Setup:
Wait for OR5 break first (early signal)
Confirm with OR15 break in same direction
Enter on OR15 confirmation
Stop: Below OR30 if available, or OR15 opposite level
Why it works:
Multiple timeframe confirmation reduces false signals and increases probability of sustained moves.
Strategy 3: Failed Breakout Reversal
Setup:
Price breaks OR15 level but fails to hold
Wait for re-entry into the range
Enter reversal trade toward opposite OR level
Stop: Recent breakout high/low
Target: Opposite side of range + extension
Key insight: Failed breakouts often lead to strong moves in the opposite direction.
Advanced Techniques
Range Quality Assessment
High-Quality Ranges (Trade these):
Range size: 0.5% - 2% of stock price
Clean boundaries (not choppy)
Volume spike during range formation
Clear rejection at range levels
Low-Quality Ranges (Avoid these):
Very narrow ranges (<0.3% of stock price)
Extremely wide ranges (>3% of stock price)
Choppy, overlapping candles
Low volume during formation
Volume Confirmation
For Breakouts:
Look for volume spike (2x+ average) on breakout
Declining volume often signals false breakout
Rising volume during range formation shows interest
Market Context Filters
Best Conditions:
Trending market days (SPY/QQQ with clear direction)
Earnings reactions or news-driven moves
High-volume stocks with good liquidity
Volatility above average (VIX considerations)
Avoid Trading When:
Extremely low volume days
Major economic announcements pending
Holidays or half-days
Choppy, sideways market conditions
Risk Management Rules
Position Sizing
Conservative: Risk 0.5% of account per trade
Moderate: Risk 1% of account per trade
Aggressive: Risk 2% maximum per trade
Stop Loss Placement
Inside the range: Quick exit but higher stop-out rate
Outside opposite level: More room but larger risk
ATR-based: 1.5-2x Average True Range below entry
Profit Taking
Target 1: 1x range size (take 50% off)
Target 2: 2x range size (take 25% off)
Runner: Trail remaining 25% with moving stops
Specific Entry Techniques
Breakout Entry Methods
Method 1: Immediate Entry
Enter as soon as price closes above/below range
Fastest entry but highest false signal rate
Best for strong momentum situations
Method 2: Pullback Entry
Wait for breakout, then pullback to range level
Enter when price bounces off former resistance/support
Better risk/reward but may miss some moves
Method 3: Volume Confirmation
Wait for breakout + volume spike
Enter after volume confirmation candle
Reduces false signals significantly
Multiple Timeframe Entries
Aggressive: OR5 break → immediate entry
Conservative: OR5 + OR15 + OR30 all align → enter
Balanced: OR15 break with OR30 support → enter
Common Mistakes to Avoid
1. Trading Poor-Quality Ranges
❌ Don't trade ranges that are too narrow or too wide
✅ Focus on clean, well-defined ranges with good volume
2. Ignoring Volume
❌ Don't chase breakouts without volume confirmation
✅ Always check for volume spike on breakouts
3. Over-Trading
❌ Don't force trades when ranges are unclear
✅ Wait for high-probability setups only
4. Poor Risk Management
❌ Don't risk more than planned or use tight stops in volatile conditions
✅ Stick to predetermined risk levels
5. Fighting the Trend
❌ Don't fade breakouts in strongly trending markets
✅ Align trades with overall market direction
Daily Trading Routine
Pre-Market (8:00-9:30 AM)
Check overnight news and earnings
Review major indices (SPY, QQQ, IWM)
Identify potential opening range candidates
Set alerts for range breakouts
Market Open (9:30-10:00 AM)
Watch opening range formation
Note volume and price action quality
Mark key levels on charts
Prepare for breakout signals
Trading Session (10:00 AM - 4:00 PM)
Execute breakout strategies
Manage existing positions
Trail stops as profits develop
Look for additional setups
Post-Market Review
Analyze winning and losing trades
Review range quality vs. outcomes
Identify improvement areas
Prepare for next session
Best Stocks/ETFs for Opening Range Trading
Large Cap Stocks (Best for beginners):
AAPL, MSFT, GOOGL, AMZN, TSLA
High liquidity, predictable behavior
Good range formation most days
ETFs (Consistent patterns):
SPY, QQQ, IWM, XLF, XLE
Excellent liquidity
Clear range boundaries
Mid-Cap Growth (Advanced traders):
Stocks with good volume (1M+ shares daily)
Recent news catalysts
Clean technical patterns
Performance Optimization
Track These Metrics:
Win rate by range type (OR5 vs OR15 vs OR30)
Average R/R (risk vs reward ratio)
Best performing market conditions
Time of day performance
Continuous Improvement:
Keep detailed trade journal
Review failed breakouts for patterns
Adjust position sizing based on win rate
Refine entry timing based on backtesting
Final Tips for Success
Start small - Paper trade or use tiny positions initially
Focus on quality - Better to miss trades than take bad ones
Stay disciplined - Stick to your rules even during losing streaks
Adapt to conditions - What works in trending markets may fail in choppy conditions
Keep learning - Markets evolve, so should your approach
The opening range strategy is powerful because it captures natural market behavior, but like all strategies, it requires practice, discipline, and proper risk management to be profitable long-term.