Volume in Candle (Buy/Sell) - Clean & Spaced LabelsThis indicator shows per-candle buy and sell volume estimates, labeled directly on the chart and dynamically positioned to follow the price. It is ideal for traders who want to visually understand the volume balance inside each bar.
✅ Key Features:
🔁 Live updating labels for the current and previous candle only
📉 Labels are tied to the candle’s low price and move with chart scrolling
🧠 Smart spacing: labels are vertically separated so they never overlap
📦 Buy/Sell volume is estimated using candle body and total volume:
Buy Volume (B): Approximated bullish pressure
Sell Volume (S): Approximated bearish pressure
🛠 How it Works:
Volume is split using the candle's close vs open position relative to the total range.
Only two labels are shown at a time: the most recent bar and the one before it.
Labels are displayed below the candles, using a dynamic offset that auto-scales with candle size.
🧪 Use Case:
Spot volume pressure shifts in real time
Combine with price action to detect buy/sell imbalances
Use alongside trend tools or confirmation indicators
🔧 This script is lightweight, non-intrusive, and optimized for clarity.
📍 Best used on 1–15 minute charts, or any timeframe where candle volume analysis is helpful.
Volatilite
Session Volume Breakout by aDiLHow to Use the Combined Session Breakout?
Session Breakout indicator is designed to assist traders in identifying key breakout levels and Fibonacci retracement levels during the London and New York trading sessions. It plots the session high, session low, and the 50% Fibonacci retracement level for each session directly on your TradingView chart. This tool is particularly useful for breakout trading strategies or for spotting potential support and resistance zones.
Recommended: Use PepperStone Chart for Perfect Use
What the Indicator Does
Session Breakout Levels: The indicator calculates the highest high (session high) and lowest low (session low) during the specified London and New York breakout sessions.
Fibonacci 50% Retracement: For each session, it computes the 50% retracement level between the session high and low, a level often considered significant by traders for potential reversals or consolidations.
Visual Representation: The session high, low, and 50% Fib levels are displayed as horizontal lines on the chart. Additionally, tiny labels mark the "High" and "Low" levels at the start of each session for quick reference.
BTC D-CollectorBTC D-Collector — Daily BTC Macro Distribution & Profit-Taking Signal System
Overview
BTC D-Collector is a purpose-built macro-level distribution detection and profit-taking tool designed for Bitcoin traders operating on daily charts. Its primary objective is to identify high-probability conditions for partial or full exits during extended uptrends, combining on-chain market metrics, long-term moving averages, and multi-layer momentum exhaustion filters. This approach helps traders time distributions in mature bull cycles while avoiding premature selling.
What It Does
BTC D-Collector analyzes Bitcoin price action and key metrics across four core dimensions:
1. On-Chain Market Valuation
Integrates external data feeds such as realized market capitalization and aggregate trading volume to compute derived valuation bands. These valuations highlight historically stretched price conditions relative to fundamental usage.
2. Long-Term Momentum & Trend Exhaustion using MACD, StochRSI, RSI and EMAs
Calculates multiple time-adaptive moving averages and dynamic oscillator signals to detect overbought conditions. These moving averages adjust their lengths automatically based on timeframe granularity, ensuring alignment with daily chart structures.
3. NUPL-Based Profitability Framework
Incorporates a normalized measure of unrealized profit and loss (NUPL) to estimate whether aggregate holders are in extreme profit territory, signaling increased risk of distribution phases.
4. Progressive Profit-Taking Logic
Includes a structured mechanism for incremental scaling out of positions. As price multiplies from the most recent significant low, a sequence of partial sell signals is triggered to lock in gains methodically.
How It Works
A signal requires a specific combination of confirmations:
1. Market Restart Signal
When the tool detects renewed bullish conditions (e.g., recovery in the long-term moving average structure), the system resets all partial sell counters and reinitializes the entry baseline.
2. Math AI Distribution Signal
Triggers when a crossover of adaptive moving averages suggests a macro distribution phase is initiating.
3. SELL Signal, Solid Distribution Signal
Activated if multiple conditions converge: high on-chain profitability readings, stretched valuation metrics, sustained overbought oscillator levels, and price trading above all major long-term moving averages.
4. Orange and/or Red Arrow, Risky Distribution Signal
A more aggressive early exit indication, appearing when the market is overextended but some filters are less aligned. These signals are optional and meant for conservative profit-taking.
5. SELL Signal with X on it, Step Distribution Sequence
As price increases by predefined multiples relative to the last confirmed entry, the indicator issues progressive scale-out labels, marking partial profit-taking levels at each multiple.
When any of these signals are confirmed, visual labels are plotted on the chart, and alerts are generated. The system remains inactive if conditions do not meet strict alignment criteria.
How To Use It
1. Confirm Context
Always review higher timeframe charts (weekly, monthly) to assess where Bitcoin is in its broader market cycle. BTC D-Collector is optimized for mature uptrend distribution, not for identifying bottoms.
2. Act According to Signal Type
-- Math AI & Solid Distribution Signals: Consider partial or full profit-taking.
-- Risky Distribution Signals: Optional early profit locks for cautious traders.
-- Step Distribution Labels: Use as incremental exit points to scale out positions progressively as price advances.
3. Integrate With Your Strategy
Combine this indicator’s outputs with your trading system’s risk management rules. Define position sizing and exit criteria in advance.
Why It Is Unique
1. On-Chain + Technical Alignment
Blends on-chain market cap valuation, profitability metrics, and classical price action—rarely combined in a single TradingView tool.
2. Adaptive Time-Based Logic
Moving averages and calculations dynamically adjust to the chart timeframe for consistent sensitivity across historical and current data.
3. Structured Profit-Taking Sequences
Provides a disciplined approach to gradually reduce exposure as price accelerates, avoiding emotional exits.
4. BTC Daily Focus
Optimized exclusively for BTC/USD and BTC/USDT pairs on daily charts, ensuring clarity and relevance for macro cycle traders.
Apply Risk Management
This indicator is not a standalone trading system. Always combine signals with a comprehensive trading plan, position sizing rules, and stop-loss management. Carefully evaluate whether each alert fits your risk tolerance and portfolio objectives.
Timeframe Selection
Designed exclusively for daily charts. Use on other timeframes is not recommended and may yield invalid signals.
Best Suited For
Swing traders, position traders, and long-term BTC investors looking for structured tools to guide profit-taking during sustained bull markets.
Important Notes
Signals generated by BTC D-Collector are intended to assist trading decisions and do not constitute investment advice. Past performance does not guarantee future results. Always conduct your own analysis and apply prudent risk management.
License
This indicator was developed by the ProphetAlgoAI team. Use is subject to a private, invite-only TradingView license. Redistribution or use outside TradingView is strictly prohibited without explicit permission.
New London Breakout StructureThe London Breakout Structure Pro is a fully mechanical trading indicator designed to capture high-probability breakout moves during the London session. It automatically identifies valid trade setups based on time-defined zones, price structure, and breakout confirmation. With a built-in risk-reward ratio of 1:2 and session filters, it helps traders maintain consistency and discipline. Ideal for intraday traders looking to systematize their strategy during the most volatile hours of the Forex market.
Volatility & Market Regimes [AlgoXcalibur]Analyze Market Conditions Like a Pro.
Volatility & Market Regimes is a specialized, institution-inspired indicator designed to help traders instantly identify the current conditions of the market with clarity and confidence.
By combining a real-time Volatility Histogram and Strength Line with a compact Regime Table, this tool reveals four essential market dimensions—Volatility, Strength, Participation, and Noise—in a clean and intuitive format. Whether you’re confirming trade setups or managing risk, knowing the current regimes enhances awareness across all assets and timeframes.
🧠 Algorithm Logic
This sophisticated tool continuously monitors four independent regimes, each reflecting a distinct dimension of market behavior:
• Volatility – Gauges how active or dormant the market is by comparing current price action movement to historical averages. A dynamic, color-gradient Volatility Histogram transitions from Low (ice blue/white) to Medium (green/yellow) to High (orange/red), giving you an immediate assessment of volatility and risk.
• Strength – Measures directional intensity by assessing trend momentum, pressure, and persistence. A color-gradient Strength Line ranges from weak (red) to strong (green), helping traders determine if directional strength is trending, weakening, or consolidating.
• Participation – Analyzes relative volume to assess the level of trader engagement. Higher volume indicates stronger participation and conviction, while low volume may signal uncertainty, fading momentum, or even liquidity traps.
• Noise – Evaluates structural stability by measuring how orderly or chaotic the price action is. High noise suggests choppy, unstable conditions, while low noise reflects clean, stable moves.
Each regime includes a High / Medium / Low classification and a color-coded directional arrow to indicate whether condition parameters are increasing or decreasing. Together, these components deliver real-time market context—helping you stay grounded in logic, not emotion.
⚙️ User-Selectable Features
Each component of the indicator—the Volatility Histogram, Strength Line, and Regime Table—can be independently made visible or hidden to match your preference. This flexibility allows you to display only the Regime Table and move it directly to your main chart, where it auto-positions to the center-right and integrates seamlessly with other AlgoXcalibur indicators that also use data tables for a cohesive and refined experience.
📊 Clarity, Not Guesswork
Volatility & Market Regimes is a unique, institution-inspired algorithm rarely seen in retail trading. Not only does it clearly display volatility—it translates complex market behavior into a clear context to reveal what’s happening behind the candles. By decoding core regimes in real-time, this tool transforms uncertainty into structured insight—empowering traders to act with clarity, not guesswork.
🔐 To get access or learn more, visit the Author’s Instructions section.
Mean Amplitude (300 candles)Displays the average candle amplitude (volatility) as % over a selected period. Useful for gauging market activity compression or expansion.
Volume & Distance IndicatorA comprehensive multi-metric indicator that combines volume analysis, volatility measurement, and momentum positioning to provide crucial trading insights in a clean, customizable table format.
📊 Key Metrics:
52WH (52-Week High Distance) - Shows percentage distance from 52-week high, helping identify momentum and potential reversal zones.
Vol Val (Volume Value) - Calculates current close × SMA of volume, providing dollar-weighted volume analysis for institutional activity insights.
ADR (Average Daily Range) - Measures average volatility using SMA of High/Low ratios, essential for position sizing and risk management.
⚙️ Features: • Customizable periods (20 or 50 days) for Volume and ADR calculations • Enable/disable individual metrics • Fully customizable colors for labels and values • Adjustable text size (Tiny/Small/Normal/Large) • 9 table position options • Smart alert system with color-coded warnings
🚨 Alert System: • Red background when ADR < 3% (low volatility warning) • Red background when 52WH < -25% (oversold condition) • Customizable thresholds for personalized risk management
💡 Use Cases:
Identify low-volatility breakout setups
Monitor institutional volume participation
Track momentum relative to recent highs
Set position sizing based on volatility metrics
Settings are fully customizable - choose your preferred periods, colors, and alert levels. Perfect for swing traders, day traders, and investors who rely on volume and volatility analysis.
Works on all timeframes and asset classes.
This description highlights the indicator's professional features while explaining its practical trading applications for TradingView users.
ATR & SMA Info Table (v6)An indicator that displays ATR data with percentage change and moving average including stock name and time frame
MTF Order Flow DashboardThe MTF Order Flow Dashboard is a compact, real-time table overlay that provides an at-a-glance view of market structure across three key timeframes:
✅ 1-Minute
✅ 5-Minute
✅ 1-Hour
//If extra 1 min is added to candle closure countdown wait till next tick for correction//
This tool is designed to help traders quickly assess directional bias, detect structure shifts, and stay aware of upcoming candle closes — a powerful aid for scalping, day trading, or momentum-based strategies.
Pivot-Based Market Structure Detection
Uses user-defined pivot length to determine if the market is showing a Bullish, Bearish, or Neutral structure on each timeframe.
Color-Coded Structure
Easily visualize the current trend per timeframe:
🟢 Bullish | 🔴 Bearish | ⚪ Neutral
Live Candle Countdown Timers
Displays time remaining until the next candle close for each timeframe, using timenow for near real-time updates (as fast as ticks arrive).
Compact Table Display
Non-intrusive table displayed in the top-right of your chart with clean formatting for fast decision-making.
Built-in Alerts
Optional alerts when all timeframes align bullish or bearish, giving potential trade setup signals.
Inputs:
Select timeframes for structure analysis (1m, 5m, 1h)
Adjust pivot sensitivity with the Pivot Length input
Supertrend + QQE Signal on Flip OnlySupertrend + QQE Signal on Flip Only is a high-precision trend analysis tool that generates Buy and Sell signals only at key market reversals, not during noise, retracements, or mid-trend moves. It uses a volatility-based trend engine combined with a momentum confirmation filter based on the QQE (Quantitative Qualitative Estimation) framework.
Key Features:
Signals trigger only on confirmed trend shifts, minimizing false entries.
Built-in QQE filter confirms that the shift is supported by real momentum.
Visually clean directional lines and trend-based background fills for clarity.
Developed to avoid overlapping visuals and keep the chart readable at all scales.
Alerts included for automation and webhook integration.
Signal Logic:
Buy: When a new upward trend is confirmed and QQE momentum supports the move.
Sell: When a new downward trend is confirmed and QQE momentum supports the shift.
Recommended Use:
Ideal for traders who want clean directional signals without overfitting. Works well on 5–15 minute charts during active sessions (e.g., NY open), and pairs best with volume tools or key price levels for optimal trade confirmation.
Vela dominante con cruce de ema y zona horaria (Juan H.)Indicator Description: "Dominant Candle + EMA Cross + Time Zones"
This indicator was specifically designed for intraday trading on the EUR/USD pair, following a methodology based on price action, liquidity, and market structure.
🕒 Suggested Trading Hours (Argentina Time):
Early London Session: 3:00 AM to 6:00 AM
New York Session: 10:30 AM to 12:00 PM
📌 Trading Strategy:
Time Block: 3:00 AM – 6:00 AM:
Before entering any trade, I wait for the price to break the high or low of the Asian session, clearly marked on the chart by the lines extending from the Asia box.
If the Asian low is broken: I will only look for buy signals.
If the Asian high is broken: I will only look for sell signals.
I enter only on the first signal that appears after the break, always following the direction of the breakout.
Stop Loss Placement:
For buys: Below the last FVG (Fair Value Gap) that is located below the 11 and 21 EMAs.
For sells: Above the last FVG that is above the 11 and 21 EMAs.
Time Block: 10:30 AM – 12:00 PM:
The same logic applies, but in this case, I wait for a breakout of the London session’s high or low.
If the high or low of London has not been broken before 12:00 PM, I skip trading for that block.
🎯 Trade Management:
Minimum recommended Risk-Reward Ratio: 1:2
My personal approach: I target a 1:3 R:R, applying fractional profit-taking:
20% of the position at 1:1
40% at 1:2
40% at 1:3
I highly recommend each trader conduct their own backtesting to find the TP distribution that best suits their style.
📍 Signal Conditions:
Signals from this indicator won’t trigger under just any circumstances. They appear only when several quality filters are met:
The signal must occur outside a range-bound zone.
The signal requires a dominant (engulfing) candle that crosses the 21 EMA.
Usually, the same candle that generates the signal forms an FVG, making it easier to define a technical and logical Stop Loss level.
This approach aims to increase win probability by combining:
Price Action + Structure + Liquidity + Intraday Timing.
I hope this tool adds value to your trading!
Spartan Trading Swing High Low Mapper 1.0Spartan Trading Swing High Low Mapper 1.0
is a clean and structured framework designed to visualize swing highs and lows effectively. It assists traders in accurately identifying swing points, key Change of Character (CH) zones, and breakers. The tool also highlights "X" points and inducements within the major market structure, making it especially valuable for recognizing higher timeframe swings while analyzing lower timeframe charts.
Built for repeatability, the model enhances trader confidence by fostering familiarity rather than complexity.
This non-repainting tool is carefully engineered to mark completed market rotations, offering clarity without distortion. It provides flexibility across various assets and timeframes, allowing traders to customize their view while maintaining a consistent and reliable structure.
Swing high formation
For a swing high to form, the high of Candle 1 must break above the high of Candle 2,
and the low of Candle 2 must break below the low of Candle 3
Swing low formation
For a swing low to form, the low of Candle 1 must break below the low of Candle 2, and the high of Candle 2 must break above the high of Candle 3
Time frame alignment
This indicator will show higher time frame swing when you are in the lower time frame
for example if your are in 5min time frame it will auto plot 1h swing aswell it helps the traders when actually htf's are doing.
Monthly - daily
weekly-4h
daily -1h
4h-15m
1h-5min
15-1min
Terms and Conditions
Our charting tools are products provided for informational and educational purposes only and do not constitute financial, investment, or trading advice. Our charting tools are not designed to predict market movements or provide specific recommendations. Users should be aware that past performance is not indicative of future results and should not be relied upon for making financial decisions. By using our charting tools, the purchaser agrees that the seller and the creator are not responsible for any decisions made based on the information provided by these charting tools. The purchaser assumes full responsibility and liability for any actions taken and the consequences thereof, including any loss of money or investments that may occur as a result of using these products. Hence, by purchasing these charting tools, the customer accepts and acknowledges that the seller and the creator are not liable nor responsible for any unwanted outcome that arises from the development, the sale, or the use of these products. Finally, the purchaser indemnifies the seller from any and all liability. If the purchaser was invited through the Friends and Family Program, they acknowledge that the provided discount code only applies to the first initial purchase of the spartantradingacademy Premium Suite subscription. The purchaser is therefore responsible for cancelling – or requesting to cancel – their subscription in the event that they do not wish to continue using the product at full retail price. If the purchaser no longer wishes to use the products, they must unsubscribe from the membership service, if applicable. We hold no reimbursement, refund, or chargeback policy. Once these Terms and Conditions are accepted by the Customer, before purchase, no reimbursements, refunds or chargebacks will be provided under any circumstances.
By continuing to use these charting tools, the user acknowledges and agrees to the Terms and Conditions outlined in this legal disclaimer.
Price × Volume TableIt creates a table showing:
1- Daily Close × Daily Volume
2- Current Close × Current Volume
3- Close × Highest Volume (last 360 candles)
BERLOGA|PARTY Pump & Long DetectorThe indicator detects high pump signals and bottom long entries based on RSI, MACD, and volume. It also displays RSI, volume, MACD values, and percentage price change for the latest candle. (Индикатор определяет сигналы хай пампа и донные значения для лонга на основе RSI, MACD, объема, а также отображает показания RSI,Vol,MACD и изменение цены в % в последней свече.)
Avg daily rangeThe Average Daily Range (ADR) is a technical indicator that measures the average price movement of a financial instrument over a specific period.
Volume Change Price NATR Correlation BTC by vadimka77712Volume Change Price NATR Correlation BTC by vadimka77712
Daily/Weekly/Monthly Levels as per INDVIX By Biswaranjan_MDescription: This indicator dynamically draws Daily, Weekly, and Monthly range levels based on the INDIAVIX volatility index. It helps traders visualize potential price zones derived from market volatility and trend behavior.
Note: The indicator dynamically pulls the INDIAVIX value for the previous day and the previous day close of Index (Nifty 50/Bank Nifty/Sensex etc.), then calculates the daily/weekly/monthly ranges as per the user input and draws the levels on the chart as support and resistance.
Key Features:
1. INDIAVIX-Based Range Levels
Calculates projected range levels using the current or past INDIAVIX value, combined with the closing price of the stock or index.
2. Timeframe Flexibility
Choose to display Daily, Weekly, or Monthly levels — each derived from either:
- Today’s close and INDIAVIX, or
- Previous Week/Month close with the corresponding historical INDIAVIX value.
3. Historical Context Mode
Toggle historical mode to project how past levels would have looked using actual INDIAVIX values at the time.
Additional Tools:
* Day Open Line – Marks the opening price of the current trading day.
* Option to add 4 EMAs/SMAs – Moving average for trend following.
* VWAP – Volume-Weighted Average Price for intraday bias and mean reversion analysis.
* Open Range - This option plots the Open Range Box based on the first N minutes of the trading session (e.g., 15, 30, or 60 minutes) and automatically extends the range zone across the entire intraday session up to 3:30 PM.
It is designed for intraday traders, particularly those trading NSE stocks, F&O scripts, and index futures, but works globally on any market with regular intraday sessions.
This all-in-one tool gives you a volatility-informed structure for understanding intraday and positional market dynamics. Designed for any equity/index where INDIAVIX relevance applies.
Release Notes:
In this release, added an option to include a mid level between support and resistance levels.
This mid level option can be enabled or disables from indicators Input tab
Release Notes:
Just rounding down the IndiaVix number.
Release Notes:
Removed the Zero-Lag EMAs and added 4 Moving options to the indicator.
Release Notes:
Added ORB Range to this indicator
Release Notes:
Increased the support and resistance levels from maximum 5 to 10. No other changes to the indicator.
ADX & ATR Display (Table) - Percentage ATROverview:
The "ADX & ATR Display (Table)" is a custom Pine Script indicator designed to provide real-time insights into market trend strength and volatility directly on your chart, presented in a clean, non-intrusive table format. It combines two powerful technical analysis tools: the Average Directional Index (ADX) and the Average True Range (ATR), helping traders quickly grasp current market conditions.
Key Features:
Average Directional Index (ADX):
Purpose: ADX quantifies the strength of a trend, regardless of its direction (up or down). It helps identify if a market is trending strongly or if it's in a ranging (sideways) phase.
Calculation: It is derived from positive (+DI) and negative (-DI) directional indicators, which measure the strength of upward and downward price movements respectively. The indicator then smooths the absolute difference between +DI and -DI.
Interpretation:
ADX values below 25 generally suggest a weak or ranging market.
Values between 25 and 50 indicate the presence of a trending market.
Values above 50 signify a strong trend.
A rising ADX line indicates increasing trend strength, while a falling ADX suggests the trend is weakening.
Display: Your indicator displays the ADX value as a direct numerical score (e.g., 56.5).
Average True Range (ATR):
Purpose: ATR measures the volatility of a market, providing a clearer understanding of the typical price fluctuation over a given period.
Calculation: ATR considers the "true range," which is the largest of three measures: the current high minus the current low, the absolute value of the current high minus the previous close, or the absolute value of the current low minus the previous close. This true range is then averaged over a specified period.
Interpretation:
Higher ATR values indicate higher volatility, meaning prices are experiencing more dramatic movements.
Lower ATR values suggest lower volatility, indicating more stable price action.
Display: Your indicator uniquely displays the ATR value as a percentage (%) of the current closing price, making it easy to compare volatility across different assets or price levels (e.g., 3.97%). This normalized view is particularly useful for position sizing and risk management.
Indicator Display:
This indicator presents both the ADX and ATR values in a compact, customizable table located at the top center of your chart. This allows for a quick, at-a-glance overview of the current market's trend strength and volatility without cluttering the main price action with overlay lines or sub-panes.
Usage:
Traders can utilize this indicator to:
Identify strong trending markets (via ADX) suitable for trend-following strategies.
Recognize ranging or consolidating markets (via ADX) where breakout strategies might be more appropriate.
Gauge market volatility (via ATR) to adjust stop-loss and take-profit levels dynamically.
Compare volatility across different instruments by normalizing ATR to a percentage.
Inputs:
ADX Length: (Default: 14) Adjusts the period for the ADX calculation.
ATR Length: (Default: 14) Adjusts the period for the ATR calculation.
配對交易waynecoin製作2原始策略邏輯
只要zScore大於某個值(如2)就做空ETH做多BTC
只要zScore小於某個值(如-2)就做多ETH做空BTC
但這種方式有時訊號太多、容易假突破、勝率不穩定
優化邏輯目標
1. 降低訊號頻率,過濾掉沒意義的雜訊交易
2. 等到「明顯極端」再動手,讓每一單都更有「均值回歸」的機會
3. 進場後,避免被盤整來回洗掉,強制休息一段時間(冷卻期)再考慮下一單
1. 「極端區才做」:提高入場門檻
以前你設定zScore>2或<-2就進場,這個「門檻」容易被雜訊觸發。
優化方式:把門檻拉高(例如2.5或3),訊號只會在「非常極端」的狀態下才出現,減少亂進場。
2. 「回歸動能確認」:等它真的要回來再做
傳統做法常在zScore剛突破極端值時就馬上進場,結果價格還是繼續爆走,導致虧損。
優化方式:
先等zScore跑到極端區(>2.5或<-2.5),
等它「開始回頭」(例如:zScore從3往下跌,跌破2.5時才進場),
這樣能增加「回歸」動能,少做那種「突破後持續單邊爆走」的盤。
3. 「冷卻期」:強制休息、減少來回被巴
很多交易在平倉後,立刻又收到新訊號反向進場,容易被盤整來回磨。
優化方式:設一個「冷卻期」(例如15根K線),這段期間內不再產生新訊號,即使條件觸發也忽略,讓你有時間等下一波「真正有利的極端機會」。
主要變數說明
plotH:入場門檻(如2.5),zScore超過這個數才考慮進場。
cooldown:冷卻K線數,這段期間內無論有無訊號都不能再進新倉。
last_entry_bar:紀錄上次開倉的bar_index,用於計算冷卻期。
進場邏輯
如果zScore「向上」突破-plotH,並且目前不在冷卻期,則產生一個做多ETH/做空BTC訊號(標籤顯示)。
如果zScore「向下」突破plotH,且不在冷卻期,則產生做空ETH/做多BTC訊號。
每次有訊號進場後,都把last_entry_bar更新為當下K線的bar_index,進入冷卻期。
入場標準差原本設定2.5,但可自行設定峰值,數值設定越高,信號越少
冷卻k線數可以自己設定,當你設定的數值越高,信號越少
Look-Back Periodu也可以自己設定,數值越高回朔時間越長,信號越少
我一直在思考什麼樣的策略適合散戶交易
想了一年多只想到兩種交易
1.對沖策略只吃異常波動率
2.資金費率套利
當前先針對對沖策略來發佈
後續會繼續發表資費套利
**Original Strategy Logic**
As long as the zScore is greater than a certain value (e.g., 2), short ETH and long BTC.
As long as the zScore is less than a certain value (e.g., -2), long ETH and short BTC.
However, this approach sometimes generates too many signals, is prone to false breakouts, and has unstable win rates.
---
**Optimization Goals**
1. Reduce signal frequency and filter out meaningless/noisy trades
2. Wait for "obvious extremes" before taking action, giving each trade a better chance at mean reversion
3. After entry, avoid getting chopped in sideways markets by enforcing a cooldown period before considering the next trade
---
**1. "Only trade in extreme zones": Increase entry threshold**
Previously, you entered whenever zScore > 2 or < -2. This threshold is easily triggered by noise.
**Optimization:** Raise the threshold (e.g., to 2.5 or 3), so signals only appear in "very extreme" conditions, reducing random entries.
**2. "Confirm mean reversion momentum": Wait until it actually starts to revert**
The traditional approach often enters right when zScore first breaks the extreme value, but sometimes price keeps moving in the same direction, leading to losses.
**Optimization:**
* First, wait until zScore reaches the extreme zone (>2.5 or <-2.5),
* Then, wait for it to "start reverting" (for example, zScore falls back below 2.5 from above 3),
* Only enter then. This increases the likelihood of actual mean reversion and avoids getting caught in one-sided trends after the breakout.
**3. "Cooldown period": Force a rest and reduce getting chopped**
Many trades, after closing, immediately receive a new signal and reverse position, which often leads to losses in choppy markets.
**Optimization:** Set a "cooldown period" (e.g., 15 candles). During this time, no new signals are generated—even if conditions are met—allowing you to wait for the next "truly favorable extreme opportunity."
---
**Key Variables**
* `plotH`: Entry threshold (e.g., 2.5). Only consider entries when zScore exceeds this value.
* `cooldown`: Number of cooldown candles. No new entries can be made during this period, regardless of signals.
* `last_entry_bar`: Records the bar\_index of the last entry, used to calculate the cooldown period.
---
**Entry Logic**
* If zScore breaks upwards through -plotH and you’re not in a cooldown period, generate a long ETH/short BTC signal (show a label).
* If zScore breaks downwards through plotH and not in a cooldown period, generate a short ETH/long BTC signal.
* Every time you enter a trade, update `last_entry_bar` to the current bar\_index and enter the cooldown period.
The entry standard deviation threshold is originally set to 2.5, but you can set it to any peak value you prefer—the higher the value, the fewer the signals.
The cooldown candle count is also customizable; the higher the value, the fewer the signals.
The look-back period is adjustable as well; the higher it is, the longer the historical window considered, and the fewer the signals.
---
I’ve been thinking for over a year about what kind of strategies are suitable for retail traders.
After all this time, I’ve only come up with two types:
1. Hedge strategies that only capture abnormal volatility
2. Funding rate arbitrage
Currently, I’m publishing the hedge strategy first.
I’ll continue to share funding rate arbitrage in the future.
配對交易waynecoin製作2_回歸零即止盈進場:兩個幣價差大幅偏離平均值(超過設定標準差),認為出現「極端偏差」,所以進行配對交易
出場:只要 zScore 回到 0,即「兩幣回歸均值關係」,立刻平倉
冷卻機制:每次出場後,必須經過設定的K線數才能再次進場,有效減少過度頻繁交易
這種回歸0止盈法的優點
減少來回掃損:避免只在邊界平倉(如 zScore 回到 1),能抓到更大一段的均值回歸
簡單直觀:規則容易判斷,不需要額外判斷趨勢或震盪
適合盤整行情:這種策略在橫盤或均值回歸明顯的市場表現較好
需搭配wayncoin製作2來使用,因為腳本原因他一次只能單筆持倉,所以相比較wayncoin製作2會遺漏一些信號,但可以這版本的離場信號做為離場,在該跟k線收盤後出現離場信號在做離場
Entry: When the price spread between the two coins deviates significantly from the mean (exceeds the set standard deviation), this is considered an "extreme deviation," so a pairs trade is initiated.
Exit: As soon as the zScore returns to 0—meaning the price relationship between the two coins has reverted to the mean—the position is closed immediately.
Cooldown mechanism: After each exit, a specified number of candlesticks must pass before a new entry is allowed, effectively reducing over-trading.
Advantages of the “exit at zScore=0” method:
Reduces whipsaw losses: By avoiding exits at just the boundaries (e.g., zScore returning to 1), it can capture a larger portion of the mean reversion move.
Simple and intuitive: The rules are easy to follow, without needing to judge additional trends or market regimes.
Well-suited to ranging markets: This strategy performs better in sideways or clearly mean-reverting markets.
Note:
This method should be used together with “waynecoin version 2.” Due to script limitations, it only allows one position at a time, so compared to waynecoin version 2, some signals may be missed. However, you can use the exit signals from this version to close positions—when an exit signal appears after the close of the corresponding candlestick, close the position.
EscobarTrades:- Session Opens/Box's)Marks out session opens for you, Shows you different sessions with color boxes