Bullish and Bearish Breakout Alert for Gold Futures PullbackBelow is a Pine Script (version 6) for TradingView that includes both bullish and bearish breakout conditions for my intraday trading strategy on micro gold futures (MGC). The strategy focuses on scalping two-legged pullbacks to the 20 EMA or key levels with breakout confirmation, tailored for the Apex Trader Funding $300K challenge. The script accounts for the Daily Sentiment Index (DSI) at 87 (overbought, favoring pullbacks). It generates alerts for placing stop-limit orders for 175 MGC contracts, ensuring compliance with Apex’s rules ($7,500 trailing threshold, $20,000 profit target, 4:59 PM ET close).
Script Requirements
Version: Pine Script v6 (latest for TradingView, April 2025).
Purpose:
Bullish: Alert when price breaks above a rejection candle’s high after a two-legged pullback to the 20 EMA in a bullish trend (price above 20 EMA, VWAP, higher highs/lows).
Bearish: Alert when price breaks below a rejection candle’s low after a two-legged pullback to the 20 EMA in a bearish trend (price below 20 EMA, VWAP, lower highs/lows).
Context: 5-minute MGC chart, U.S. session (8:30 AM–12:00 PM ET), avoiding overbought breakouts above $3,450 (DSI 87).
Output: Alerts for stop-limit orders (e.g., “Buy: Stop=$3,377, Limit=$3,377.10” or “Sell: Stop=$3,447, Limit=$3,446.90”), quantity 175 MGC.
Apex Compliance: 175-contract limit, stop-losses, one-directional news trading, close by 4:59 PM ET.
How to Use the Script in TradingView
1. Add Script:
Open TradingView (tradingview.com).
Go to “Pine Editor” (bottom panel).
Copy the script from the content.
Click “Add to Chart” to apply to your MGC 5-minute chart .
2. Configure Chart:
Symbol: MGC (Micro Gold Futures, CME, via Tradovate/Apex data feed).
Timeframe: 5-minute (entries), 15-minute (trend confirmation, manually check).
Indicators: Script plots 20 EMA and VWAP; add RSI (14) and volume manually if needed .
3. Set Alerts:
Click the “Alert” icon (bell).
Add two alerts:
Bullish Breakout: Condition = “Bullish Breakout Alert for Gold Futures Pullback,” trigger = “Once Per Bar Close.”
Bearish Breakout: Condition = “Bearish Breakout Alert for Gold Futures Pullback,” trigger = “Once Per Bar Close.”
Customize messages (default provided) and set notifications (e.g., TradingView app, SMS).
Example: Bullish alert at $3,377 prompts “Stop=$3,377, Limit=$3,377.10, Quantity=175 MGC” .
4. Execute Orders:
Bullish:
Alert triggers (e.g., stop $3,377, limit $3,377.10).
In TradingView’s “Order Panel,” select “Stop-Limit,” set:
Stop Price: $3,377.
Limit Price: $3,377.10.
Quantity: 175 MGC.
Direction: Buy.
Confirm via Tradovate.
Add bracket order (OCO):
Stop-loss: Sell 175 at $3,376.20 (8 ticks, $1,400 risk).
Take-profit: Sell 87 at $3,378 (1:1), 88 at $3,379 (2:1) .
Bearish:
Alert triggers (e.g., stop $3,447, limit $3,446.90).
Select “Stop-Limit,” set:
Stop Price: $3,447.
Limit Price: $3,446.90.
Quantity: 175 MGC.
Direction: Sell.
Confirm via Tradovate.
Add bracket order:
Stop-loss: Buy 175 at $3,447.80 (8 ticks, $1,400 risk).
Take-profit: Buy 87 at $3,446 (1:1), 88 at $3,445 (2:1) .
5. Monitor:
Green triangles (bullish) or red triangles (bearish) confirm signals.
Avoid bullish entries above $3,450 (DSI 87, overbought) or bearish entries below $3,296 (support) .
Close trades by 4:59 PM ET (set 4:50 PM alert) .
Penunjuk dan strategi
Stochastic Strategy Table with Trend (1m–4H) + Toggle📊 Multi-Timeframe Stochastic Strategy Table with Trend Detection
This script is designed for intraday and swing traders who want to monitor Stochastic momentum across multiple timeframes in real-time — all directly on the main chart.
🔎 What This Script Does
This script builds a compact, color-coded table that displays:
✅ %K and %D values of the Stochastic oscillator
✅ Cross direction (K > D or K < D)
✅ Overbought/Oversold zone conditions
✅ Short-term trend detection via %K movement
It covers ten timeframes:
1m, 2m,3m,5m, 15m, 30m, 1H, 2H, 3H, 4H
🟩 How to Use It
Trend colors in header:
🟢 Green = %K is rising (uptrend)
🔴 Red = %K is falling (downtrend)
⚪ Gray = flat or neutral
Cross Row:
Green background = Bullish (%K > %D)
Red background = Bearish (%K < %D)
Zone Row:
Green = Oversold (%K and %D below 20)
Red = Overbought (%K and %D above 80)
Gray = Neutral zone
Use Case:
Look for multiple timeframes aligning in trend
Enter trades on short timeframes (e.g. 5m) when HTFs confirm direction
Especially powerful when used with price action on 5m/15m candles
⚙️ Configurable Inputs
%K Length
%K Smoothing
%D Length
Table location
Table size
💡 Why This Script Is Unique
Shows true higher timeframe Stochastic values (not interpolated from current chart)
Works in real-time with consistent updates
Trend direction is visualized without needing extra space
Built for serious intraday traders who rely on clean data and signal alignment
🙏 Credits & Notes
This tool was created to solve a real problem: getting accurate HTF stochastic data in a clean, real-time, decision-friendly format.
I built it for my own use — and now I'm sharing it for luck, and for anyone else looking to trade more clearly and confidently.
Feel free to fork, customize, or build upon it.
Good luck, and trade safe! 🍀💹
TrendBoxThis indicator is called "TrendBox," designed to help traders analyze daily price ranges using several technical indicators. Below is a breakdown of its functionality, purpose, and key components:
Purpose
The script overlays indicators on a chart to assess whether the price is above or below key levels:
VWAP (Volume Weighted Average Price, based on the chart's timeframe).
Daily Market Open (fetched from the daily timeframe).
Daily 4-period VWMA (Volume Weighted Moving Average, fetched from the daily timeframe).
VIX-based expected range (high and low levels calculated using the VIX index).
It also displays a status box (optional) summarizing whether the price is above or below these levels, helping traders quickly evaluate market conditions.
🐢 Turtle Soup Strategy v1.0 – TBS/TWS + OB/FVG + SL/TP🐢 Turtle Soup Strategy v1.0 – Backtest Edition
This document gives you everything you need to use, interpret, and optimize the Turtle Soup Strategy in TradingView.
🐢 What is Turtle Soup?
Turtle Soup is a reversal trading strategy based on false breakouts of recent highs or lows — often referred to as liquidity traps.
Popularized by Linda Raschke , it flips the logic of breakout trading on its head by betting against the breakout, especially when it occurs near key swing points or in range-bound markets.
The idea is simple:
"When the turtles come out, the smart money cooks them."
🧠 In practice, traders place buy orders after price dips below a recent low and reverses, or sell orders after a false breakout above a high.
These fakeouts are often stop hunts, where large players induce retail traders into breakout positions, only to reverse the market against them — providing high-probability entry points for contrarian traders.
🧪 Core Components of Turtle Soup:
✅ Donchian Channel (recent swing high/low)
✅ Wick or body breakout
✅ Fast reversal back into range
✅ (Optional) Order block or FVG confluence
🔥 Why It Works:
Exploits liquidity zones where retail stops are clustered
Aligns with smart money concepts
Highly effective in sideways markets or after exhaustion spikes
🔎 What This Strategy Does
This is a reversal-based price action strategy that identifies false breakouts of recent highs or lows (liquidity traps), using the popular Turtle Soup pattern.
It enters trades when:
Price fakes out past the Donchian high or low
Closes back into the range
Optionally confirms with:
✅ Order Block Confluence (institutional footprint)
✅ Fair Value Gap (FVG) Confluence (imbalance)
It then sets:
🛑 A Stop Loss (SL) below/above the signal candle
🎯 A Take Profit (TP1) at a customizable Risk-Reward Ratio (RR) (default 1.5x)
🎯 Core Concepts
1. TBS – Turtle Body Soup
Full-body breakout and close back inside range
Considered stronger and more reliable
2. TWS – Turtle Wick Soup
Wick only breaks the high/low, body closes back inside
Weaker but still valid in confluence
⚙️ Inputs & Settings
Setting Description
Donchian Lookback Period for high/low reference (default: 20 candles)
TP1 RR Risk-Reward ratio for take profit target 1 (default: 1.5)
Use Order Block Filter If ON, requires bullish/bearish OB to validate the entry
Use FVG Filter If ON, requires FVG confluence (gap in price action = imbalance)
You can adjust these in the strategy’s Settings panel (gear icon in TradingView).
📈 How Trades Are Triggered
🟢 Long Entry occurs when:
TBS or TWS long signal is detected
(optional) Bullish Order Block present
(optional) Bullish FVG present
→ Entry: Close of signal candle
→ SL: Below candle’s low
→ TP1: Calculated from RR (default: 1.5x distance to SL)
🔴 Short Entry occurs when:
TBS or TWS short signal is detected
(optional) Bearish Order Block present
(optional) Bearish FVG present
→ Entry: Close of signal candle
→ SL: Above candle’s high
→ TP1: Calculated from RR (default: 1.5x distance to SL)
📊 How to Backtest
1. Open script in TradingView
Paste the full script into the Pine Script editor and click "Add to Chart".
2. Open the Strategy Tester
Navigate to the “Strategy Tester” tab (bottom panel).
Click “Overview” to see:
Net Profit 💰
Win Rate 📈
Number of Trades 📊
Max Drawdown 🩸
3. Use "Performance Summary" and "List of Trades"
You can click on List of Trades to review every trade (entry, exit, profit, SL, TP).
Filter and export as needed.
📊 Turtle Soup – Chart Signals Explained
🟢 TBS Long
Symbol: Green label up, text “TBS 🔺”
Meaning:
Turtle Body Soup long setup:
The body of the candle breaks below the recent Donchian Low (liquidity grab),
Then price closes back above that low.
Interpretation:
Strong bullish reversal signal, especially if confirmed by order block or FVG.
🔴 TBS Short
Symbol: Red label down, text “TBS 🔻”
Meaning:
Turtle Body Soup short setup:
The body of the candle breaks above the recent Donchian High (liquidity grab),
Then price closes back below that high.
Interpretation:
Strong bearish reversal signal.
🔵 TWS Long
Symbol: Blue triangle up, text “TWS ⬆”
Meaning:
Turtle Wick Soup long setup:
The wick (not the body) breaks below the Donchian Low,
Candle closes back inside the range.
Interpretation:
Bullish reversal signal (less powerful than TBS but still valid).
🟠 TWS Short
Symbol: Orange triangle down, text “TWS ⬇”
Meaning:
Turtle Wick Soup short setup:
The wick breaks above the Donchian High,
Candle closes back inside the range.
Interpretation:
Bearish reversal signal.
🟩 Order Block Bullish
Symbol: Small green square under bar
Meaning:
Last bearish candle before a bullish impulse (institutional buying footprint).
Used as confluence for stronger long entries.
🟥 Order Block Bearish
Symbol: Small red square above bar
Meaning:
Last bullish candle before a bearish impulse (institutional selling footprint).
Used as confluence for stronger short entries.
🔷 FVG Up
Symbol: Navy blue X below bar
Meaning:
Fair Value Gap (FVG) up:
A gap/imbalance created by a strong move up,
Indicates potential support or bullish confluence.
🟪 FVG Down
Symbol: Fuchsia X above bar
Meaning:
Fair Value Gap (FVG) down:
A gap/imbalance created by a strong move down,
Indicates potential resistance or bearish confluence.
📏 Entry / SL / TP Lines
Entry: Gray dashed line
Stop Loss (SL): Red dashed line
Take Profit 1 (TP1): Green solid line
Take Profit 2 (TP2): Green thick solid line
Drawn whenever a trade is triggered.
SL and TPs are calculated automatically from entry based on RR.
💡 Optimization Tips
What to Test - Why It Matters
Donchian Lookback - 20 is default, but shorter (10) catches faster setups
TP1 RR - Try 1.2 to 2.5 for different market types
Use/Disable Order Block Filter - Adds precision, reduces trades
Use/Disable FVG Filter . Adds imbalance confirmation
Lower Timeframes (M15–H1) - Gives more trades for statistical testing
🧠 When It Works Best
This strategy shines in:
Choppy / range-bound markets (liquidity traps are frequent)
Smart money behavior areas: stop hunts before reversals
Near session opens, news volatility, and false breakouts
Avoid in:
Strong trending markets without reversal signals
Low liquidity / overnight hours (on low timeframes)
🛡️ Risk Disclaimer
⚠️ This is a backtesting tool and not financial advice. Use responsibly.
Past performance ≠ future results. Always validate on demo or forward test before going live.
4 Closes + Current Price SMAThis calculates the 5 day Simple Moving Average in the same way that the backtester in Option Omega does, by using the 4 previous closes and current price of the 5th day.
ONE RING 8 MA Bands with RaysCycle analysis tool ...
MAs: Eight moving averages (MA1–MA8) with customizable lengths, types (RMA, WMA, EMA, SMA), and offsets
Bands: Upper/lower bands for each MA, calculated based on final_pctX (Percentage mode) or final_ptsX (Points mode), scaled by multiplier
Rays: Forward-projected lines for bands, with customizable start points, styles (Solid, Dashed, Dotted), and lengths (up to 500 bars)
Band Choices
Manual: Uses individual inputs for band offsets
Uniform: Sets all offsets to base_pct (e.g., 0.1%) or base_pts (e.g., 0.1 points)
Linear: Scales linearly (e.g., base_pct * 1, base_pct * 2, base_pct * 3 ..., base_pct * 8)
Exponential: Scales exponentially (e.g., base_pct * 1, base_pct * 2, base_pct * 4, base_pct * 8 ..., base_pct * 128)
ATR-Based: Offsets are derived from the Average True Range (ATR), scaled by a linear factor. Dynamic bands that adapt to market conditions, useful for breakout or mean-reversion strategies. (final_pct1 = base_pct * atr, final_pct2 = base_pct * atr * 2, ..., final_pct8 = base_pct * atr * 8)
Geometric: Offsets follow a geometric progression (e.g., base_pct * r^0, base_pct * r^1, base_pct * r^2, ..., where r is a ratio like 1.5) This is less aggressive than Exponential (which uses powers of 2) and provides a smoother progression.
Example: If base_pct = 0.1, r = 1.5, then final_pct1 = 0.1%, final_pct2 = 0.15%, final_pct3 = 0.225%, ..., final_pct8 ≈ 1.71%
Harmonic: Offsets are based on harmonic flavored ratios. final_pctX = base_pct * X / (9 - X), final_ptsX = base_pts * X / (9 - X) for X = 1 to 8 This creates a harmonic-like progression where offsets increase non-linearly, ensuring MA8 bands are wider than MA1 bands, and avoids duplicating the Linear choice above.
Ex. offsets for base_pct = 0.1: MA1: ±0.0125% (0.1 * 1/8), MA2: ±0.0286% (0.1 * 2/7), MA3: ±0.05% (0.1 * 3/6), MA4: ±0.08% (0.1 * 4/5), MA5: ±0.125% (0.1 * 5/4), MA6: ±0.2% (0.1 * 6/3), MA7: ±0.35% (0.1 * 7/2), MA8: ±0.8% (0.1 * 8/1)
Square Root: Offsets grow with the square root of the band index (e.g., base_pct * sqrt(1), base_pct * sqrt(2), ..., base_pct * sqrt(8)). This creates a gradual widening, less aggressive than Linear or Exponential. Set final_pct1 = base_pct * sqrt(1), final_pct2 = base_pct * sqrt(2), ..., final_pct8 = base_pct * sqrt(8).
Example: If base_pct = 0.1, then final_pct1 = 0.1%, final_pct2 ≈ 0.141%, final_pct3 ≈ 0.173%, ..., final_pct8 ≈ 0.283%.
Fibonacci: Uses Fibonacci ratios (e.g., base_pct * 1, base_pct * 1.618, base_pct * 2.618
Percentage vs. Points Toggle:
In Percentage mode, bands are calculated as ma * (1 ± (final_pct / 100) * multiplier)
In Points mode, bands are calculated as ma ± final_pts * multiplier, where final_pts is in price units.
Threshold Setting for Slope:
Threshold setting for determining when the slope would be significant enough to call it a change in direction. Can check efficiency by setting MA1 to color on slope temporarily
Arrow table: Shows slope direction of 8 MAs using an Up or Down triangle, or shows Flat condition if no triangle.
OI GridTo draw a horizontal line that compares spot and future prices, users can select a symbol and an OI range for each asset.
Trend Channel SwiftEdgeTrend Channel SwiftEdge
The Trend Channel SwiftEdge is a powerful, visually striking tool designed to help traders identify trends and potential trade setups across multiple timeframes with a futuristic, tech-inspired design. This indicator combines a dynamic trend channel with a multi-timeframe trend dashboard and intelligent signal filtering to provide clear, actionable insights for both novice and experienced traders. Its unique neon-lit, holographic visuals give it a modern, cutting-edge feel, making your chart analysis both functional and visually engaging.
What It Does
This indicator identifies trends on your chart using a dynamic price channel and provides buy and sell signals based on trend alignments across multiple timeframes. It also features a dashboard that displays the trend direction (Up, Down, or Neutral) for six timeframes: 1-minute, 5-minute, 15-minute, 1-hour, 4-hour, and 1-day. The signals are filtered using a user-selected higher timeframe to ensure they align with broader market trends, reducing noise and improving trade reliability.
How It Works
The Trend Channel SwiftEdge operates in three key steps:
Dynamic Trend Channel:
A moving average (MA) is calculated based on your chosen type (SMA, EMA, or WMA) and length (default is 14 periods). This MA forms the backbone of the trend channel.
The channel’s upper and lower bounds are created by calculating the highest and lowest values of the MA over a period (default is 2x the MA length). These bounds help identify the trend: if the price is above the upper channel, the trend is Up; if below the lower channel, the trend is Down; otherwise, it’s Neutral.
The MA and channel lines are plotted with neon colors (green for Up, red for Down, blue for the channel bounds) to create a holographic effect, with a glowing background fill between the channels to highlight the trend direction.
Multi-Timeframe Trend Dashboard:
The indicator analyzes trends across six timeframes (1M, 5M, 15M, 1H, 4H, D1) using the same trend channel logic.
A dashboard in the top-right corner displays each timeframe’s trend direction with a futuristic design: neon green for Up, neon red for Down, and gray for Neutral, all set against a dark background with neon blue accents.
Signal Generation with Higher Timeframe Filter:
Buy and Sell signals are generated when the trend on the chart’s timeframe (e.g., 1M) aligns with a user-selected higher timeframe (e.g., 15M).
A Buy signal ("🚀 SwiftEdge BUY") appears when the price crosses above the upper channel (indicating an Up trend) and the selected higher timeframe’s trend also turns Up. If the higher timeframe is Neutral, the indicator checks even higher timeframes (e.g., 1H and 4H for a 15M filter) to confirm the trend direction.
A Sell signal ("🛑 SwiftEdge SELL") appears when the price crosses below the lower channel (indicating a Down trend) and the selected higher timeframe’s trend turns Down, with the same higher timeframe check for Neutral cases.
Signals are displayed as neon-colored labels with emojis for a futuristic touch, making them easy to spot.
Why This Combination?
The combination of a dynamic trend channel, multi-timeframe analysis, and signal filtering in Trend Channel SwiftEdge is designed to provide a comprehensive view of market trends while reducing false signals. The trend channel identifies the primary trend on your chart, while the multi-timeframe dashboard ensures you’re aware of the broader market context. The signal filter leverages higher timeframes to confirm that your trades align with larger trends, which is particularly useful in volatile markets where smaller timeframes can be noisy. This synergy creates a balanced approach, blending short-term precision with long-term trend confirmation, all wrapped in a visually engaging tech-inspired design.
How to Use It
Add the Indicator: Apply Trend Channel SwiftEdge to your TradingView chart.
Customize Settings:
SwiftEdge Moving Average Type: Choose between SMA, EMA, or WMA (default is EMA) to adjust the trend channel’s sensitivity.
SwiftEdge MA Length: Set the period for the moving average (default is 14).
SwiftEdge Signal Filter Timeframe: Select a higher timeframe (1M, 5M, 15M, 1H, 4H, D1) to filter signals (default is 15M). For example, on a 1M chart, selecting 15M ensures signals align with the 15-minute trend.
Show SwiftEdge Ribbon: Toggle the visibility of the trend channel’s moving average (default is true).
Show SwiftEdge Background Glow: Toggle the glowing background fill between the channel bounds (default is true).
Start/End Year: Set a time range for the indicator’s signals (default is 1900–2100).
Interpret the Dashboard: Check the top-right dashboard to see the trend direction across all timeframes. Use this to understand the broader market context.
Trade with Signals:
Look for "🚀 SwiftEdge BUY" labels (neon green) below candles to enter long positions when the trend aligns across timeframes.
Look for "🛑 SwiftEdge SELL" labels (neon red) above candles to enter short positions or exit longs.
Ensure the signal aligns with your trading strategy and risk management.
What Makes It Original?
Trend Channel SwiftEdge stands out with its futuristic, tech-inspired design and multi-timeframe synergy. Unlike traditional trend indicators, it combines a visually striking neon aesthetic with practical functionality, making trend analysis both intuitive and engaging. The signal filtering mechanism, which checks higher timeframes dynamically, ensures trades are backed by broader market trends, reducing the risk of false signals. The dashboard provides a quick, at-a-glance view of trends across multiple timeframes, empowering traders to make informed decisions without needing to switch charts. This blend of advanced trend analysis, intelligent signal filtering, and a high-tech visual theme makes it a unique tool for modern traders.
Notes
Best used on trending markets; in choppy conditions, consider using higher timeframes for signal filtering to reduce noise.
Adjust the MA length and signal timeframe based on your trading style (shorter for scalping, longer for swing trading).
Why This Description Complies with TradingView House Rules
What It Does:
Clearly explains that the script identifies trends using a dynamic channel, provides buy/sell signals, and displays a multi-timeframe dashboard.
How It Does It:
Breaks down the process into three steps: trend channel calculation, multi-timeframe analysis, and signal generation with higher timeframe filtering.
Explains the logic (e.g., price crossing the channel, trend alignment across timeframes) in simple terms.
How to Use It:
Provides step-by-step instructions on adding the indicator, customizing settings, interpreting the dashboard, and trading with signals.
What Makes It Original:
Highlights the unique tech-inspired design, the combination of trend channel and multi-timeframe filtering, and the dynamic higher timeframe check.
Justifies the Combination:
Explains why the trend channel, multi-timeframe dashboard, and signal filtering are used together: to balance short-term precision with long-term trend confirmation, reducing false signals.
Self-Contained:
All concepts (trend channel, multi-timeframe analysis, signal filtering) are explained within the description without requiring external research.
Avoids technical jargon that would confuse non-Pine readers, focusing on user-friendly language.
This updated description with the new name "Trend Channel SwiftEdge" should fully comply with TradingView’s House Rules. If you need further adjustments, let me know!
Perfect MA Touch (EMA/SMA + Font Size) – ExtendedThis is an extension of the Perfect MA touch with 6 total spaces for the Moving Averages.
When the candle touches the MA for the first time it will have a 1, and then the 5 the time it will leave a 5. Make you trading decisions with help from the 5 candle high and low.
DUONG_EURWhat is the RSI indicator? Instructions on how to use RSI in stock trading
Currently, technical analysis indicators are widely used to confirm the strength or weakness of the market. In this article, let's learn more about the RSI indicator with DSC to easily confirm the current strength of the market.
What is the RSI indicator?
The RSI indicator, also known as the relative strength indicator, is widely used in the financial and stock markets. RSI is calculated by the price of the most recent previous closing sessions. Therefore, it is often considered normal when it moves in phase with the price line.
RSI calculation formula
In which:
RS = AvgU/AvgD
AvgU is the average of the closing price changes of the increasing sessions in 14 sessions.
BTC Correlation & Manual Delay OverlayIt will automatically plot BTCUSDT.P Bitget and see what delay gives maximum correlation.
You can also manually plot the delay too.
MACD dong pha 2 cap do W/DInstructions for use:
_ Green area: Weekly and Daily MACD are both in the Positive zone
_ Red area: Weekly and Daily MACD are both in the Negative zone
Volume Weighted Median Price (VWMP)The volume is indeed crucial for confirming price moves and understanding market conviction. While many traders are familiar with VWAP (Volume Weighted Average Price), this indicator introduces a lesser-known but powerful cousin: the Volume Weighted Median Price (VWMP).
What is VWMP?
Unlike VWAP, which calculates the average price weighted by volume over a period, VWMP identifies the median price level weighted by volume.
Think of it this way: If you line up all the trades within a specific lookback period, sorted by price, and then start accumulating the volume traded at each price level, the VWMP is the price level where 50% of the total volume occurred below it, and 50% occurred above it.
It essentially finds the "middle ground" of trading activity based on where the bulk of the volume actually traded, not just the average price.
Key Difference: VWMP vs. VWAP
VWAP: Volume Weighted Average Price. Sensitive to outliers (single large trades at extreme prices can skew the average).
VWMP: Volume Weighted Median Price. More robust to outliers. It represents the price that splits the period's volume distribution in half.
Because it uses the median, VWMP can sometimes provide a more stable or representative level of the "typical" price where significant volume is changing hands, especially in volatile markets or when large, anomalous trades occur.
How to Interpret and Use VWMP in trading
The VWMP plots as a line on your chart, similar to a moving average or VWAP. Here are a few ways traders might use it:
Dynamic Support and Resistance:
Like VWAP, the VWMP line can act as a dynamic level of interest.
Watch how price interacts with the VWMP. Consistent acceptance above VWMP might suggest bullish control and potential support.
Consistent rejection or acceptance below VWMP might indicate bearish control and potential resistance.
Trend Filter / Confirmation:
Uptrend: Look for price consistently staying above the VWMP line. Pullbacks to the VWMP that hold could offer entry opportunities.
Downtrend: Look for price consistently staying below the VWMP line. Rallies to the VWMP that fail could present shorting opportunities.
Use it to filter trades: Only take long trades if price is above VWMP, and short trades if below.
Mean Reversion Potential (Use with Caution):
When price extends significantly far away from the VWMP, some traders might look for potential reversion back towards this volume-based median level.
Important: This should not be used in isolation. Always look for confirmation from other indicators (like RSI, Stochastics, or candlestick patterns) before trading counter-trend reversions.
Confluence with Other Indicators:
VWMP works best when combined with other analysis tools.
Look for confluence: Does the VWMP align with a key Fibonacci level, a standard moving average, or a prior support/resistance zone? This confluence strengthens the level's potential significance.
Considerations
Lookback Period: The length input is crucial. A shorter period makes VWMP more responsive to recent action; a longer period makes it smoother and reflects longer-term volume distribution. Experiment to find what suits your timeframe and trading style.
Lagging Nature: Like all indicators based on past data, VWMP is inherently lagging. It reflects past volume distribution, not the future.
Market Context: Its effectiveness can vary depending on the market conditions (trending vs. ranging) and the asset being traded.
Adaptive ATR LimitsThis script plots adaptive ATR limits for intraday trading. It is intended for equities. It is not tested for other securities like futures, crypto, etc, though it may work for these too. It works for both regular trading hours and extended trading hours.
The limit lines (top and bottom) are always exactly 1 ATR/ADR apart. This is a key feature of the indicator.
The main mode is ATR, which includes overnight gaps and pre- and post-market movements. This also means the previous day close is considered to part of the current days range (which aligns with the definition of ATR). There is also an ADR mode, which uses the average range the price moves within regular hours only and is not affected by prices outside of these. Other than that, they work the same (including ATR/ADR length option and smoothing).
When in ADR mode, it treats premarket as a separate session from the regular/post-market and resets the session range at the regular market open. This is so it can plot the limits in the regular/post-market hours without being affected by the pre-market range. This is necessary since the daily ADR includes only regular market moves and due to the way the limits adapt.
It tries to plot the most sensible ATR limits based on the current daily ATR, in order to provide a visual target for how far a price could/should move intraday. In order to do this, it uses two methods to calculate limits, i) based on the mid-point of the current session range, and ii) based on the currently established range and current relative price position within that range.
The session starts using the first method. As more of the ATR is covered in the session, it transitions over of the second method. Once (if) the full ATR is covered within the session, it will have completely transitioned to the second method and will only use that for the rest of the session. In between these states, a weighted average of the two methods is used depending on the amount of the ATR the session has covered.
To explain the effect, as an example, imagine that the price is approaching the full ATR range on the high side. The indicator will have almost fully transitioned to the second (relative) method. The lower ATR limit will now be anchored to the daily low as the price hits the upper ATR limit. If the price goes beyond the upper ATR, the lower ATR limit will stay anchored to the daily low, and the upper limit will stay anchored to 1 ATR above the lower limit. This allows you to see how far the price is going beyond the upper ATR limit. If the price then returns and backs off the upper ATR limit, the lower ATR limit will un-anchor from the daily low (it will actually rise since the daily ATR range has been exceeded so the lower ATR limit needs to come up since the actual daily range can't fit into the ATR range anymore). The overall effect is to give you the best visual indication where the price is in relation to a possible upper ATR-based target. Reverse this example for when price low approaches the ATR range on the low side.
There is also a "basic mode" which simply plots 1 ATR/ADR above/below the session low/high. When using ADR, the session resets at the end of the pre-market.
The ATR length (averaging period) can be set (number of days), as well as a visual smoothing of the ATR limits using EMA.
EVOLVema 9/21/200 editable.
highs and lows marked.
market reversals with algo strategy through behavior and delivery.
additionaly asian session highlighted.
BTCUSDT.P Delayed OverlayYou can see overlay of Bitget's BTCUSDT.P on chart.
You can delay it as much as you want.
I honestly made this for myself.
Price Variation Percent (PVP) с таймфреймомA standard PVP indicator that has a multi-timeframe function added to it
Momentum + Keltner Stochastic Combo)The Momentum-Keltner-Stochastic Combination Strategy: A Technical Analysis and Empirical Validation
This study presents an advanced algorithmic trading strategy that implements a hybrid approach between momentum-based price dynamics and relative positioning within a volatility-adjusted Keltner Channel framework. The strategy utilizes an innovative "Keltner Stochastic" concept as its primary decision-making factor for market entries and exits, while implementing a dynamic capital allocation model with risk-based stop-loss mechanisms. Empirical testing demonstrates the strategy's potential for generating alpha in various market conditions through the combination of trend-following momentum principles and mean-reversion elements within defined volatility thresholds.
1. Introduction
Financial market trading increasingly relies on the integration of various technical indicators for identifying optimal trading opportunities (Lo et al., 2000). While individual indicators are often compromised by market noise, combinations of complementary approaches have shown superior performance in detecting significant market movements (Murphy, 1999; Kaufman, 2013). This research introduces a novel algorithmic strategy that synthesizes momentum principles with volatility-adjusted envelope analysis through Keltner Channels.
2. Theoretical Foundation
2.1 Momentum Component
The momentum component of the strategy builds upon the seminal work of Jegadeesh and Titman (1993), who demonstrated that stocks which performed well (poorly) over a 3 to 12-month period continue to perform well (poorly) over subsequent months. As Moskowitz et al. (2012) further established, this time-series momentum effect persists across various asset classes and time frames. The present strategy implements a short-term momentum lookback period (7 bars) to identify the prevailing price direction, consistent with findings by Chan et al. (2000) that shorter-term momentum signals can be effective in algorithmic trading systems.
2.2 Keltner Channels
Keltner Channels, as formalized by Chester Keltner (1960) and later modified by Linda Bradford Raschke, represent a volatility-based envelope system that plots bands at a specified distance from a central exponential moving average (Keltner, 1960; Raschke & Connors, 1996). Unlike traditional Bollinger Bands that use standard deviation, Keltner Channels typically employ Average True Range (ATR) to establish the bands' distance from the central line, providing a smoother volatility measure as established by Wilder (1978).
2.3 Stochastic Oscillator Principles
The strategy incorporates a modified stochastic oscillator approach, conceptually similar to Lane's Stochastic (Lane, 1984), but applied to a price's position within Keltner Channels rather than standard price ranges. This creates what we term "Keltner Stochastic," measuring the relative position of price within the volatility-adjusted channel as a percentage value.
3. Strategy Methodology
3.1 Entry and Exit Conditions
The strategy employs a contrarian approach within the channel framework:
Long Entry Condition:
Close price > Close price periods ago (momentum filter)
KeltnerStochastic < threshold (oversold within channel)
Short Entry Condition:
Close price < Close price periods ago (momentum filter)
KeltnerStochastic > threshold (overbought within channel)
Exit Conditions:
Exit long positions when KeltnerStochastic > threshold
Exit short positions when KeltnerStochastic < threshold
This methodology aligns with research by Brock et al. (1992) on the effectiveness of trading range breakouts with confirmation filters.
3.2 Risk Management
Stop-loss mechanisms are implemented using fixed price movements (1185 index points), providing definitive risk boundaries per trade. This approach is consistent with findings by Sweeney (1988) that fixed stop-loss systems can enhance risk-adjusted returns when properly calibrated.
3.3 Dynamic Position Sizing
The strategy implements an equity-based position sizing algorithm that increases or decreases contract size based on cumulative performance:
$ContractSize = \min(baseContracts + \lfloor\frac{\max(profitLoss, 0)}{equityStep}\rfloor - \lfloor\frac{|\min(profitLoss, 0)|}{equityStep}\rfloor, maxContracts)$
This adaptive approach follows modern portfolio theory principles (Markowitz, 1952) and Kelly criterion concepts (Kelly, 1956), scaling exposure proportionally to account equity.
4. Empirical Performance Analysis
Using historical data across multiple market regimes, the strategy demonstrates several key performance characteristics:
Enhanced performance during trending markets with moderate volatility
Reduced drawdowns during choppy market conditions through the dual-filter approach
Optimal performance when the threshold parameter is calibrated to market-specific characteristics (Pardo, 2008)
5. Strategy Limitations and Future Research
While effective in many market conditions, this strategy faces challenges during:
Rapid volatility expansion events where stop-loss mechanisms may be inadequate
Prolonged sideways markets with insufficient momentum
Markets with structural changes in volatility profiles
Future research should explore:
Adaptive threshold parameters based on regime detection
Integration with additional confirmatory indicators
Machine learning approaches to optimize parameter selection across different market environments (Cavalcante et al., 2016)
References
Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. The Journal of Finance, 47(5), 1731-1764.
Cavalcante, R. C., Brasileiro, R. C., Souza, V. L., Nobrega, J. P., & Oliveira, A. L. (2016). Computational intelligence and financial markets: A survey and future directions. Expert Systems with Applications, 55, 194-211.
Chan, L. K. C., Jegadeesh, N., & Lakonishok, J. (2000). Momentum strategies. The Journal of Finance, 51(5), 1681-1713.
Jegadeesh, N., & Titman, S. (1993). Returns to buying winners and selling losers: Implications for stock market efficiency. The Journal of Finance, 48(1), 65-91.
Kaufman, P. J. (2013). Trading systems and methods (5th ed.). John Wiley & Sons.
Kelly, J. L. (1956). A new interpretation of information rate. The Bell System Technical Journal, 35(4), 917-926.
Keltner, C. W. (1960). How to make money in commodities. The Keltner Statistical Service.
Lane, G. C. (1984). Lane's stochastics. Technical Analysis of Stocks & Commodities, 2(3), 87-90.
Lo, A. W., Mamaysky, H., & Wang, J. (2000). Foundations of technical analysis: Computational algorithms, statistical inference, and empirical implementation. The Journal of Finance, 55(4), 1705-1765.
Markowitz, H. (1952). Portfolio selection. The Journal of Finance, 7(1), 77-91.
Moskowitz, T. J., Ooi, Y. H., & Pedersen, L. H. (2012). Time series momentum. Journal of Financial Economics, 104(2), 228-250.
Murphy, J. J. (1999). Technical analysis of the financial markets: A comprehensive guide to trading methods and applications. New York Institute of Finance.
Pardo, R. (2008). The evaluation and optimization of trading strategies (2nd ed.). John Wiley & Sons.
Raschke, L. B., & Connors, L. A. (1996). Street smarts: High probability short-term trading strategies. M. Gordon Publishing Group.
Sweeney, R. J. (1988). Some new filter rule tests: Methods and results. Journal of Financial and Quantitative Analysis, 23(3), 285-300.
Wilder, J. W. (1978). New concepts in technical trading systems. Trend Research.
Heikin Ashi Reversal AlertHeikin ashi reverseal bullish after three or more bearish heikin ashi candles
Really Key LevelsThis is an indicator showing (only) the most important trading levels. It works (at least) for US and European equities, and US futures.
It shows Regular Trading Hours (RTH) High/Low (today and yesterday), RTH open, pre-market (PM) H/L (today and yesterday), RTH close (yesterday and 2 days ago), with nice labels. By default, only the most important of these are enabled.
It indicates the bar associated with the value of a line starting at that bar, and updates dynamically. There is an option to extend the lines right and left. With futures, you can change the hours which are considered to be RTH. This affects the (PM) H/L time window over which these values are evaluated.