Return-to-Trend Wick Scalper — Full Control VersionReturn-to-Trend Wick Scalper — Modular Scalping Strategy for Gold (XAUUSD) & Indices
This is a precision-engineered scalping strategy designed primarily for high-volatility instruments such as Gold (XAUUSD), NASDAQ, and indices.
The system focuses on counter-trend pullbacks within the dominant daily trend, utilizing wick-based liquidity grabs (commonly referred to as “John Wick” candles) to identify high-probability return-to-trend opportunities.
Key Features:
✅ Dynamic Wick Reversal Detection: Detects reversal setups based on wick dominance and body ratio.
✅ Multiple Take Profit Levels: TP1, TP2, TP3 with individual enable/disable toggles and adjustable exit percentages.
✅ Time-Based Stop-Loss: Optional failsafe to close trades after exceeding a defined number of bars.
✅ VWAP Proximity Filter: Ensures entries happen near volume-weighted average price for precision.
✅ Pullback Depth Control: Filter for significant pullbacks using percentage of daily ATR.
✅ Dynamic Support & Resistance Validation: Confirms setups at key reactive levels.
✅ Volatility Filter: Avoids entries in overly volatile or dead market conditions.
✅ Aggressive Entry Mode: Optional early entry at pullback zones for faster fills.
✅ Paper Trading & Backtest Ready: Fully compatible with TradingView’s Paper Trading simulator.
Usage Notes:
Optimized for 5-minute chart entries.
Use in conjunction with Paper Trading for forward testing before live execution.
Can be connected to live brokers via alert webhooks and external bridges like PineConnector.
Instrument Focus:
Gold (XAUUSD) ✅
NASDAQ ✅
Dow Jones (US30) ✅
Other liquid indices ✅
Risk Note:
Always test thoroughly in Paper Trading before going live.
Optimize TP levels and filters according to market volatility conditions.
Designed for traders who want precision entries, flexibility in scaling out positions, and professional-grade risk control.
Indicadores e estratégias
Prop Firm Guard: Risk & Sizing Tracker by TFTProp Firm Guard: Risk & Sizing Tracker by TFT
Overview:
This script is designed to help prop firm traders stay within risk rules and avoid emotional overtrading. It tracks your max loss limits, daily loss rules, and gives real-time position sizing suggestions based on your account status.
This tool is especially helpful for newer traders navigating prop firm challenges and rules like trailing drawdowns and daily stopouts.
Key Features:
✅ Real-time tracking of max loss and daily loss limits
✅ Supports both Intraday and End-of-Day (EOD) drawdown styles
✅ Calculates remaining “distance” to max/daily loss levels
✅ Automatically locks max loss once it trails up to starting balance
✅ Provides smart, tier-based position sizing suggestions (5%–50%)
✅ Shows profit target progress and live daily P&L
Use Case Example:
Let’s say you’re trading a $50,000 prop account with a $2,000 max drawdown limit.
If you're using Intraday Drawdown:
• You start the day at $50,000.
• During the day, your balance grows to $51,000 (including unrealized profits).
• The drawdown logic will trail this intraday high — so your new max loss limit becomes $49,000 (51K - 2K).
• If your balance drops to $49,400, this tool will show you’re $400 away from breaching the limit.
• Sizing suggestions will adjust accordingly to keep you in a safe range.
If you're using End-of-Day (EOD) Drawdown:
• The same scenario (account grows to $51,000 intraday) won’t affect your max loss limit immediately.
• EOD drawdown is only updated based on your end-of-day closing balance.
• So even if you hit $51K intraday, your max loss limit still remains at $48,000 (50K - 2K) until the trading day closes and updates your best equity.
• This mode offers more flexibility during the day — and the tool reflects this in how it calculates distances and sizing.
📌 It will then suggest a conservative sizing range — maybe 5–10% of your allowed contract size — until you're safer again.
📌 Make sure you update your current balance after each trade and follow your risk settings.
Inputs Explained (with Tips):
• Overall Account Starting Balance: Your full prop account size (e.g., 50000 or 100000, 150000, 300000, so on)
• Day Start Balance: What your balance was when the trading day started
• Daily Max Loss: How much you’re allowed to lose in one day (used only for EOD drawdown)
• Daily Profit Target: Your goal for the day (e.g., 500 or 1000 or so on)
• Allowed Overall Drawdown: Usually 4% for prop firms — like 2000 on 50K, or 6000 on 300K
• Drawdown Mode:
→ Intraday: Includes floating/unrealized profits in drawdown logic
→ EOD: Uses only end-of-day equity for drawdown logic
• Best Day High: Your highest balance to date. If not above your starting balance, this is ignored
• Intraday High (Manual): Optional override if your peak balance isn’t same as equity (used only for intraday drawdown mode)
• Current Equity: Update this during the session to reflect your live balance — everything else updates automatically
What You’ll See on the Chart:
🟩 Equity Section: Start balance, current balance, intraday high, best day high
🟥 Risk Section:
• Max loss limit (based on trailing logic)
• Distance from current balance to that limit
• Daily loss limit and distance (EOD mode only)
🟦 Performance Metrics:
• Daily P&L in $ and %
• Progress to profit target (shows ✅ Accomplished when goal is hit)
📦 Sizing Suggestion:
Based on how close you are to a drawdown breach, and your total drawdown tier.
Ranges from ⚠️ 5–10% to ✅ 40–50% of your max allowed contract size.
Who It's Best For:
• Built and optimized for 50K prop firm accounts
• Works well with 100K, 150K, or even 300K — but the sizing logic is most precise at 50K
• Best suited for futures or forex prop firm traders using account challenge-style rules
Manual Input Required:
Due to TradingView limitations, we cannot read your actual trades or live balance.
You'll need to update the Current Equity field yourself — but the rest is auto-calculated from there.
Most inputs (like overall balance and drawdown) are set once and rarely changed.
Beta Notice:
This tool is currently in beta and under testing. It's free for now and designed to help the trading community — but accuracy may vary.
Please send feedback if you'd like to suggest improvements or report bugs.
Disclaimer:
This tool is for educational purposes only and does not provide trading advice or signal any trades.
Always trade according to your firm’s rules. The author is not responsible for losses resulting from use of this script.
Follow-Through Day (FTD) SignalThis plots up arrows beneath the price on days when a William O’Neil “Follow Through Day” (FTD) takes place. A FTD occurs when an index rallies 1.2% or more with volume greater than the prior day. The rally must also be three days or more from the recent low to ensure it is authentic buying vs. short covering.
Inputs:
• Min % Gain From Previous Close: Define the minimum gain required to qualify as a FTD
• Lookback Period: Define a market low. By default, the indicator uses a 20-day low.
Day of Week and HTF Period SeparatorThis indicator displays vertical lines to separate each day of the week, along with optional 1H and 4H period separators. It also shows day-of-week labels (MON, TUE, etc.) at a specified hour for quick visual reference. Useful for intraday traders who want a clear view of daily and higher timeframe transitions.
Michael's EMA (Selectable TF) by Koenigsegg📌 Michael’s EMA (Selectable TF) by Koenigsegg
A multi-timeframe EMA crossover trend tool for clear market direction.
🔍 CORE LOGIC & PURPOSE
This indicator visualizes the trend based on two Exponential Moving Averages (EMAs) — fast and slow — from a user-defined timeframe.
Referencing a higher timeframe strengthens the trend signal and reduces the noise from short-term volatility.
Perfect for traders seeking cleaner entries and exits , especially those who get faked out by lower timeframe chop.
✅ KEY FEATURES
1. Multi-Timeframe EMA Calculation
- Fetches EMAs from any timeframe using `request.security()`.
- Selecting a higher timeframe makes signals more meaningful and decisive .
2. Customizable EMAs
- Small EMA (default: 12) and Big EMA (default: 21).
- Clear logic:
- Uptrend = Small EMA ≥ Big EMA
- Downtrend = Small EMA < Big EMA
3. Dynamic Trend Coloring
- EMAs change color based on the trend:
- Uptrend: Green (customizable)
- Downtrend: Red (customizable)
4. Crossover Detection & Arrows
- Clean visual arrows on trend flips only.
- Optional visibility, customizable size & color.
- Built with a debounce mechanic to avoid spam signals.
5. Built-In Alerts
- Trend Up Alert when fast EMA crosses above slow EMA.
- Trend Down Alert when fast EMA crosses below slow EMA.
- Compatible with automation, bots, and manual strategies.
⚠️ PRO TIP
Using a higher timeframe (e.g., 1H on a 15m chart, or 15m on a 5m chart as visually represented on the chart) makes trend flips more decisive and reliable, helping you avoid being faked out by short-term volatility. When the higher TF flips red — that’s your true trend shift, not just noise.
🏷️ HASHTAGS
#EMA #MovingAverage #MultiTimeframe #TrendIndicator #TradingViewScript #TradingTools
#TechnicalAnalysis #PriceAction #ForexTrader #CryptoTrader #StockTrader
#AlgoTrading #TrendFlip #SmartMoney #SwingTrading #DayTrading #MarketStructure #TradingEdge #ProfMichaelG #Koenigsegg #Bitcoin
⚠️ DISCLAIMER
This script is provided for educational and informational purposes only .
It does not constitute financial advice , investment advice, or a recommendation to buy or sell any financial instruments.
Always do your own research and consult with a licensed financial advisor before making any trading decisions.
Use this tool at your own risk.
BONK/USD (1H) - $4k DCA + Dual Trailing + Date FilterThis strategy trades BONK/USD on the 1-hour chart, employing a Dollar-Cost Averaging (DCA) approach for long entries.
It initiates a Base Order when a faster Exponential Moving Average (EMA) crosses above a slower one (signaling a potential uptrend, default 9/21 EMA). If the price declines after entry, it can automatically place up to two additional Safety Orders at predetermined lower levels, calculated using either Average True Range (ATR) volatility or fixed percentage drops.
Exits are triggered by a trend reversal (EMA crossunder) or a dual trailing stop-loss mechanism, which includes both a standard trail and a tighter profit-locking trail activated after reaching a certain profit target.
The strategy includes user-configurable inputs for all key parameters (EMAs, order sizes, trailing stops, SO spacing) and an optional date filter to limit backtesting or execution to a specific period. It also generates alerts formatted for potential automation with platforms like 3Commas.
VWAP SlicesVWAP Slices – Period-Based VWAP Insights
VWAP Slices is a powerful visualization tool designed to help traders analyze price action relative to volume-weighted average price (VWAP) across up to three custom time periods. Whether you're tracking earnings windows, accumulation phases, or seasonal market behavior, this tool slices your chart into meaningful segments for data-driven decision-making.
What It Does
Calculates VWAP for up to 3 user-defined time periods.
Displays data visually using either a floating label, a table, or both.
Highlights the selected periods on your chart with customizable colors and transparency.
Summarizes each slice with:
VWAP
Total volume (in millions)
Number of bars in the range
Combines all active periods to provide a weighted VWAP summary.
Key Features
Flexible Time Slices: Define start and end timestamps for each of the 3 periods.
Custom Visuals: Choose individual colors and transparency levels for each period.
Dynamic Labeling: Place summary labels at a fixed vertical position relative to price.
Table Output: View period-by-period metrics in a compact, position-adjustable table.
Smart Aggregation: Combined VWAP is volume-weighted across enabled slices.
Settings Overview
Period Settings: Enable or disable each period with independent start and end times.
Visualization Style: Choose between "Label", "Table", or "Both".
Label Positioning: Adjust vertical placement of labels for better chart readability.
Table Positioning: Choose from four corners of the chart to place the results table.
Use Cases
Compare pre- and post-event VWAP (e.g., earnings, news drops).
Analyze accumulation or distribution over specific historical ranges.
Evaluate seasonal or monthly patterns using VWAP anchoring.
analyzPian### Description of the Script: **AnalyzPian Indicator**
The **AnalyzPian** indicator is a TradingView Pine Script designed to identify and visualize bullish and bearish price swings, breakouts, and retests on a chart. It uses pivot points (highs and lows) to detect significant price movements and overlays boxes and labels to highlight these areas for traders. Below is a detailed breakdown of its functionality and features:
---
### **Key Features**
1. **Dual Swing Detection**:
- The script identifies both **bullish** and **bearish** swings using pivot points (`ta.pivothigh` and `ta.pivotlow`).
- These swings are used to define potential breakout zones.
2. **Breakout and Retest Zones**:
- Once a swing is detected, the script creates a box around the price level to represent the **potential breakout zone**.
- If the price breaks out of the box, it transitions into a **retest phase**, where the script looks for retests of the breakout level.
3. **Customizable Display Options**:
- Users can choose to display **Bullish**, **Bearish**, or both types of swings.
- Additional options allow filtering for **last retest only** or showing **all retests** with labels.
4. **Dynamic Box Adjustments**:
- Boxes dynamically adjust their width based on user-defined parameters (`maxBars`, `minBars`).
- If the right side of the box exceeds the maximum allowed bars without a signal, the box is either deleted or reset to the last retest position.
5. **Labeling System**:
- Labels are added to indicate **breakouts** (▲ or ▼) and **retests** (▽ or △).
- Labels are styled differently for bullish and bearish signals and can be customized in terms of color and size.
6. **State Management**:
- The script uses a state machine (`state`) to track the lifecycle of each swing:
- **State 0**: Initial state, waiting for a swing detection.
- **State 1**: Swing detected, breakout zone created.
- **State 2**: Breakout confirmed, retest zone active.
7. **ATR-Based Width**:
- The width of the boxes is calculated using the **Average True Range (ATR)**, ensuring that the zones adapt to market volatility.
8. **User Inputs**:
- Extensive customization options are provided through input parameters:
- **Display Options**: Choose between bullish, bearish, or both.
- **Box Width**: Adjust the multiplier for ATR-based width.
- **Maximum Bars**: Set the maximum number of bars without a signal before resetting.
- **Minimum Bars**: Define the minimum distance between labels.
- **Set Back Option**: Reset the box to the last retest position if the right side is too far.
9. **Visual Enhancements**:
- Boxes and labels are styled with customizable colors and transparency for better visualization.
- Labels use intuitive symbols (▲, ▼, ▽, △) to clearly indicate the type of signal.
---
### **How It Works**
1. **Swing Detection**:
- The script uses `ta.pivothigh` and `ta.pivotlow` to identify significant highs and lows based on user-defined left and right lookback periods.
- These pivots serve as the foundation for creating breakout and retest zones.
2. **Box Creation**:
- When a swing is detected, a box is drawn around the price level to represent the breakout zone.
- The box's height is determined by the ATR, and its width expands dynamically as new bars are added.
3. **Breakout Confirmation**:
- If the price moves outside the box (breakout), the script transitions to the next state and creates a new box for the retest phase.
- Labels are added to mark the breakout point.
4. **Retest Detection**:
- During the retest phase, the script monitors whether the price revisits the breakout level.
- If a retest occurs, a label is added to indicate the event.
5. **Reset Mechanism**:
- If no signal is detected within the maximum allowed bars, the box is either deleted or reset to the last retest position.
---
### **Use Cases**
1. **Trend Identification**:
- Traders can use the indicator to identify bullish and bearish trends by observing the direction of breakouts and retests.
2. **Entry and Exit Points**:
- Breakout zones can serve as potential entry points, while retests provide confirmation for trades.
3. **Risk Management**:
- The boxes help visualize key support and resistance levels, aiding in stop-loss placement and risk assessment.
4. **Market Analysis**:
- The dynamic nature of the indicator makes it suitable for analyzing both trending and ranging markets.
---
### **Code Structure**
1. **Settings Section**:
- Contains user-defined inputs for customizing the behavior and appearance of the indicator.
2. **UDT (User-Defined Type)**:
- Defines a `bin` type to store information about each swing, including its state, price level, and associated labels.
3. **Methods**:
- Includes helper functions for managing labels, checking conditions, and updating states.
4. **Execution Logic**:
- Implements the core logic for detecting swings, managing states, and drawing boxes and labels.
---
### **Conclusion**
The **AnalyzPian** indicator is a powerful tool for traders who want to visually analyze price swings, breakouts, and retests. Its flexibility, combined with its intuitive design, makes it suitable for a wide range of trading strategies. By leveraging pivot points and ATR-based zones, the script provides actionable insights into market dynamics while maintaining a clean and customizable interface.
changeReturns a simple "close vs close" value for whichever interval is specified. i.e. on a weekly chart, it would be week-over-week change.
Batman - Supertrend with MA + SL/TP + Dynamic Profit %This Pine Script is a complete strategy script for TradingView named "Batman - Supertrend with MA + SL/TP + Dynamic Profit %". It's designed to help traders visually and programmatically:
Identify buy/sell signals using a Supertrend indicator
Confirm trend direction using a customizable moving average (MA)
Automatically manage trades with Stop Loss (SL) and three Take Profit (TP) levels
Track dynamic profit % from entry
Generate alerts for signal and TP hits
Visualize trade levels and conditions directly on the chart
Indicators Used:
Supertrend: Primary signal generator.
Moving Average: Used to confirm or visualize trend strength.
🎯 Signal Logic:
Buy Signal: When price crosses above the Supertrend line.
Sell Signal: When price crosses below the Supertrend line.
🔁 Entry Execution:
Long or short orders are placed based on crossover/crossunder signals.
The entry price is saved to track profits and SL/TP levels.
💰 Profit Tracking:
Calculates and displays real-time dynamic profit % of the current open trade.
A floating label shows this near the candle high.
🛡️ Risk Management:
Automatically plots:
Stop Loss line
TP1, TP2, TP3 levels
Separate lines for long and short positions.
🚨 Alerts:
Alert conditions for:
Buy/Sell signals
Hitting any of the 3 Take Profit targets (both long and short)
Hope it helps!
Market Structure - HH, HL, LH, LL with Trendlines & AlertsMarket Structure Script – HH, HL, LH, LL with Trendlines & Alerts
This Pine Script is designed to help identify key market structure patterns such as Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), and Lower Lows (LL) on price charts. It also draws trendlines connecting the respective swing points and provides alerts when these important price patterns occur.
Key Features:
Swing High and Low Detection:
The script uses the ta.pivothigh and ta.pivotlow functions to identify significant swing highs and swing lows based on the pivot length (pivotLen). These points mark local peaks and troughs in the price action.
Dynamic Pivot Length:
The script adjusts the pivotLen (which defines the number of bars used to calculate swing points) based on the current timeframe of the chart. For example, for a 15-minute chart, it uses a pivot length of 5 bars, while for a daily chart, it uses 10 bars. This dynamic adjustment ensures that the script works across different timeframes.
Higher Highs (HH), Higher Lows (HL), Lower Highs (LH), Lower Lows (LL):
Higher High (HH): Identifies a price peak that is higher than the previous swing high, indicating an uptrend.
Higher Low (HL): Identifies a price trough that is higher than the previous swing low, supporting the idea of an ongoing uptrend.
Lower High (LH): Identifies a price peak that is lower than the previous swing high, suggesting a potential reversal or downtrend.
Lower Low (LL): Identifies a price trough that is lower than the previous swing low, indicating a downtrend.
Trendlines:
For each identified Higher High, Higher Low, Lower High, or Lower Low, the script automatically draws a trendline connecting the corresponding swing points. These trendlines provide a visual representation of the market’s price structure, showing support and resistance levels.
Labels:
The script places labels on the chart next to the respective swing points. These labels mark whether the point is a Higher High (HH), Higher Low (HL), Lower High (LH), or Lower Low (LL). This helps traders easily visualize the price pattern at a glance.
Alerts:
Alert conditions are set for when a Higher High (HH), Higher Low (HL), Lower High (LH), or Lower Low (LL) is detected. Users can set up alerts to be notified whenever one of these key market structure patterns forms. Alerts are an essential feature for traders who want to act quickly when important trend changes are happening.
Stochastic Overlay - Regression Channel (Zeiierman)█ Overview
The Stochastic Overlay – Regression Channel (Zeiierman) is a next-generation visualization tool that transforms the traditional Stochastic Oscillator into a dynamic price-based overlay.
Instead of leaving momentum trapped in a lower subwindow, this indicator projects the Stochastic oscialltor directly onto price itself — allowing traders to visually interpret momentum, overbought/oversold conditions, and market strength without ever taking their eyes off price action.
⚪ In simple terms:
▸ The Bands = The Stochastic Oscillator — but on price.
▸ The Midline = Stochastic 50 level
▸ Upper Band = Stochastic Overbought Threshold
▸ Lower Band = Stochastic Oversold Threshold
When the price moves above the midline → it’s the same as the oscillator moving above 50
When the price breaks above the upper band → it’s the same as Stochastic entering overbought.
When the price reaches the lower band →, think of it like Stochastic being oversold.
This makes market conditions visually intuitive. You’re literally watching the oscillator live on the price chart.
█ How It Works
The indicator layers 3 distinct technical elements into one clean view:
⚪ Stochastic Momentum Engine
Tracks overbought/oversold conditions and directional strength using:
%K Line → Momentum of price
%D Line → Smoothing filter of %K
Overbought/Oversold Bands → Highlight potential reversal zones
⚪ Volatility Adaptive Bands
Dynamic bands plotted above and below price using:
ATR * Stochastic Scaling → Creates wider bands during volatile periods & tighter bands in calm conditions
Basis → Moving average centerline (EMA, SMA, WMA, HMA, RMA selectable)
This means:
→ In strong trends: Bands expand
→ In consolidations: Bands contract
⚪ Regression Channel
Projects trend direction with different models:
Logarithmic → Captures non-linear growth (perfect for crypto or exponential stocks)
Linear → Classic regression fit
Adaptive → Dynamically adjusts sensitivity
Leading → Projects trend further ahead (aggressive mode)
Channels include:
Midline → Fair value trend
Upper/Lower Bounds → Deviation-based support/resistance
⚪ Heatmap - Bull & Bear Power Strength
Visual heatmeter showing:
% dominance of bulls vs bears (based on close > or < Band Basis)
Automatic normalization regardless of timeframe
Table display on-chart for quick visual insight
Dynamic highlighting when extreme levels are reached
⚪ Trend Candlestick Coloring
Bars auto-color based on trend filter:
Above Basis → Bullish Color
Below Basis → Bearish Color
█ How to Use
⚪ Trend Trading
→ Use Band direction + Regression Channel to identify trend alignment
→ Longs favored when price holds above the Basis
→ Shorts favored when price stays below the Basis
→ Use the Bull & Bear heatmap to asses if the bulls or the bears are in control.
⚪ Mean Reversion
→ Look for price to interact with Upper or Lower Band extremes
→ Stochastic reaching OB/OS zones further supports reversals
⚪ Momentum Confirmation
→ Crossovers between %K and %D can confirm continuation or divergence signals
→ Especially powerful when happening at band boundaries
⚪ Strength Heatmap
→ Quickly visualize current buyer vs seller control
→ Sharp spikes in Bull Power = Aggressive buying
→ Sharp spikes in Bear Power = Heavy selling pressure
█ Why It Useful
This is not a typical Stochastic or regression tool. The tool is designed for traders who want to:
React dynamically to price volatility
Map momentum into volatility context
Use adaptive regression channels across trend styles
Visualize bull vs bear power in real-time
Follow trends with built-in reversal logic
█ Settings
Stochastic Settings
Stochastic Length → Period of calculation. Higher = smoother, Lower = faster signals.
%K Smoothing → Smooths the Stochastic line itself.
%D Smoothing → Smooths the moving average of %K for slower signals.
Stochastic Band
Band Length → Length of the Moving Average Basis.
Volatility Multiplier → Controls band width via ATR scaling.
Band Type → Choose MA type (EMA, SMA, WMA, HMA, RMA).
Regression Channel
Regression Type → Logarithmic / Linear / Adaptive / Leading.
Regression Length → Number of bars for regression calculation.
Heatmap Settings
Heatmap Length → Number of bars to calculate bull/bear dominance.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
STH-MVRV Bollinger BandsSTH-MVRV Bollinger Bands
🛠️ Detailes
This proprietary indicator seamlessly integrates on-chain data with advanced volatility metrics to construct adaptive Bollinger Bands that overlay directly on the price chart. Here’s a breakdown of its technical components:
Data Integration:
On-chain & Index Data: Utilizes BTC_MVRV (on-chain metric) and INDEX:BTCUSD (market index) to compute the STH-MVRV ratio.
Smoothing: Data series are smoothed with a configurable SMA (Simple Moving Average) over a user-defined period to reduce noise.
Ratio Computation:
Forms: Calculates three ratio variants:
STH-MVRV (MVRV)
STH-MVRV (Price)
STH-MVRV (AVG)
Dynamic Selection: The user can select the desired ratio from a dropdown menu.
Bollinger Bands Construction:
Basis & Deviation:
The basis is derived using the SMA of the selected ratio (or price, if substituted).
The standard deviation is scaled by a multiplier to form the upper and lower bands.
🟢 Green: When the selected ratio is ≥ 1 (bullish condition).
🔴 Red: When the selected ratio is < 1 (bearish condition).
Usage Recommendations:
Parameter Tuning: Adjust the moving average period, band length, and standard deviation multiplier to tailor the indicator to specific market conditions.
Multi-Timeframe Analysis: Combine with other technical indicators for a comprehensive risk management and trade execution strategy.
Dskyz (DAFE) MAtrix with ATR-Powered Precision Dskyz (DAFE) MAtrix with ATR-Powered Precision
This cutting‐edge futures trading strategy built to thrive in rapidly changing market conditions. Developed for high-frequency futures trading on instruments such as the CME Mini MNQ, this strategy leverages a matrix of sophisticated moving averages combined with ATR-based filters to pinpoint high-probability entries and exits. Its unique combination of adaptable technical indicators and multi-timeframe trend filtering sets it apart from standard strategies, providing enhanced precision and dynamic responsiveness.
imgur.com
Core Functional Components
1. Advanced Moving Averages
A distinguishing feature of the DAFE strategy is its robust, multi-choice moving averages (MAs). Clients can choose from a wide array of MAs—each with specific strengths—in order to fine-tune their trading signals. The code includes user-defined functions for the following MAs:
imgur.com
Hull Moving Average (HMA):
The hma(src, len) function calculates the HMA by using weighted moving averages (WMAs) to reduce lag considerably while smoothing price data. This function computes an intermediate WMA of half the specified length, then a full-length WMA, and finally applies a further WMA over the square root of the length. This design allows for rapid adaptation to price changes without the typical delays of traditional moving averages.
Triple Exponential Moving Average (TEMA):
Implemented via tema(src, len), TEMA uses three consecutive exponential moving averages (EMAs) to effectively cancel out lag and capture price momentum. The final formula—3 * (ema1 - ema2) + ema3—produces a highly responsive indicator that filters out short-term noise.
Double Exponential Moving Average (DEMA):
Through the dema(src, len) function, DEMA calculates an EMA and then a second EMA on top of it. Its simplified formula of 2 * ema1 - ema2 provides a smoother curve than a single EMA while maintaining enhanced responsiveness.
Volume Weighted Moving Average (VWMA):
With vwma(src, len), this MA accounts for trading volume by weighting the price, thereby offering a more contextual picture of market activity. This is crucial when volume spikes indicate significant moves.
Zero Lag EMA (ZLEMA):
The zlema(src, len) function applies a correction to reduce the inherent lag found in EMAs. By subtracting a calculated lag (based on half the moving average window), ZLEMA is exceptionally attuned to recent price movements.
Arnaud Legoux Moving Average (ALMA):
The alma(src, len, offset, sigma) function introduces ALMA—a type of moving average designed to be less affected by outliers. With parameters for offset and sigma, it allows customization of the degree to which the MA reacts to market noise.
Kaufman Adaptive Moving Average (KAMA):
The custom kama(src, len) function is noteworthy for its adaptive nature. It computes an efficiency ratio by comparing price change against volatility, then dynamically adjusts its smoothing constant. This results in an MA that quickly responds during trending periods while remaining smoothed during consolidation.
Each of these functions—integrated into the strategy—is selectable by the trader (via the fastMAType and slowMAType inputs). This flexibility permits the tailored application of the MA most suited to current market dynamics and individual risk management preferences.
2. ATR-Based Filters and Risk Controls
ATR Calculation and Volatility Filter:
The strategy computes the Average True Range (ATR) over a user-defined period (atrPeriod). ATR is then used to derive both:
Volatility Assessment: Expressed as a ratio of ATR to closing price, ensuring that trades are taken only when volatility remains within a safe, predefined threshold (volatilityThreshold).
ATR-Based Entry Filters: Implemented as atrFilterLong and atrFilterShort, these conditions ensure that for long entries the price is sufficiently above the slow MA and vice versa for shorts. This acts as an additional confirmation filter.
Dynamic Exit Management:
The exit logic employs a dual approach:
Fixed Stop and Profit Target: Stops and targets are set at multiples of ATR (fixedStopMultiplier and profitTargetATRMult), helping manage risk in volatile markets.
Trailing Stop Adjustments: A trailing stop is calculated using the ATR multiplied by a user-defined offset (trailOffset), which captures additional profits as the trade moves favorably while protecting against reversals.
3. Multi-Timeframe Trend Filtering
The strategy enhances its signal reliability by leveraging a secondary, higher timeframe analysis:
15-Minute Trend Analysis:
By retrieving 15-minute moving averages (fastMA15m and slowMA15m) via request.security, the strategy determines the broader market trend. This secondary filter (enabled or disabled through useTrendFilter) ensures that entries are aligned with the prevailing market direction, thereby reducing the incidence of false signals.
4. Signal and Execution Logic
Combined MA Alignment:
The entry conditions are based primarily on the alignment of the fast and slow MAs. A long condition is triggered when the current price is above both MAs and the fast MA is above the slow MA—complemented by the ATR filter and volume conditions. The reverse applies for a short condition.
Volume and Time Window Validation:
Trades are permitted only if the current volume exceeds a minimum (minVolume) and the current hour falls within the predefined trading window (tradingStartHour to tradingEndHour). An additional volume spike check (comparing current volume to a moving average of past volumes) further filters for optimal market conditions.
Comprehensive Order Execution:
The strategy utilizes flexible order execution functions that allow pyramiding (up to 10 positions), ensuring that it can scale into positions as favorable conditions persist. The use of both market entries and automated exits (with profit targets, stop-losses, and trailing stops) ensures that risk is managed at every step.
5. Integrated Dashboard and Metrics
For transparency and real-time analysis, the strategy includes:
On-Chart Visualizations:
Both fast and slow MAs are plotted on the chart, making it easy to see the market’s technical foundation.
Dynamic Metrics Dashboard:
A built-in table displays crucial performance statistics—including current profit/loss, equity, ATR (both raw and as a percentage), and the percentage gap between the moving averages. These metrics offer immediate insight into the health and performance of the strategy.
Input Parameters: Detailed Breakdown
Every input is meticulously designed to offer granular control:
Fast & Slow Lengths:
Determine the window size for the fast and slow moving averages. Smaller values yield more sensitivity, while larger values provide a smoother, delayed response.
Fast/Slow MA Types:
Choose the type of moving average for fast and slow signals. The versatility—from basic SMA and EMA to more complex ones like HMA, TEMA, ZLEMA, ALMA, and KAMA—allows customization to fit different market scenarios.
ATR Parameters:
atrPeriod and atrMultiplier shape the volatility assessment, directly affecting entry filters and risk management through stop-loss and profit target levels.
Trend and Volume Filters:
Inputs such as useTrendFilter, minVolume, and the volume spike condition help confirm that a trade occurs in active, trending markets rather than during periods of low liquidity or market noise.
Trading Hours:
Restricting trade execution to specific hours (tradingStartHour and tradingEndHour) helps avoid illiquid or choppy markets outside of prime trading sessions.
Exit Strategies:
Parameters like trailOffset, profitTargetATRMult, and fixedStopMultiplier provide multiple layers of risk management and profit protection by tailoring how exits are generated relative to current market conditions.
Pyramiding and Fixed Trade Quantity:
The strategy supports multiple entries within a trend (up to 10 positions) and sets a predefined trade quantity (fixedQuantity) to maintain consistent exposure and risk per trade.
Dashboard Controls:
The resetDashboard input allows for on-the-fly resetting of performance metrics, keeping the strategy’s performance dashboard accurate and up-to-date.
Why This Strategy is Truly Exceptional
Multi-Faceted Adaptability:
The ability to switch seamlessly between various moving average types—each suited to particular market conditions—enables the strategy to adapt dynamically. This is a testament to the high level of coding sophistication and market insight infused within the system.
Robust Risk Management:
The integration of ATR-based stops, profit targets, and trailing stops ensures that every trade is executed with well-defined risk parameters. The system is designed to mitigate unexpected market swings while optimizing profit capture.
Comprehensive Market Filtering:
By combining moving average crossovers with volume analysis, volatility thresholds, and multi-timeframe trend filters, the strategy only enters trades under the most favorable conditions. This multi-layered filtering reduces noise and enhances signal quality.
-Final Thoughts-
The Dskyz Adaptive Futures Elite (DAFE) MAtrix with ATR-Powered Precision strategy is not just another trading algorithm—it is a multi-dimensional, fully customizable system built on advanced technical principles and sophisticated risk management techniques. Every function and input parameter has been carefully engineered to provide traders with a system that is both powerful and transparent.
For clients seeking a state-of-the-art trading solution that adapts dynamically to market conditions while maintaining strict discipline in risk management, this strategy truly stands in a class of its own.
****Please show support if you enjoyed this strategy. I'll have more coming out in the near future!!
-Dskyz
Caution
DAFE is experimental, not a profit guarantee. Futures trading risks significant losses due to leverage. Backtest, simulate, and monitor actively before live use. All trading decisions are your responsibility.
PBOC Balance Sheet (Approx USD Trillions)This indicator displays the People's Bank of China (PBOC) Balance Sheet in approximate USD trillions, converted from CNY data (ECONOMICS:CNCBBS) using a fixed exchange rate of 1 USD ≈ 7 CNY. The data is smoothed with a 3-month SMA and plotted as a black line in a separate pane, with a reference line at 6.0 USD trillions. Ideal for analyzing long-term macroeconomic trends and correlations with other financial metrics like bond yields or asset prices, it includes error handling for missing data to ensure reliable visualization.
Daily Performance HeatmapThis script displays a customizable daily performance heatmap for key assets across crypto, equities, bonds, commodities, currencies, and volatility indices.
Each cell shows the current price and the percent change since the daily open, color-coded using a gradient from negative to positive. Assets are arranged in a left-to-right, top-down grid, with adjustable layout and styling.
⚙️ Features:
🔢 Displays current price and daily % change
🎨 Color-coded heatmap using customizable gradients
🧱 Adjustable layout: number of columns, cell size, and text size
🧠 Smart price formatting (no decimals for BTC, Gold, etc.)
🪟 Clean alignment with padded spacing for UI clarity
🛠️ Future plans:
User-input asset lists and labels
Category grouping and dynamic sorting
Optional icons, tooltips, or alerts
Bollinger Bands Strategy Direction & VWAP This is an updated version of classic Bollinger bands. It adds the VWAP line for reference but does not include the bands usually associated with that. It also allows for the turning on and off of longs or shorts, and limiting the duration of trades by the number of days with the default being set to 4(2 seems to be the optimal) I tested this against crypto currency perpetual markets and it consistently wins more than 60 percent of the trades against the majors ( BTC, ETH, SOL) but doesn't seems to do well against some small cap Alts. Id love to hear your feedback
Combined Zone Invalidationa script that gets bullish state if price closes above the zone top
a script that gets bearish state if price closes below the zone bottom
a script that is invalid if it goes from bullish to bearish or bearish to bullish, without reaching the next zone bottom for bullish cross and next (below ) zone top for bearish cross.
currently not able to
1. properly impliment zone invalidation
2. think I'm messing up bullish and bearish target hits as well trying multiple ways to do the invalidation
StonkGame Major Market Open/ClosePlots vertical lines for Tokyo, London, and New York session opens and closes — auto-adjusted to your chart's timezone.
Open lines = lighter, dashed style.
Close lines = solid, full-color style.
Helps identify key liquidity windows, session-driven volatility, and clean market structure — without chart clutter.
Fully customizable colors and line styles for a professional, minimal look.
China 10-Year Yield Inverted with Time Lead (Months)The "China 10-Year Yield Inverted with Time Lead (Months)" indicator is a Pine Script tool for TradingView that displays the inverted China 10-Year Government Bond Yield (sourced from TVC:CN10Y) with a user-defined time lead or lag in months. The yield is inverted by multiplying it by -1, making a rising yield appear as a downward movement and vice versa, which helps visualize inverse correlations with other assets. Users can input the number of months to shift the yield forward (lead) or backward (lag), with the shift calculated based on the chart’s timeframe (e.g., 20 bars per month on daily charts). The indicator plots the shifted, inverted yield as a blue line in a separate pane, with a zero line for reference, enabling traders to analyze leading or lagging relationships with other financial data, such as the PBOC Balance Sheet or Bitcoin price.
Combined Breakout and Divergence SignalsCombined Breakout and Divergence Signals
🧠 Description:
This strategy combines price breakout logic with multi-indicator divergence detection, creating a powerful dual-filtered trading system that identifies high-probability entries. It’s designed to reduce false signals by only acting when both price action confirms a breakout and momentum-based divergence confirms a likely reversal or continuation.
⚙️ Core Logic:
The strategy executes trades only when a breakout is supported by recent divergences detected across a wide set of oscillators and momentum indicators. This dual-layer filtering helps eliminate noise and improves signal quality in trending and ranging markets.
🧩 Strategy Components:
🔺 Breakout Detection:
Identifies bullish breakouts when price exceeds previous high levels from bearish candles.
Detects bearish breakouts when price drops below low levels from bullish candles.
Optional First Arrow Only feature prevents repetitive entries during strong trends.
📉 Divergence Engine:
Scans for both Regular and Hidden divergences.
Supports 10 indicators: MACD, MACD Histogram, RSI, Stochastic, CCI, Momentum, OBV, VWmacd, CMF, MFI.
Flexible input options to customize divergence types, pivot length, max bars, and confirmation logic.
🔗 Combined Logic:
Trades are executed only when a breakout is confirmed by a recent divergence (within a customizable lookback window).
Supports both long and short entries with automatic position closing upon reverse signals.
✅ Features:
📊 10 Momentum & Volume Indicators for divergence confirmation.
🧮 Customizable Pivot Parameters and Divergence Types.
🧠 Adaptive Breakout Filter with trend direction memory.
🎯 Visual markers for Combined Buy/Sell Signals on chart.
🔁 Logical exit rules: trades are only closed upon an opposing signal.
🛠️ Inputs:
Breakout Settings: ATR period, max bars back, first arrow toggle.
Divergence Settings: Pivot period, type, source (Close / High-Low), min divergences required, confirmation toggle.
Indicator Toggles: Enable or disable any divergence indicator individually.
Lookback Control: Number of bars within which divergence must occur to be valid.
Signal Visualization: Custom colors for combined buy/sell arrows.
🎯 Use Cases:
Trend Traders can filter out false breakouts.
Mean Reversion Traders get entry signals backed by weakening momentum.
System Developers can test different indicator combos or divergence types.
🔒 Best Practices:
Use higher timeframes (e.g., 1H, 4H, Daily) for more reliable divergence signals.
Combine with risk management tools (e.g., stop loss, trailing SL) via external script if desired.
Analyze past signals via Strategy Tester to refine breakout/divergence synergy.
🧰 Suggestions for Optimization:
Fine-tune showlimit to balance signal quality vs. quantity.
Disable unused indicators to speed up performance.
Adjust combinedLookback to prevent stale divergences from triggering entries.
📌 This EA is a smart fusion of trend breakout logic and momentum-based divergences, offering a refined signal mechanism with adjustable precision for professional and systematic traders.
Relative Strength MatrixThe Relative Strength Matrix (RSPS M) is a powerful comparison tool that analyzes and ranks up to 10 selected assets based on their relative performance. It does this by calculating price ratios between all asset pairs and applying a consistent strength criterion across each comparison. The results are displayed in a live-updating matrix, showing how each asset performs relative to the rest of the group.
By default, the indicator uses a momentum-based approach (via RSI) to evaluate strength, but it’s fully customizable. Users can modify the valuation logic by replacing the built-in ta.rsi function under the “Inputs your criterion below” section in the code. This makes the tool highly flexible—allowing for different styles of comparison such as trend-following, volatility-adjusted, or custom factor-based ranking methods.
Each asset’s total dominance score is color-coded and ranked, making it easy to spot outperformers and underperformers within any chosen basket. Whether you're tracking crypto pairs, sectors, or other groups, RSPS M provides a clear, objective framework for relative strength monitoring and rotation strategies—perfect for spotting leaders, laggards, and shifts in momentum across markets.
ICT MACRO MAX RETRI ( ALERT )🖤 ICT Reversal Detector – Minimalist Edition
This indicator is designed for traders who follow Inner Circle Trader (ICT) concepts, particularly focused on liquidity sweeps and displacement reversals.
It detects:
• Swing Highs & Lows that occur during the most reactive windows of each hour
→ Specifically the last 20 minutes and first 15 minutes
(ICT teaches these moments often reveal macro-level reversals. I’ve expanded the window slightly to give the indicator more room to catch valid setups.)
• Liquidity Sweeps of previous highs/lows
• Displacement (State Change): defined as a manipulation wick followed by 1–3 strong candles closing in the opposite direction
Visually:
• Clean black lines pointing right from the liquidity sweep wick
• White triangle markers inside black label boxes only when valid displacement occurs
• No clutter, no unnecessary shapes — just focused signal
Built for:
• 5-minute charts, especially NASDAQ (NAS100) and S&P 500 (SPX500)
• Confirm setups manually on the 15-minute chart for extra precision
This is a partial automation tool for ICT-style reversal traders who prefer clarity, minimalism, and sharp intuition over noise.
Let it alert you to setups — then decide like a sniper.
NFCI National Financial Conditions IndexNFCI National Financial Conditions Index
This indicator plots the NFCI as an indicator below your chart. You have the option to select the NFCI as well as its subcomponents.