FVGs Multi-Frame Optimized v1.0Description
FVGs Multi-Frame Optimized v1.0 This indicator detects and visualizes Fair Value Gaps (FVGs) across multiple timeframes (from 1 second to 1 day). It offers complete customization of imbalance visualization including:
Styles and colors for bullish/bearish FVGs
Labeling options
Mitigated zone management
Proximity controls to show/hide FVGs
Individual timeframe settings
User Manual:
1. Basic Setup :
Select which timeframes to display (1s to 1D)
Choose whether to hide lower/current timeframes
Adjust spacing between zones from different timeframes
2. Visual Styles :
Customize lines (solid, dashed, dotted)
Define colors for active and mitigated FVGs
Control line thickness
3. Advanced Options :
Enable/disable proximity filter
Configure FVG mitigation criteria
Limit maximum visible FVGs
Indicadores e estratégias
Madrid Moving Average Ribbon (WMA)Madrid Moving Average Ribbon (WMA version)
This indicator visualizes a ribbon of 19 Weighted Moving Averages (WMA), ranging from 5 to 100 periods in 5-step increments. Each WMA is color-coded based on its slope and its position relative to the 100-period WMA, which serves as a baseline.
Color Logic:
LIME: Strong uptrend (rising and above WMA100)
GREEN: Possible recovery (rising but below WMA100)
MAROON: Potential reversal warning (falling but above WMA100)
RED (RUBI): Confirmed downtrend (falling and below WMA100)
GRAY: Neutral or unclear
Use this indicator to quickly evaluate trend direction, strength, and potential reversal zones.
Ideal for trend-following, swing trading, and visual confirmation strategies.
----
Madrid 이동평균 리본 (WMA 버전)
이 인디케이터는 5에서 100까지 5단위로 증가하는 총 19개의 WMA(가중이동평균)를 리본 형태로 시각화합니다.
각 선은 기준선인 WMA100을 중심으로 기울기와 상대적 위치에 따라 색상이 지정됩니다.
색상 의미:
라임색 (LIME): 강한 상승 추세 (상승 중이며 WMA100 위에 위치)
초록색 (GREEN): 반등 가능성 (상승 중이나 WMA100 아래에 위치)
밤색 (MAROON): 하락 반전 경고 (하락 중이지만 WMA100 위에 위치)
빨간색 (RUBI): 명확한 하락 추세 (하락 중이며 WMA100 아래에 위치)
회색 (GRAY): 방향성 불명확 (횡보 또는 모호한 구간)
이 지표는 추세의 방향성과 강도, 그리고 전환 구간을 빠르게 파악할 수 있도록 도와줍니다.
추세 추종, 스윙 트레이딩, 시각적 확인 보조지표로 적합합니다.
Faisalvolume pro//@version=6
indicator("Faisalvolume Pro", overlay=false)
// إعدادات
maLength = input.int(20, minval=1, title="Volume MA Length")
highVolumeMultiplier = input.float(1.5, title="High Volume Multiplier")
// بيانات
vol = volume
volMA = ta.sma(vol, maLength)
// شروط
isHighVol = vol > volMA * highVolumeMultiplier
isAboveMA = vol > volMA
// لون العمود
barColor = isHighVol ? color.rgb(18, 163, 42) : isAboveMA ? color.rgb(226, 20, 20) : color.gray
// رسم المؤشر
plot(vol, title="Volume", style=plot.style_columns, color=barColor)
plot(volMA, title="Volume MA", color=color.orange, linewidth=2)
Volume Exhaustion RSI Reversal StrategyKey Features:
Volume Logic:
1. Identifies two consecutive red bars (down periods) or green bars (up periods)
2. First down or up bars has the highest volume of the three
3. Volume decreases on the second down or up bars
4. Current (third) bar is green for up Reversal or red for down Reversal with higher volume than second bar
RSI Logic:
Uses standard 14-period RSI
Detects "V" shape pattern (decline, trough, rise)
Requires trough value <= 30 (oversold condition) or <= 70 (overbought condition)
Current bar shows RSI rising from trough
Execution:
Enters long/Short position when both volume and RSI conditions are met
Plots green "BUY/SELL" labels below the trigger candle
Visualization:
Green "BUY/SELL" labels appear below qualifying candles
Strategy positions shown in the strategy tester
How To Use:
Apply to any timeframe (works best on 5M-15M charts)
Combine with price action confirmation for example when candle 3 closes above candle 2 for "BUY" Or when Closes below for "SELL"
Ideal for oversold reversals in downtrends
Works best with volume-based assets
Note: The strategy enters at the close of the trigger candle. Always backtest before live trading and consider adding stop-loss protection.
VWAP con Ancho de Banda (%) y Semáforo📈 VWAP with Band Width (%) + Visual Traffic Light
This indicator is designed for traders who rely on VWAP-based momentum strategies, especially during sessions with lower liquidity like Asia or pre-market hours.
✅ What does this indicator do?
Calculates VWAP using Pine Script’s built-in ta.vwap(), anchored to a specific custom time (default: 7:30 PM Mexico time – ideal for Asia session).
Draws the upper and lower bands based on 1 standard deviation.
Measures the real band width as a percentage of VWAP.
Displays that percentage on the chart and compares it to a user-defined minimum threshold.
Adds a "traffic light" background:
🟢 Green: VWAP width is above the minimum threshold (e.g., 0.50%) → valid conditions to trade
🔴 Red: market lacks momentum → avoid trading
🎯 Who is this for?
Intraday traders operating BTC, ETH, indices, or Forex in 1min–5min timeframes
Breakout or EMA-based strategy traders
Anyone who wants to filter trades based on actual market strength or range
⚙ Key Configurations:
VWAP anchor time (default: 19:30)
Minimum VWAP width (%) to consider market valid
Toggle background visual signal on/off
💡 Perfect for traders who need a clean way to validate real momentum before entering a position. Helps avoid choppy, low-volume environments and boosts confidence during entry.
MTF RSI Divergence📈 MTF RSI Divergence — 실전용 멀티타임프레임 RSI 다이버전스 전략
🚀 RSI 다이버전스 기반 자동매매 필터 전략 (with EMA, CVD, Trend Sync)
RSI 기반 멀티타임프레임 신호를 다양한 필터와 결합하여 만든 실전용 신호 엔진입니다.
This is a multi-timeframe RSI divergence strategy combined with EMA, CVD and trend filters — designed for real trading.
🧠 주요 특징 | Key Features
🔹 **멀티타임프레임 RSI 다이버전스 감지**
• 5분, 15분, 1시간, 4시간, 일봉에서 RSI(5) 다이버전스 감지
• 가격과 RSI 간 고점/저점 불일치 탐지
→ Detects RSI(5) divergences across 5M, 15M, 1H, 4H, 1D timeframes
→ Identifies mismatches between price highs/lows and RSI
🔹 **고급 추세 필터링 (EMA 기반)**
• EMA200으로 추세 필터링
• EMA50/EMA200 교차로 상위 타임프레임 추세 동기화
• 상승/하락장 조건 분리로 신호 노이즈 제거
→ Uses EMA200 as trend filter
→ Aligns lower timeframe with higher trend via EMA crossover
→ Removes noise by detecting uptrend/downtrend conditions
🔹 **로컬 CVD 수급 필터 (외부 소스 없이)**
• CVD(누적 매수/매도량) 로컬 계산
• SMA 비교로 강한 매수/매도 압력만 필터링
→ Calculates local CVD without external sources
→ Filters strong buy/sell pressure by comparing CVD delta and SMA
🔹 **시각적 라벨링 (🚀 / ☁️)**
• 타임프레임별 매수/매도 다이버전스를 시각화
• 🚀 = 강한 매수 신호 / ☁️ = 강한 매도 신호
→ Bull/Bear divergences shown directly on chart
→ 🚀 = bullish signal / ☁️ = bearish signal
📄 제작자 정보 | About the Creator
👤 제작자: 박시완 (Siwan Park)
프론트엔드 및 트레이딩 시스템 개발자.
RSI 다이버전스 기반의 실전 트레이딩 전략을 분석하고 자동화하는 데 집중하고 있습니다.
→ Creator: Siwan Park
Frontend & automated trading system developer.
Focused on designing practical RSI divergence-based strategies and integrating them into live trading workflows.
• github: github.com
Live Swing Midpoint (1 SH + 1 SL only) + Midpoint LabelThis Script would take the most recent Swing High and Swing Low and calculate the 50% Midpoint and plot it on the chart. acting as a recent, updated S/R level.
As price move Up/Down it'll keep on updating the Swings and the 50% Plot LIVE in REAL TIME.
AdelVolume Clone//@version=6
indicator("Faisalvolume Clone", overlay=false)
// إعدادات
maLength = input.int(20, minval=1, title="Volume MA Length")
highVolumeMultiplier = input.float(1.5, title="High Volume Multiplier")
// بيانات
vol = volume
volMA = ta.sma(vol, maLength)
// شروط
isHighVol = vol > volMA * highVolumeMultiplier
isAboveMA = vol > volMA
// لون العمود
barColor = isHighVol ? color.red : isAboveMA ? color.lime : color.gray
// رسم المؤشر
plot(vol, title="Volume", style=plot.style_columns, color=barColor)
plot(volMA, title="Volume MA", color=color.orange, linewidth=2)
Yaman's Scalper Pro V.1 ✅This is just a quick scalping guide.
Enter based on your own Trading Strategies.
Please Do Not blindly place Trade Entries without Checking the Real Market Trend.
USE IT ON ANY TIME FRAMES,
BEST TO USE M1, M3 & M5 TIME FRAMES.
ENTRY RULES.
WAIT FOR ONE CANDLE TO CLOSE PROPER, OTHERWISE IT MIGHT REPAINT.
SELL ENTRY ---> RED COLOR
SELL EXIT ---> ORANGE COLOR
BUY ENTRY ---> GREEN COLOR
BUY EXIT ---> BLUE COLOR
HAPPY TRADING!!!
Thanks
Yaman Didi
29/04/2025
Shadow size Cryptoingener)"Wick Size Indicator"
This indicator calculates and displays the size of upper and lower wicks for each candlestick on the chart. It helps traders identify price rejection zones, potential reversals, and volatility patterns by visualizing how far price moved beyond the open and close within each candle. The wick size is shown in points or percentage, making it easier to detect market sentiment and analyze candle structure in real time.
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.
NIK Chart VWAPThe VWAP is an intra-day average that begins at the start of each trading day. During the session, it weights each bar’s value against that bar’s volume. This gives bars with high volume more weight in the VWAP’s value. Bars with low volume, on the other hand, contribute little to the moving average’s value.
WMA+VWAP with Buy & Sell signals [Dr.K.C.Prakash]WMA+VWAP with Buy & Sell signals
✅ Purpose:
This TradingView indicator helps traders identify trend shifts and trade opportunities by combining:
Weighted Moving Average (WMA) crossover signals (for trend direction)
VWAP (Volume Weighted Average Price) (for intraday fair-value levels)
It is designed to visually signal Buy/Sell entries on the chart when the faster WMA crosses the slower WMA, while also showing the VWAP for additional trade context.
The crossover logic highlights potential shifts in trend momentum.
2️⃣ VWAP (Volume Weighted Average Price)
Plotted as an orange line.
VWAP is widely used by intraday traders to identify a "fair value" price level, helping confirm if price is trading above/below the session’s average price.
✅ Traders often use VWAP as dynamic support/resistance or to filter trade entries (e.g., only take buys if price is above VWAP).
3️⃣ Visual Signals
BUY label: Green, below bar.
SELL label: Red, above bar.
These labels appear directly on the chart when crossovers occur, making it easy to spot entry points.
WMA cross with filtered Signals [Dr.K.C.Prakash]WMA cross with filtered Signals
📌 Description
This indicator is designed to generate trend-filtered Buy and Sell signals based on the crossover of two Weighted Moving Averages (WMAs), with confirmation from a long-term EMA trend filter.
It helps traders avoid false signals in choppy markets by trading only in the direction of the broader trend.
✅ Features
Fast WMA (?) and Slow WMA (?)
Core crossover logic for detecting local trend shifts.
EMA Trend Filter (?)
Confirms overall trend direction.
Buy signals only occur when price is above the EMA ? (uptrend).
Sell signals only occur when price is below the EMA ? (downtrend).
Signal Markers on Chart
BUY label below bar for valid bullish crossovers.
SELL label above bar for valid bearish crossunders.
EMA 200 Line
Clearly plotted to visualize the trend filter level.
Customizable Length Inputs
Users can adjust Fast WMA, Slow WMA, and EMA filter length.
Lines for both WMAs and the EMA trend filter.
Signal labels on valid Buy/Sell events.
✅ Use Cases
Trend-following traders who want cleaner entries.
Avoiding counter-trend signals.
Works on any timeframe (but EMA 200 is best for larger trend context).
GCM Bull Bear RiderGCM Bull Bear Rider (GCM BBR)
Your Ultimate Trend-Riding Companion
GCM Bull Bear Rider is a comprehensive, all-in-one trend analysis tool designed to eliminate guesswork and provide a crystal-clear view of market direction. By leveraging a highly responsive Jurik Moving Average (JMA), this indicator not only identifies bullish and bearish trends with precision but also tracks their performance in real-time, helping you ride the waves of momentum from start to finish.
Whether you are a scalper, day trader, or swing trader, the GCM BBR adapts to your style, offering a clean, intuitive, and powerful visual guide to the market's pulse.
Key Features
JMA-Powered Trend Lines (UTPL & DTPL): The core of the indicator. A green "Up Trend Period Line" (UTPL) appears when the JMA's slope turns positive (buyers are in control), and a red "Down Trend Period Line" (DTPL) appears when the slope turns negative (sellers are in control). The JMA is used for its low lag and superior smoothing, giving you timely and reliable trend signals.
Live Profit Tracking Labels: This is the standout feature. As soon as a trend period begins, a label appears showing the real-time profit (P:) from the trend's starting price. This label moves with the trend, giving you instant feedback on its performance and helping you make informed trade management decisions.
Historical Performance Analysis: The profit labels remain on the chart for completed trends, allowing you to instantly review past performance. See at a glance which trends were profitable and which were not, aiding in strategy refinement and backtesting.
Automatic Chart Decluttering: To keep your chart clean and focused on significant moves, the indicator automatically removes the historical profit label for any trend that fails to achieve a minimum profit threshold (default is 0.5 points).
Dual-Ribbon Momentum System:
JMA / Short EMA Ribbon: Visualizes short-term momentum. A green fill indicates immediate bullish strength, while a red fill shows bearish pressure.
Short EMA / Long EMA Ribbon: Acts as a long-term trend filter, providing broader market context for your decisions.
"GCM Hunt" Entry Signals: The indicator includes optional pullback entry signals (green and red triangles). These appear when the price pulls back to a key moving average and then recovers in the direction of the primary trend, offering high-probability entry opportunities.
How to Use
Identify the Trend: Look for the appearance of a solid green line (UTPL) for a bullish bias or a solid red line (DTPL) for a bearish bias. Use the wider EMA ribbon for macro trend confirmation.
Time Your Entry: For aggressive entries, you can enter as soon as a new trend line appears. For more conservative entries, wait for a "GCM Hunt" triangle signal, which confirms a successful pullback.
Ride the Trend & Manage Your Trade: The moving profit label (P:) is your guide. As long as the trend line continues and the profit is increasing, you can confidently stay in the trade. A flattening JMA or a decreasing profit value can signal that the trend is losing steam.
Focus Your Strategy: Use the Display Mode setting to switch between "Buyers Only," "Sellers Only," or both. This allows you to completely hide opposing signals and focus solely on long or short opportunities.
Core Settings
Display Mode: The master switch. Choose to see visuals for "Buyers & Sellers," "Buyers Only," or "Sellers Only."
JMA Settings (Length, Phase): Fine-tune the responsiveness of the core JMA engine.
EMA Settings (Long, Short): Adjust the lengths of the moving averages that define the ribbons and "Hunt" signals.
Label Offset (ATR Multiplier): Customize the gap between the trend lines and the profit labels to avoid overlap with candles.
Filters (EMA, RSI, ATR, Strong Candle): Enable or disable various confirmation filters to strengthen the "Hunt" entry signals according to your risk tolerance.
Add the GCM Bull Bear Rider to your chart today and transform the way you see and trade the trend!
ENJOY
Turtle Strategy Pullback EntryThis strategy, titled “Turtle Strategy Pullback Entry”, is a trend-following system designed to capture breakouts more efficiently by entering after a slight pullback. Instead of buying immediately when the price breaks the 20-day high, the strategy waits for the price to pull back by 1% below that high, offering a better entry point and reducing the chances of false breakouts. Once the pullback level is reached, a long position is initiated. The trade is then managed using three exit conditions: it will close if the price drops 1.4% below the entry (acting as a stop loss), if the price rises 1.8% above the entry (taking profit), or if the price closes below the 20-day low, which serves as a trend invalidation signal. The position size is based on 100% of the equity by default, and the chart visually shows the 20-day high, low, and pullback level along with a green background when a position is active. This approach helps traders ride strong trends while avoiding premature entries, making it suitable for swing or position trading across stocks, forex, or crypto markets.
SAPMA_BANDLARI_MÜCAHİD_ATAOGLUThis “Advanced Deviation Bands” indicator is designed as an all-in-one trading toolkit that:
Calculates a Flexible Base Average
User-selectable type (HMA, EMA, WMA, VWMA, LWMA) and length.
Optionally uses the price source itself as the “average” input.
Builds ±1σ to ±5σ Deviation Bands
Measures deviation of price vs. the base average, cleans out extreme outliers, and applies a weighted moving average to smooth.
Computes standard deviation on that cleaned series and multiplies by the base average to get dynamic σ values.
Plots five upper and five lower bands around the adjusted average.
Rich Visual & Layout Controls
Neon-style colors for each band, configurable thickness and label size.
Optional gradient fills between bands.
Background shading for “Normal,” “Oversold” (price < –3σ) and “Overbought” (price > +3σ) regions.
Dynamic labels at chart edge marking each σ level and zone names (e.g. “NORMAL,” “DİKKAT,” “TEHLİKE,” etc.).
Smart Signal Generation with Risk Management
Buy when price dips below –3σ and momentum (RSI 14, MACD) & trend (50 EMA vs. 200 EMA) filters pass.
Sell when price exceeds +3σ with analogous momentum/trend checks.
Automatically records entry price and draws corresponding Stop Loss and Take Profit levels based on user-set percentages (e.g. 2 % SL, 4 % TP).
Clears the entry when SL or TP is hit.
Momentum & Trend Analysis
RSI and MACD measure momentum strength/weakness.
EMA50 vs. EMA200 define overall uptrend or downtrend.
On-Chart Info Table & Alerts
Shows current price, RSI, trend direction, distance to ±3σ in %, a “Risk Level” (Low/Medium/High), and composite “Signal Strength” score.
Alert conditions for buy/sell triggers and critical ±4σ breaks.
Purpose
To combine statistical price dispersion (σ-bands), momentum, trend direction, and built-in trade management—delivering visually striking, rule-based entry/exit signals with stop loss, take profit, and clear risk assessment, all in one indicator.
配對交易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.