Prop ES Bollinger Bands Strat during Single/Dual Trading SessionBollinger Band strategy for ES futures optimized for prop firm rules.
Choose long-only, short-only, or both directions.
Customizable BB length and multiplier.
Enter trades during one or two configurable sessions specified in New York time.
Fixed TP/SL in ticks with forced close by 4:59 PM NY time.
Indicadores e estratégias
LR Candles V2.1IMPORTANT: Use this strategy only with Heikin Ashi candles; otherwise, the results will be negative.
The use of this strategy is solely and exclusively under the responsibility of the operator.
To perform testing correctly and as close to market reality as possible, we suggest setting the strategy preferences as follows:
Slippage = 3
Using bar magnifico = Enabled
Commission = Completed
Detail: It is important to include at least 1,000 trades in the test. This provides a certain robustness in the historical analysis of a strategy. Values lower than this may alter the expected results when trading in real life.
Tip:
Play around with different time frames and calibrations on the strategic indicator. Examples include unchecking Ling-Reg, unchecking EMA, or using both in combination. Look for the best probability and results for a specific asset.
The strategy usually performs well on time frames longer than 1 hour; this is what has been observed.
PA SystemPA System
短简介 Short Description(放在最上面)
中文:
PA System 是一套以 AL Brooks 价格行为为核心的策略(Strategy),将 结构(HH/HL/LH/LL)→ 回调(H1/L1)→ 二次入场(H2/L2 微平台突破) 串成完整可回测流程,并可选叠加 BoS/CHoCH 结构突破过滤 与 Liquidity Sweep(扫流动性)确认。内置风险管理:定风险仓位、部分止盈、保本、移动止损、时间止损、冷却期。
English:
PA System is an AL Brooks–inspired Price Action strategy that chains Market Structure (HH/HL/LH/LL) → Pullback (H1/L1) → Second Entry (H2/L2 via Micro Range Breakout) into a complete backtestable workflow, with optional BoS/CHoCH structure-break filtering and Liquidity Sweep confirmation. Built-in risk management includes risk-based sizing, partial exits, breakeven, trailing stops, time stop, and cooldown.
⸻
1) 核心理念 Core Idea
中文:
这不是“指标堆叠”,而是一条清晰的价格行为决策链:
结构确认 → 回调出现 → 小平台突破(二次入场)→ 风控出场。
策略把 Brooks 常见的“二次入场”思路程序化,同时用可选的结构突破与扫流动性模块提升信号质量、减少震荡误入。
English:
This is not an “indicator soup.” It’s a clear price-action decision chain:
Confirmed structure → Pullback → Micro-range breakout (second entry) → Risk-managed exits.
The system programmatically implements the Brooks-style “second entry” concept, and optionally adds structure-break and liquidity-sweep context to reduce chop and improve trade quality.
⸻
2) 主要模块 Main Modules
A. 结构识别 Market Structure (HH/HL/LH/LL)
中文:
使用 pivot 摆动点确认结构,标记 HH/HL/LH/LL,并可显示最近一组摆动水平线,方便对照结构位置。
English:
Uses confirmed pivot swings to label HH/HL/LH/LL and optionally plots the most recent swing levels for clean structure context.
B. 状态机 Market Regime (State Machine + “Always In”)
中文:
基于趋势K强度、EMA关系与波动范围,识别市场环境(Breakout/Channel/Range)以及 Always-In 方向,用于过滤不合适的交易环境。
English:
A lightweight regime engine detects Breakout/Channel/Range and an “Always In” directional bias using momentum and EMA/range context to avoid low-quality conditions.
C. 二次入场 Second Entry Engine (H1→H2 / L1→L2)
中文:
• H1/L1:回调到结构附近并出现反转迹象
• H2/L2:在 H1/L1 后等待最小 bars,然后触发 Micro Range Breakout(小平台突破)并要求信号K收盘强度达标
这一段是策略的“主发动机”。
English:
• H1/L1: Pullback into structure with reversal intent
• H2/L2: After a minimum wait, triggers on Micro Range Breakout plus a configurable close-strength filter
This is the main “entry engine.”
D. 可选过滤器 Optional Filters (Quality Boost)
BoS/CHoCH(结构突破过滤)
中文: 可识别 BoS / CHoCH,并可要求“入场前最近 N bars 必须有同向 break”。
English: Detects BoS/CHoCH and can require a recent same-direction break within N bars.
Liquidity Sweeps(扫流动性确认)
中文: 画出 pivot 高/低的流动性水平线,检测“刺破后收回”的 sweep,并可要求入场前出现同向 sweep。
English: Tracks pivot-based liquidity levels, confirms sweeps (pierce-and-reclaim), and can require a recent sweep before entry.
E. FVG 可视化 FVG Visualization
中文: 提供 FVG 区域盒子与管理模式(仅保留未回补 / 仅保留最近N),主要用于区域理解与复盘,不作为强制入场条件(可自行扩展)。
English: Displays FVG boxes with retention modes (unfilled-only or last-N). Primarily for context/analysis; not required for entries (you can extend it as a filter/target).
⸻
3) 风险管理 Risk Management (Built-In)
中文:
• 定风险仓位:按账户权益百分比计算仓位
• SL/TP:基于结构 + ATR 缓冲,且限制最大止损 ATR 倍
• 部分止盈:到达指定 R 后减仓
• 保本:到达指定 R 后推到 BE
• 移动止损:到达指定 R 后开始跟随
• 时间止损:持仓太久不动则退出
• 冷却期:出场后等待 N bars 再允许新单
English:
• Risk-based sizing: position size from equity risk %
• SL/TP: structure + ATR buffer with max ATR risk cap
• Partial exits at an R threshold
• Breakeven at an R threshold
• Trailing stop activation at an R threshold
• Time stop to reduce chop damage
• Cooldown after exit to avoid rapid re-entries
⸻
4) 推荐使用方式 Recommended Usage
中文:
• 推荐从 5m / 15m / 1H 开始测试
• 想更稳:开启 EMA Filter + Break Filter + Sweep Filter,并提高 Close Strength
• 想更多信号:关闭 Break/Sweep 过滤或降低 Swing Length / Close Strength
• 回测时务必设置合理的手续费与滑点,尤其是期货/指数
English:
• Start testing on 5m / 15m / 1H
• For higher quality: enable EMA Filter + Break Filter + Sweep Filter and increase Close Strength
• For more signals: disable Break/Sweep filters or reduce Swing Length / Close Strength
• Use realistic commissions/slippage in backtests (especially for futures/indices)
⸻
5) 重要说明 Notes
中文:
结构 pivot 需要右侧确认 bars,因此结构点存在天然滞后(确认后不会再变)。策略逻辑尽量避免不必要的对象堆叠,并对数组/对象做了稳定管理,适合长期运行与复盘。
English:
Pivot-based structure requires right-side confirmation (inherent lag; once confirmed it won’t change). The script is designed for stability and resource-safe object management, suitable for long sessions and review.
⸻
免责声明 Disclaimer(建议原样保留)
中文:
本脚本仅用于教育与研究目的,不构成任何投资建议。策略回测结果受市场条件、手续费、滑点、交易时段、数据质量等影响显著。使用者需自行验证并承担全部风险。过往表现不代表未来结果。
English:
This script is for educational and research purposes only and does not constitute financial advice. Backtest results are highly sensitive to market conditions, fees, slippage, session settings, and data quality. Use at your own risk. Past performance is not indicative of future results.
CryptoFlux Dynamo [JOAT]CryptoFlux Dynamo: Velocity Scalping Strategy
WHAT THIS STRATEGY IS
CryptoFlux Dynamo is an open-source Pine Script v6 strategy designed for momentum-based scalping on cryptocurrency perpetual futures. It combines multiple technical analysis methods into a unified system that adapts its behavior based on current market volatility conditions.
This script is published open-source so you can read, understand, and modify the complete logic. The description below explains everything the strategy does so that traders who cannot read Pine Script can fully understand how it works before using it.
HOW THIS STRATEGY IS ORIGINAL AND WHY THE INDICATORS ARE COMBINED
This strategy uses well-known indicators (MACD, EMA, RSI, MFI, Bollinger Bands, Keltner Channels, ATR). The originality is not in the individual indicators themselves, but in the specific way they are integrated into a regime-adaptive system. Here is the detailed justification for why these components are combined and how they work together:
The Problem Being Solved:
Standard indicator-based strategies use fixed thresholds. For example, a typical MACD strategy might enter when the histogram crosses above zero. However, in cryptocurrency markets, volatility changes dramatically throughout the day and week. A MACD crossover during a low-volatility consolidation period has very different implications than the same crossover during a high-volatility trending period. Using the same entry thresholds and stop distances in both conditions leads to either:
Too many false signals during consolidation (if thresholds are loose)
Missing valid opportunities during expansion (if thresholds are tight)
Stops that are too tight during volatility spikes (causing premature exits)
Stops that are too wide during compression (giving back profits)
The Solution Approach:
This strategy first classifies the current volatility regime using normalized ATR (ATR as a percentage of price), then dynamically adjusts ALL other parameters based on that classification. This creates a context-aware system rather than a static threshold comparison.
How Each Component Contributes to the System:
ATR-Based Regime Classification (The Foundation)
The strategy calculates ATR over 21 periods, smooths it with a 13-period EMA to reduce noise from wicks, then divides by price to get a normalized percentage. This ATR% is classified into three regimes:
- Compression (ATR% < 0.8%): Market is consolidating, breakouts are more likely but false signals are common
- Expansion (ATR% 0.8% - 1.6%): Normal trending conditions
- Velocity (ATR% > 1.6%): High volatility, larger moves but also larger adverse excursions
This regime classification then controls stop distances, profit targets, trailing stop offsets, and signal strength requirements. The regime acts as a "meta-parameter" that tunes the entire system.
EMA Ribbon (8/21/34) - Trend Structure Detection
The three EMAs establish trend direction and structure. When EMA 8 > EMA 21 > EMA 34, the trend structure is bullish. The slope of the middle EMA (21) is calculated over 8 bars and converted to degrees using arctangent. This slope measurement quantifies trend strength, not just direction.
Why these specific periods? The 8/21/34 sequence follows Fibonacci-like spacing and provides good separation on 5-minute cryptocurrency charts. The fast EMA (8) responds to immediate price action, the mid EMA (21) represents the short-term trend, and the slow EMA (34) acts as a trend filter.
The EMA ribbon works with the regime classification: during compression regimes, the strategy requires stronger ribbon alignment before entry because false breakouts are more common.
MACD (8/21/5) - Momentum Measurement
The MACD uses faster parameters (8/21/5) than the standard (12/26/9) because cryptocurrency markets move faster than traditional markets. The histogram is smoothed with a 5-period EMA to reduce noise.
The key innovation is the adaptive histogram baseline. Instead of using a fixed threshold, the strategy calculates a rolling baseline from the smoothed absolute histogram value, then multiplies by a sensitivity factor (1.15). This means the threshold for "significant momentum" automatically adjusts based on recent momentum levels.
The MACD works with the regime classification: during velocity regimes, the histogram baseline is effectively higher because recent momentum has been stronger, preventing entries on relatively weak momentum.
RSI (21 period) and MFI (21 period) - Independent Momentum Confirmation
RSI measures momentum using price changes only. MFI (Money Flow Index) measures momentum using price AND volume. By requiring both to confirm, the strategy filters out price moves that lack volume support.
The 21-period length is longer than typical (14) to reduce noise on 5-minute charts. The trigger threshold (55 for longs, 45 for shorts) is slightly offset from 50 to require momentum in the trade direction, not just neutral readings.
These indicators work together: a signal requires RSI > 55 AND MFI > 55 for longs. This dual confirmation reduces false signals from price manipulation or low-volume moves.
Bollinger Bands (1.5 mult) and Keltner Channels (1.8 mult) - Squeeze Detection
When Bollinger Bands contract inside Keltner Channels, volatility is compressing and a breakout is likely. This is the "squeeze" condition. When the bands expand back outside the channels, the squeeze "releases."
The strategy uses a 1.5 multiplier for Bollinger Bands (tighter than standard 2.0) and 1.8 for Keltner Channels. These values were chosen to identify meaningful squeezes on 5-minute cryptocurrency charts without triggering too frequently.
The squeeze detection works with the regime classification: squeeze releases during compression regimes receive additional signal strength points because breakouts from consolidation are more significant.
Volume Impulse Detection - Institutional Participation Filter
The strategy calculates a volume baseline (34-period SMA) and standard deviation. A "volume impulse" is detected when current volume exceeds the baseline by 1.15x OR when the volume z-score exceeds 0.5.
This filter ensures entries occur when there is meaningful market participation, not during low-volume periods where price moves are less reliable.
Volume impulse is required for all entries and adds points to the composite signal strength score.
Cycle Oscillator - Trend Alignment Filter
The strategy calculates a 55-period EMA as a cycle basis, then measures price deviation from this basis as a percentage. When price is more than 0.15% above the cycle basis, the cycle is bullish. When more than 0.15% below, the cycle is bearish.
This filter prevents counter-trend entries. Long signals require bullish cycle alignment; short signals require bearish cycle alignment.
BTC Dominance Filter (Optional) - Market Regime Filter
The strategy can optionally use BTC.D (Bitcoin Dominance) as a market regime filter. When BTC dominance is rising (slope > 0.12), the market is in "risk-off" mode and long entries on altcoins are filtered. When dominance is falling (slope < -0.12), short entries are filtered.
This filter is optional because the BTC.D data feed may lag during low-liquidity periods.
How The Components Work Together (The Mashup Justification):
The strategy uses a composite scoring system where each signal pathway contributes points:
Trend Break pathway (30 points): Requires EMA ribbon alignment + positive slope + price breaks above recent structure high
Momentum Surge pathway (30 points): Requires MACD histogram > adaptive baseline + MACD line > signal + RSI > 55 + MFI > 55 + volume impulse
Squeeze Release pathway (25 points): Requires BB inside KC (squeeze) then release + momentum bias + histogram confirmation
Micro Pullback pathway (15 points): Requires shallow retracement to fast EMA within established trend + histogram confirmation + volume impulse
Additional modifiers:
+5 points if volume impulse is present, -5 if absent
+5 points in velocity regime, -2 in compression regime
+5 points if cycle is aligned, -5 if counter-trend
A trade only executes when the composite score reaches the minimum threshold (default 55) AND all filters agree (session, cycle bias, BTC dominance if enabled).
This scoring system is the core innovation: instead of requiring ALL conditions to be true (which would generate very few signals) or ANY condition to be true (which would generate too many false signals), the strategy requires ENOUGH conditions to be true, with different conditions contributing different weights based on their reliability.
HOW THE STRATEGY CALCULATES ENTRIES AND EXITS
Entry Logic:
1. Calculate current volatility regime from ATR%
2. Calculate all indicator values (MACD, EMA, RSI, MFI, squeeze, volume)
3. Evaluate each signal pathway and sum points
4. Check all filters (session, cycle, dominance, kill switch)
5. If composite score >= 55 AND all filters pass, generate entry signal
6. Calculate position size based on risk per trade and regime-adjusted stop distance
7. Execute entry with regime name as comment
Position Sizing Formula:
RiskCapital = Equity * (0.65 / 100)
StopDistance = ATR * StopMultiplier(regime)
RawQuantity = RiskCapital / StopDistance
MaxQuantity = Equity * (12 / 100) / Price
Quantity = min(RawQuantity, MaxQuantity)
Quantity = round(Quantity / 0.001) * 0.001
This ensures each trade risks approximately 0.65% of equity regardless of volatility, while capping total exposure at 12% of equity.
Stop Loss Calculation:
Stop distance is ATR multiplied by a regime-specific multiplier:
Compression regime: 1.05x ATR (tighter stops because moves are smaller)
Expansion regime: 1.55x ATR (standard stops)
Velocity regime: 2.1x ATR (wider stops to avoid premature exits during volatility)
Take Profit Calculation:
Target distance is ATR multiplied by regime-specific multiplier and base risk/reward:
Compression regime: 1.6x ATR * 1.8 base R:R * 0.9 regime bonus = approximately 2.6x ATR
Expansion regime: 2.05x ATR * 1.8 base R:R * 1.0 regime bonus = approximately 3.7x ATR
Velocity regime: 2.8x ATR * 1.8 base R:R * 1.15 regime bonus = approximately 5.8x ATR
Trailing Stop Logic:
When adaptive trailing is enabled, the strategy calculates a trailing offset based on ATR and regime:
Compression regime: 1.1x base offset (looser trailing to avoid noise)
Expansion regime: 1.0x base offset (standard)
Velocity regime: 0.8x base offset (tighter trailing to lock in profits during fast moves)
The trailing stop only activates when it would be tighter than the initial stop.
Momentum Fail-Safe Exits:
The strategy closes positions early if momentum reverses:
Long positions close if MACD histogram turns negative OR EMA ribbon structure breaks (fast EMA crosses below mid EMA)
Short positions close if MACD histogram turns positive OR EMA ribbon structure breaks
This prevents holding through momentum reversals even if stop loss hasn't been hit.
Kill Switch:
If maximum drawdown exceeds 6.5%, the strategy disables new entries until manually reset. This prevents continued trading during adverse conditions.
HOW TO USE THIS STRATEGY
Step 1: Apply to Chart
Use a 5-minute chart of a high-liquidity cryptocurrency perpetual (BTC/USDT, ETH/USDT recommended)
Ensure at least 200 bars of history are loaded for indicator stabilization
Use standard candlestick charts only (not Heikin Ashi, Renko, or other non-standard types)
Step 2: Understand the Visual Elements
EMA Ribbon: Three lines (8/21/34 periods) showing trend structure. Bullish when stacked upward, bearish when stacked downward.
Background Color: Shows current volatility regime
- Indigo/dark blue = Compression (low volatility)
- Purple = Expansion (normal volatility)
- Magenta/pink = Velocity (high volatility)
Bar Colors: Reflect signal strength divergence. Brighter colors indicate stronger directional bias.
Triangle Markers: Entry signals. Up triangles below bars = long entry. Down triangles above bars = short entry.
Dashboard (top-right): Real-time display of regime, ATR%, signal strengths, position status, stops, targets, and risk metrics.
Step 3: Interpret the Dashboard
Regime: Current volatility classification (Compression/Expansion/Velocity)
ATR%: Normalized volatility as percentage of price
Long/Short Strength: Current composite signal scores (0-100)
Cycle Osc: Price deviation from 55-period EMA as percentage
Dominance: BTC.D slope and filter status
Position: Current position direction or "Flat"
Stop/Target: Current stop loss and take profit levels
Kill Switch: Status of drawdown protection
Volume Z: Current volume z-score
Impulse: Whether volume impulse condition is met
Step 4: Adjust Parameters for Your Needs
For more conservative trading: Increase "Minimum Composite Signal Strength" to 65 or higher
For more aggressive trading: Decrease to 50 (but expect more false signals)
For higher timeframes (15m+): Increase "Structure Break Window" to 12-15, increase "RSI Momentum Trigger" to 58
For lower liquidity pairs: Increase "Volume Impulse Multiplier" to 1.3, increase slippage in strategy properties
To disable short selling: Uncheck "Enable Short Structure"
To disable BTC dominance filter: Uncheck "BTC Dominance Confirmation"
STRATEGY PROPERTIES (BACKTEST SETTINGS)
These are the exact settings used in the strategy's Properties dialog box. You must use these same settings when evaluating the backtest results shown in the publication:
Initial Capital: $100,000
Justification: This amount is higher than typical retail accounts. I chose this value to demonstrate percentage-based returns that scale proportionally. The strategy uses percentage-based position sizing (0.65% risk per trade), so a $10,000 account would see the same percentage returns with 10x smaller position sizes. The absolute dollar amounts in the backtest should be interpreted as percentages of capital.
Commission: 0.04% (commission_value = 0.04)
Justification: This reflects typical perpetual futures exchange fees. Major exchanges charge between 0.02% (maker) and 0.075% (taker). The 0.04% value is a reasonable middle estimate. If your exchange charges different fees, adjust this value accordingly. Higher fees will reduce net profitability.
Slippage: 1 tick
Justification: This is conservative for liquid pairs like BTC/USDT on major exchanges during normal conditions. For less liquid altcoins or during high volatility, actual slippage may be higher. If you trade less liquid pairs, increase this value to 2-3 ticks for more realistic results.
Pyramiding: 1
Justification: No position stacking. The strategy holds only one position at a time. This simplifies risk management and prevents overexposure.
calc_on_every_tick: true
Justification: The strategy evaluates on every price update, not just bar close. This is necessary for scalping timeframes where waiting for bar close would miss opportunities. Note that this setting means backtest results may differ slightly from bar-close-only evaluation.
calc_on_order_fills: true
Justification: The strategy recalculates immediately after order fills for faster response to position changes.
RISK PER TRADE JUSTIFICATION
The default risk per trade is 0.65% of equity. This is well within the TradingView guideline that "risking more than 5-10% on a trade is not typically considered viable."
With the 12% maximum exposure cap, even if the strategy takes multiple consecutive losses, the total risk remains manageable. The kill switch at 6.5% drawdown provides additional protection by halting new entries during adverse conditions.
The position sizing formula ensures that stop distance (which varies by regime) is accounted for, so actual risk per trade remains approximately 0.65% regardless of volatility conditions.
SAMPLE SIZE CONSIDERATIONS
For statistically meaningful backtest results, you should select a dataset that generates at least 100 trades. On 5-minute BTC/USDT charts, this typically requires:
2-3 months of data during normal market conditions
1-2 months during high-volatility periods
3-4 months during low-volatility consolidation periods
The strategy's selectivity (requiring 55+ composite score plus all filters) means it generates fewer signals than less filtered approaches. If your backtest shows fewer than 100 trades, extend the date range or reduce the minimum signal strength threshold.
Fewer than 100 trades produces statistically unreliable results. Win rate, profit factor, and other metrics can vary significantly with small sample sizes.
STRATEGY DESIGN COMPROMISES AND LIMITATIONS
Every strategy involves trade-offs. Here are the compromises made in this design and the limitations you should understand:
Selectivity vs. Opportunity Trade-off
The 55-point minimum threshold filters many potential trades. This reduces false signals but also misses valid setups that don't meet all criteria. Lowering the threshold increases trade frequency but decreases win rate. There is no "correct" threshold; it depends on your preference for fewer higher-quality signals vs. more signals with lower individual quality.
Regime Classification Lag
The ATR-based regime detection uses historical data (21 periods + 13-period smoothing). It cannot predict sudden volatility spikes. During flash crashes or black swan events, the strategy may be classified in the wrong regime for several bars before the classification updates. This is an inherent limitation of any lagging indicator.
Indicator Parameter Sensitivity
The default parameters (MACD 8/21/5, EMA 8/21/34, RSI 21, etc.) are tuned for BTC/ETH perpetuals on 5-minute charts during 2024 market conditions. Different assets, timeframes, or market regimes may require different parameters. There is no guarantee that parameters optimized on historical data will perform similarly in the future.
BTC Dominance Filter Limitations
The CRYPTOCAP:BTC.D data feed may lag during low-liquidity periods or weekends. The dominance slope calculation uses a 5-bar SMA, adding additional delay. If you notice the filter behaving unexpectedly, consider disabling it.
Backtest vs. Live Execution Differences
TradingView backtesting does not replicate actual broker execution. Key differences:
Backtests assume perfect fills at calculated prices; real execution involves order book depth, latency, and partial fills
The calc_on_every_tick setting improves backtest realism but still cannot capture sub-bar price action or order book dynamics
Commission and slippage settings are estimates; actual costs vary by exchange, time of day, and market conditions
Funding rates on perpetual futures are not modeled in backtests and can significantly impact profitability over time
Exchange-specific limitations (position limits, liquidation mechanics, order types) are not modeled
Market Condition Dependencies
This strategy is designed for trending and breakout conditions. During extended sideways consolidation with no clear direction, the strategy may generate few signals or experience whipsaws. No strategy performs well in all market conditions.
Cryptocurrency-Specific Risks
Cryptocurrency markets operate 24/7 without session boundaries. This means:
No natural "overnight" risk reduction
Volatility can spike at any time
Liquidity varies significantly by time of day
Exchange outages or issues can occur at any time
WHAT THIS STRATEGY DOES NOT DO
To be straightforward about limitations:
This strategy does not guarantee profits. Past backtest performance does not indicate future results.
This strategy does not predict the future. It reacts to current conditions based on historical patterns.
This strategy does not account for funding rates, which can significantly impact perpetual futures profitability.
This strategy does not model exchange-specific execution issues (partial fills, requotes, outages).
This strategy does not adapt to fundamental news events or black swan scenarios.
This strategy is not optimized for all market conditions. It may underperform during extended consolidation.
IMPORTANT RISK WARNINGS
Past performance does not guarantee future results. The backtest results shown reflect specific historical market conditions and parameter settings. Markets change constantly, and strategies that performed well historically may underperform or lose money in the future. A single backtest run does not constitute proof of future profitability.
Trading involves substantial risk of loss. Cryptocurrency derivatives are highly volatile instruments. You can lose your entire investment. Only trade with capital you can afford to lose completely.
This is not financial advice. This strategy is provided for educational and informational purposes only. It does not constitute investment advice, trading recommendations, or any form of financial guidance. The author is not a licensed financial advisor.
You are responsible for your own decisions. Before using this strategy with real capital:
Thoroughly understand the code and logic by reading the open-source implementation
Forward test with paper trading or very small positions for an extended period
Verify that commission, slippage, and execution assumptions match your actual trading environment
Understand that live results will differ from backtest results
Consider consulting with a qualified financial advisor
No guarantees or warranties. This strategy is provided "as is" without any guarantees of profitability, accuracy, or suitability for any purpose. The author is not responsible for any losses incurred from using this strategy.
OPEN-SOURCE CODE STRUCTURE
The strategy code is organized into these sections for readability:
Configuration Architecture: Input parameters organized into logical groups (Core Controls, Optimization Constants, Regime Intelligence, Signal Pathways, Risk Architecture, Visualization)
Helper Functions: calcQty() for position sizing, clamp01() and normalize() for value normalization, calcMFI() for Money Flow Index calculation
Core Indicator Engine: EMA ribbon, ATR and regime classification, MACD with adaptive baseline, RSI, MFI, volume analytics, cycle oscillator, BTC dominance filter, squeeze detection
Signal Pathway Logic: Trend break, momentum surge, squeeze release, micro pullback pathways with composite scoring
Entry/Exit Orchestration: Signal filtering, position sizing, entry execution, stop/target calculation, trailing stop logic, momentum fail-safe exits
Visualization Layer: EMA plots, regime background, bar coloring, signal labels, dashboard table
You can read and modify any part of the code. Understanding the logic before deployment is strongly recommended.
- Made with passion by officialjackofalltrades
MES ORB Bulletproof + PSAR + SMA200 + BB(21) by PantelisMES ORB Bulletproof + PSAR + SMA200 + BB(21) by Pantelis
Elite MTF EMA Reclaim StrategyThis script is a 6-minute execution MTF EMA “retest → reclaim” strategy. It looks for trend-aligned pullbacks into fast EMAs, then enters when price reclaims and (optionally) retests the reclaim level—while filtering out chop (low trend strength/volatility or recent EMA20/50 crosses) and enforcing higher-timeframe alignment (Daily + 1H, or whichever you select).
How to use
Run it on a 6-minute chart (that’s what the presets are tuned for).
Pick your Market (Forex / XAUUSD / Crypto / Indices) and a Preset:
Elite = strictest, cleanest (fewer signals)
Balanced = middle ground
Aggressive = most signals, loosest filters
Set HTF Alignment Mode:
D + H1 (recommended) for highest quality
Off if you want more trades / LTF-only testing
Leave Kill Chop = ON (recommended). If you’re not getting trades, this is usually the blocker.
Choose entry behavior:
If Require Retest = true, entries happen on the retest after reclaim (cleaner, later).
If Require Retest = false, entries trigger on reclaim using Reclaim Timing Default:
“Preset” uses the strategy’s recommended default per market/preset
or force Reclaim close / Next bar confirmation
For backtesting, keep Mode = Strategy (Backtest). For alerts/visual-only, set Mode = Indicator (Signals Only).
Use Show Signals (All Modes) to toggle triangles on/off without affecting trades.
Tip: If TradingView says “not enough data,” switch symbol history to “All,” reduce HTF alignment (try H1 only), or backtest a more recent date range.
GMACD MTF EMA14 Strategy (1H TF)GMACD MTF EMA14 Strategy (1H TF) - FINAL SAFE
Overview
The GMACD MTF EMA14 Strategy is a multi-timeframe momentum trading strategy designed for the 1-hour timeframe. It combines a custom GMACD (Geometric MACD) with multi-timeframe EMA14 alignment to generate high-probability long and short trade signals. The strategy includes state-controlled entries and unique alerts to ensure trades are executed only once per confirmed setup.
Key Components
GMACD Core
Uses a custom geometric MACD formula with fast (12), slow (26), and smooth (14) lengths.
Signal line is an EMA of the GMACD with a length of 9.
GMACD normalizes price movement against the daily range (high-low), making it more sensitive to momentum changes.
Multi-Timeframe EMA14 Filter (MTF)
EMA14 is calculated on 15m, 30m, and 1H timeframes.
Bullish alignment: price closes above at least 2 of the 3 EMAs.
Bearish alignment: price closes below at least 2 of the 3 EMAs.
Acts as a trend filter, ensuring trades align with broader momentum.
Signal Conditions
Long Entry: GMACD > Signal AND EMA14 bullish alignment.
Short Entry: GMACD < Signal AND EMA14 bearish alignment.
Signals are triggered only when both momentum and trend conditions are met.
State-Controlled Alerts & Entries
Ensures unique entries per trade condition.
Alerts notify traders of confirmed setups with detailed reasoning:
"GMACD LONG | MACD > Signal | EMA14 aligned (15m,30m,1H)"
"GMACD SHORT | MACD < Signal | EMA14 aligned (15m,30m,1H)"
Avoids repeated alerts during ongoing trades.
Momentum + Trend Confluence: Combines momentum (GMACD) with trend alignment (MTF EMA14) to improve trade quality.
Multi-Timeframe Confirmation: Reduces false signals by requiring at least 2 timeframes to confirm trend direction.
Automated Alerts: Traders receive instant notifications when setups occur.
Safe Execution: State-controlled logic prevents repeated entries and false signals.
Customizable: All key parameters (GMACD lengths, EMA length, timeframes) can be adjusted for optimization.
Visual Reference: GMACD and Signal plotted on the chart for quick visual confirmation.
How Traders Can Use This Strategy
Intraday or Swing Trading (1H TF)
Ideal for 1-hour charts, capturing medium-term momentum moves.
Signal Confirmation
Use the dashboard plot (GMACD vs Signal) and EMA alignment to confirm trade direction.
Alerts for Active Monitoring
Traders can set alerts to receive notifications without constantly watching the charts.
Risk Management
Since the strategy ensures trades align with multi-timeframe trend, stop-loss placement and position sizing can be optimized based on volatility or account risk tolerance.
Summary
The GMACD MTF EMA14 Strategy is a robust and safe momentum trading tool for traders who want:
Multi-timeframe confirmation
Unique, actionable alerts
Momentum-based trade entries with trend filter
It’s especially suitable for traders looking for mechanical entries in trending markets, reducing emotional decisions while capturing high-probability trades.
Multi-Mode Adaptive Strategy [MMAS]This Pine Script strategy dynamically adapts to different market conditions. Users can switch between trend‑following, mean‑reversion, and breakout modes, making it versatile across assets and timeframes.
Key Metrics:
- BTCUSDT / 1D → Return: +42.5%, Sharpe: 1.8, Max Drawdown: -12.3%, Win Rate: 61%
- XAGUSD / 1H → Return: +18.7%, Sharpe: 1.4, Max Drawdown: -8.5%, Win Rate: 58%
- EURUSD / 4H → Return: +25.2%, Sharpe: 1.6, Max Drawdown: -10.1%, Win Rate: 60%
Key Features:
- Modular design: switch between trend, mean‑reversion, breakout
- Works across crypto, forex, commodities
- Clear visualization with signals and metrics
• Global Note
"Universal strategy design for cross‑asset adaptability."
• Tags
trend, mean‑reversion, breakout, multi‑asset, adaptive strategy, pine script
CK INDEX Strategy Open-source code, Free, No Cost.Aqui está a tradução fiel e técnica para o inglês, ideal para a descrição do seu script no TradingView:
### 1. Requirements (The 3 Principles)
1. **Study** the code.
2. **Modify** the code.
3. **Distribute** copies or derivative versions (respecting the original credits).
Description: Direction and Strength — CK Index
The **CK Index** is a composite indicator formed by the conceptual sum of two CCIs and the PVT (Price Volume Trend) with an arithmetic mean. Its function is to simultaneously validate direction and accumulated flow.
For a **buy operation**, both CCIs must be above zero, indicating bullish dominance across different time horizons, and the PVT must be above its average. For a **sell operation**, the CCIs must be below zero and the PVT below its average.
It is important to emphasize that it acts as an **entry trigger**: the candle will turn **blue** to indicate a buy, **yellow** for a sell, and **white** when there is neutrality (meaning the color will be white when there is no clear definition—these are my personal settings). In its default form, it uses **green, red, and gray**, respectively.
Good trades, and make the world a better and freer place!
ICT FVG MNQ (Fixed Stop + Multi-TP Toggles)use- 18 min timeframe.
ICT FVG - use on MNQ 18 min time frame.
it has muti TP levels.-
Prop firm compatible.
Enjoy trading
VWAP Breakout NY Open Only vwap breakout targeting multiday taking only 2 trades per day in the first 2 hours of ny session
ICT FVG MNQ (Fixed Stop + Multi-TP Toggles)ICT FVG
use-18 Min timeframe
0) Stabilizer
Evaluation Mode: PriceCh... (PriceChange mode selected)
Bypass Session Filter: OFF (unchecked)
Bypass Open Delay: OFF
Bypass Cooldown: OFF
1) Entry Logic
Swing Strength (past-only): 4
FVG Min Size (ticks): 8
FVG Expire Bars: 12
2) Risk Management
Contracts (integer): 10
Hard Stop (ticks): 65
Use Trailing Stop: OFF
Trail Activation (ticks): 30
Trail Offset (ticks): 15
Use BreakEven (only with Trailing): OFF
BE Trigger (ticks): 20
BE Plus (ticks): 2
Cooldown Bars: 3
Market Open Delay (minutes): 2
2B) Multi Take Profit (No Trailing)
Use TP1/TP2/TP3 when Trailing OFF: ON (checked)
Enable TP1: ON
Enable TP2: ON
Enable TP3: OFF
TP1 Ticks: 29
TP2 Ticks: 54
TP3 Ticks: 54
TP1 %: 30
TP2 %: 60
TP3 %: 30
Move SL to Entry when TP2 fills: OFF (unchecked)
2C) Safety Exits
Force Exit at Session End: ON (checked)
(A “Max Bars In Trade” box is partially visible but not fully shown.)
3) Sessions
Timezone (IANA): America/New... (looks like America/New_York)
Enable Session 1: ON
S1 Start: 0 : 00
S1 End: 16 : 55
Enable Session 2: OFF
(Values shown: S2 Start 18:02, S2 End 23:55, but session 2 is disabled)
4) Visual
Show FVG Zones: ON
Show Dashboard: ON
Dashboard Position: TopRight
HMA 9/50 Crossover + RSI 50 Filter1. The Core Indicators
HMA 9 (Fast): Acts as the primary trigger line. Its unique calculation minimizes lag compared to standard moving averages, allowing for faster entries.
HMA 50 (Slow): Defines the medium-term trend direction and acts as the "anchor" for crossover signals.
RSI 14: Serves as a "momentum gate." Instead of traditional overbought/oversold levels, we use the 50 midline to confirm that the directional strength supports the crossover.
2. Entry Conditions
Long Entry: Triggered when the HMA 9 crosses above the HMA 50 AND the RSI is greater than 50.
Short Entry: Triggered when the HMA 9 crosses below the HMA 50 AND the RSI is less than 50.
3. Execution & Reversal
This strategy is currently configured as an Always-in-the-Market system.
A "Long" position is automatically closed when a "Short" signal is triggered.
To prevent "pyramiding" (buying multiple positions in one direction), the script checks the current position_size before opening new entries.
How to Use
Timeframe: Optimized for 3-minute (3m) candles but can be tuned for 1m to 15m scalping.
Settings: Use the Inputs panel to adjust HMA lengths based on the volatility of your specific asset (e.g., shorter for stable stocks, longer for volatile crypto).
Visuals:
Aqua Line: HMA 9
Orange Line: HMA 50
Green Background: Bullish RSI Momentum (> 50)
Red Background: Bearish RSI Momentum (< 50)
Risk Disclosure
Whipsaws: This strategy is likely to underperform in sideways markets.
Backtesting: Past performance does not guarantee future results. Always test this strategy in the Strategy Tester with appropriate commission and slippage settings before live use.
ETH Dynamic Risk Strategy# ETH Dynamic Risk Strategy - Publication Description
## Overview
The ETH Dynamic Risk Strategy is a systematic approach to accumulating Ethereum during bear markets and distributing during bull markets. It combines multiple risk indicators into a single composite metric (0-1 scale) that identifies optimal buying and selling zones based on market conditions.
## Key Features
• **Multi-Component Risk Metric**: Combines 4 weighted indicators to assess market conditions
• **Tiered Buy/Sell System**: 3 levels of buy signals (L1, L2, L3) and 3 levels of sell signals based on risk thresholds
• **Configurable Filters**: Optional buy filters to reduce signal frequency by 30-50%
• **Visual Risk Zones**: Color-coded risk metric plot with clear threshold lines
• **Comprehensive Dashboard**: Real-time statistics including position size, P/L, and component scores
## How It Works
### Risk Components (Configurable Weights)
1. **Log Return from ATH** (Default: 35%)
- Tracks drawdown from all-time high over lookback period
- Deep drawdowns (-70% to -90%) = low risk / buying opportunity
- Near ATH (0% to -20%) = high risk / selling opportunity
2. **ETH/BTC Ratio** (Default: 25%)
- Measures ETH strength relative to Bitcoin
- Below historical average = ETH undervalued = low risk
- Above historical average = ETH overvalued = high risk
3. **Volatility Regime** (Default: 20%)
- Compares current volatility to long-term average
- Compressed volatility at lows = opportunity
- Expanded volatility at highs = danger
4. **Trend Strength** (Default: 20%)
- Uses multiple EMA alignment and slope analysis
- Strong downtrends = low risk scores
- Strong uptrends = high risk scores
### Trading Logic
**Buy Signals:**
- L1: Risk ≤ 0.30 → Buy $100 (default)
- L2: Risk ≤ 0.20 → Buy $250 total
- L3: Risk ≤ 0.10 → Buy $450 total
**Sell Signals (Sequential):**
- L1: Risk ≥ 0.75 → Sell 25% of position
- L2: Risk ≥ 0.85 → Sell 35% of remaining
- L3: Risk ≥ 0.95 → Sell 40% of remaining
**Buy Filters (Optional):**
- Minimum days between buys (prevents clustering)
- Minimum risk drop required (ensures falling risk)
- Toggle on/off to compare performance
## Settings Guide
### Risk Components
Toggle individual components on/off and adjust their weights. Total weight is automatically normalized. Experiment with different combinations to match your market view.
### Advanced Settings
- ATH Lookback: How far back to look for all-time highs (500-2000 recommended)
- Volatility Period: Window for volatility calculations (40-100 recommended)
- ETH/BTC MA Period: Moving average for ratio comparison (100-300 recommended)
- Trend Period: Base period for trend calculations (50-150 recommended)
### Trading Thresholds
Customize buy/sell trigger points and position sizes. Lower buy thresholds = more aggressive accumulation. Higher sell thresholds = holding longer into bull markets.
### Buy Filters
- Enable/disable filtering system
- Min Days Between Buys: Spacing between purchases (1-3 recommended)
- Min Risk Drop: How much risk must fall (-0.001 to -0.01 range)
## Best Practices
• **Timeframe**: Works best on daily (1D) and 3-day (3D) charts
• **Initial Capital**: Set based on your DCA budget (default $10,000)
• **Backtest First**: Test different parameter combinations on historical data
• **Position Sizing**: Adjust buy amounts to match your risk tolerance
• **Monitor Filters**: Check "Filtered Buys" stat to ensure filter isn't too strict
## Use Cases
- Long-term ETH accumulation strategy
- Systematic DCA with market-adaptive buying
- Risk-based portfolio rebalancing
- Educational tool for understanding crypto market cycles
## Disclaimer
This strategy is for educational purposes only. Past performance does not guarantee future results. Cryptocurrency trading involves substantial risk. The strategy uses historical price action and technical indicators which may not predict future movements. Always do your own research and never invest more than you can afford to lose.
## Credits
Strategy concept and development by nakphanan with assistance from Claude AI (Anthropic). Built using Pine Script v5....Mostly from Claude AI!!!
## Version History
v7.0 - Initial release with 4-component risk metric, tiered trading system, and optional buy filters
RSI Ladder TP Strategy v1.0 Overview
This strategy is an RSI-based reversal entry system with a ladder-style take-profit mechanism.
It supports Long-only, Short-only, or Both directions and provides optional Average Entry Price, Stop Loss, and Take Profit reference lines on the chart.
Entry Rules
Long Entry: RSI crosses above the Oversold level (default: 20).
Short Entry: RSI crosses below the Overbought level (default: 80).
Optional: If enabled, the script will close the current position when an opposite signal appears before opening a new one.
Exit Rules (Ladder Take Profit)
Take profit is placed as a ladder using tpLevels and tpStepPct.
Example (default tpStepPct = 1%, tpLevels = 10):
TP1 at +1%, TP2 at +2%, … TP10 at +10% (relative to current average entry price).
Each TP level closes tpClosePct of the remaining position, meaning it scales out geometrically:
If tpClosePct = 50% → remaining position becomes 50%, then 25%, then 12.5%, etc.
Stop Loss
Optional stop loss is placed at slPct (%) away from the average entry price:
Long: avg * (1 - slPct%)
Short: avg * (1 + slPct%)
Visual Lines
Average Entry Price Line: current strategy.position_avg_price
Stop Loss Line: based on slPct
Next TP Line: shows the estimated next TP level based on current profit%
All TP Lines: optional (can clutter the chart)
==============================================================
Recommended Use
This strategy is best used on markets with strong mean-reversion behavior.
For exchanges/bots that do not support hedge mode in a single strategy, run two separate instances:
One set to Long Only
One set to Short Only
TradingView Alert Adapter for AlgoWayTRALADAL is a universal TradingView alert adapter designed for traders who work with indicators and want to test and automate indicator-based signals in a structured way.
It allows users to convert indicator outputs into a TradingView strategy and forward the same logic through alerts for multi-platform execution via AlgoWay.
This script can be used as TradingView indicator automation, enabling traders to build a TradingView strategy from indicators and route TradingView alerts through an AlgoWay connector TradingView workflow for multi-platform execution.
Why this adapter is needed
Most TradingView indicators are not available as strategies.
Traders often receive visual signals or alerts but have no access to objective statistics such as win rate, drawdown, or profit factor.
This adapter solves that problem by providing a generic framework that transforms indicator signals into a backtestable strategy — without modifying indicator code and without requiring Pine Script knowledge.
Input source–based design (including closed indicators)
All conditions in TRALADAL are built using input sources, which means you can connect:
Event-based signals (1 / non-zero values, arrows, shapes)
Indicator lines and values (EMA, VWAP, RSI, MACD, etc.)
Outputs from invite-only or closed-source indicators
If an indicator produces a visible signal or alert-compatible output, it can be evaluated and tested using this adapter, even when the source code is locked.
Three-level signal logic
The strategy uses a three-layer condition model commonly applied in discretionary and systematic trading:
Signal — primary entry trigger
Confirmation — directional validation
Filter — additional noise reduction
Each level can be enabled independently and combined using AND / OR logic, allowing traders to test multi-indicator systems without writing complex scripts.
Risk management and alert execution
The adapter supports practical risk parameters:
Stop Loss (pips)
Take Profit (pips)
Trailing Stop (pips)
Two execution modes are available:
Strategy Mode — risk rules are applied inside the TradingView Strategy Tester
Alert Mode — risk parameters are embedded into structured TradingView alerts and handled by AlgoWay during execution
Position sizing follows TradingView conventions (percent of equity, cash, or contracts) to keep strategy results and alerts aligned.
Typical use cases
This TradingView alert adapter is intended for:
Indicator-based trading systems
Backtesting signals from closed or invite-only scripts
Comparing multiple indicators within a single strategy
Sending TradingView alerts to external trading platforms via AlgoWay
The adapter does not generate signals or trading recommendations.
Its purpose is to provide a transparent and testable workflow from indicator signals to TradingView alerts and automated execution.
GC/MGC VWAP Pullback + ADX Regime (Prop-Safe)GC / MGC VWAP Pullback + ADX Regime Strategy (Prop-Safe)
This strategy is designed specifically for Gold futures (GC & MGC) and prop firm trading, where capital preservation, consistency, and avoiding chop matter more than trade frequency.
The core philosophy is simple:
Only trade gold when it is expanding, aligned, and at the right location.
Strategy Concept
Gold moves in bursts, not constantly.
Most losses come from trading compression, VWAP chop, or late momentum.
This strategy filters those environments out and trades only:
Strong intraday momentum
Clear higher-timeframe direction
First pullbacks to VWAP
Clean price rejection with follow-through
It intentionally produces fewer but higher-quality trades.
Market Regime Filter (ADX)
ADX is evaluated on the 5-minute chart
This is the trade permission filter
ADX zones:
Below 18 → No trade (compression / chop)
20–35 → Optimal trading zone
35–45 → Caution (strong trend, reduced opportunity)
Above 45 → No new entries (late expansion / news risk)
ADX does not determine direction.
It only determines whether trading is allowed.
Direction Filter (Higher Timeframe)
Direction comes from the 1-Hour chart
EMA 20 above EMA 50 → Long bias only
EMA 20 below EMA 50 → Short bias only
Optional slope confirmation for additional strictness
No counter-trend trades.
Entry Logic (5-Minute Chart)
Trades are taken using a VWAP pullback continuation model.
Long Setup
ADX between 20–35
1H EMA 20 > EMA 50
Price pulls back to VWAP
Bullish rejection candle at VWAP
Entry on break of the rejection candle high
Short Setup
ADX between 20–35
1H EMA 20 < EMA 50
Price pulls back to VWAP from below
Bearish rejection candle at VWAP
Entry on break of the rejection candle low
All entries use stop orders, not market orders, to ensure follow-through.
Risk Management
Stop loss is placed beyond the rejection candle
Partial profit at 1R
Final target at 2R
No pyramiding
One clean setup is preferred over multiple trades
This structure aligns well with prop firm rules, trailing drawdowns, and consistency requirements.
What This Strategy Avoids
VWAP chop
Range-bound sessions
Overtrading
Late entries after news spikes
Counter-trend setups
If conditions are not ideal, no trade is the correct trade.
Best Use Case
Instruments: GC, MGC
Timeframe: 5-minute
Style: Intraday, prop-firm friendly
Ideal for traders who value:
Discipline
Structure
Capital protection
Jack Dunn (Mean Reversion, Z-score + Vol Filter + Trend Filter))based on mean reversion and z score
FOR 1M XAUUSD or 5M USDJPY
High-Probability Scalper (Market Open)Market open is where volatility is real, spreads are tight, and momentum shows itself early. This scalping strategy is built specifically to operate during that window, filtering out low-quality signals that usually appear later in the session.
Instead of trading all day, the logic is restricted to the first 90 minutes after market open, where continuation moves and fast pullbacks are more reliable.
What This Strategy Does
This script looks for short-term momentum alignment using:
Fast vs slow EMA structure
RSI confirmation to avoid chasing extremes
ATR-based risk control
Session-based filtering to trade only when volume matters
It’s designed for intraday scalping, not swing trading.
Core Trading Logic
1. Market Open Filter
Trades are allowed only between 09:30 – 11:00 exchange time.
This avoids low-liquidity chop and focuses on the period where most breakouts and reversals form.
2. Trend Confirmation
Bullish bias: 9 EMA crosses above 21 EMA
Bearish bias: 9 EMA crosses below 21 EMA
This keeps trades aligned with short-term direction instead of random entries.
3. Momentum Check (RSI)
RSI is used as a quality filter, not as an overbought/oversold signal.
Long trades only when RSI is strong but not extended
Short trades only when RSI shows weakness without exhaustion
This removes late entries and reduces whipsaws.
Entries & Exits
Entries
Executed only on confirmed candles
No intrabar repainting
One position at a time
Risk Management
Stop-loss based on ATR
Take-profit calculated using a fixed risk–reward ratio
Same structure for both long and short trades
This keeps risk consistent across different symbols and volatility levels.
Why This Strategy Works Better at Market Open
Volume is highest
False breakouts are fewer
EMA crosses have follow-through
RSI behaves more cleanly
By not trading all day, the strategy avoids most of the noise that kills scalpers.
Best Use Cases
Index futures
High-liquidity stocks
Major crypto pairs during active sessions
1m to 5m timeframes
What This Strategy Is NOT
Not a martingale
Not grid-based
Not designed for ranging markets
Not a “set and forget” system
It’s a controlled scalping template meant for disciplined execution.
How to Use It Properly
Test on multiple symbols
Adjust ATR length for volatility
Tune RSI ranges per market
Always forward-test before live alerts
Final Note
This strategy focuses on structure, timing, and risk, not indicator stacking.
If you trade the open, this gives you a clear framework instead of emotional entries.
If you want:
Alerts
Session customization
News filters
Partial exits
You can extend this logic without breaking the core system.
RSI Divergence Strategy BTCRSI Divergence Strategy | Clean
Type: Backtestable strategy
Logic: Uses divergences between price and RSI to generate signals.
LONG: Price makes a lower low, RSI makes a higher low → bullish divergence
SHORT: Price makes a higher high, RSI makes a lower high → bearish divergence
TP / SL: Automatic, based on configurable percentage and Risk/Reward ratio.
Display:
RSI visible in a separate panel
LONG/SHORT signals indicated by small triangles in the RSI panel
Goal: Identify price reversals using relative strength (RSI) and backtest precise trades.
SMA Crossover Strategy with Monte Carlo TunerCore logic
• Two signals:
• FAST SMA
• SLOW SMA
• Trade rule:
• FAST > SLOW → long
• FAST < SLOW → short
• Nothing else. No indicators stacked on top.
⸻
Two operating modes
1) Deterministic mode (baseline)
• MC = OFF
• You choose (fast, slow) explicitly (default 8/34)
• Behavior is stationary and repeatable
This is your control experiment.
⸻
2) Monte Carlo mode (adaptive discovery)
• MC = ON
• The script:
• Samples (fast, slow) pairs randomly from bounded integer ranges
• Simulates trades for each pair in parallel
• Tracks (gross profit, gross loss, trade count)
• Computes PF = GP / GL
• Promotes best-so-far online
Key point:
This is not grid search. It’s stochastic sampling with early stopping with time control (default 35 s)
Strategy-Based Breakout Backtest by AlturoiThis educational strategy is designed to help active traders learn how to turn trading ideas into data-driven decisions by testing strategies against historical price action before risking real capital.
The script walks through the step-by-step backtesting workflow on TradingView, showing how strategy logic, entries, exits, and risk rules translate into measurable performance metrics such as win rate, drawdown, and expectancy.
What this script helps you learn:
How to backtest on TradingView using Pine Script strategies
How the Strategy Tester calculates performance results
How to interpret win rate, drawdowns, and consistency
How to validate breakout and support/resistance concepts
How to identify structural edge — or flaws — before going live
This is not a signal service or financial advice. It is an educational framework meant to help traders understand proper backtesting techniques and avoid common mistakes when evaluating trading strategies.
Use this script as a learning template to experiment, modify logic, and improve your understanding of how professional backtesting on TradingView works.
A-Share Broad-Based ETF Dual-Core Timing System1. Strategy Overview
The "A-Share Broad-Based ETF Dual-Core Timing System" is a quantitative trading strategy tailored for the Chinese A-share market (specifically for broad-based ETFs like CSI 300, CSI 500, STAR 50). Recognizing the market's characteristic of "short bulls, long bears, and sharp bottoms," this strategy employs a "Left-Side Latency + Right-Side Full Position" dual-core driver. It aims to safely bottom-fish during the late stages of a bear market and maximize profits during the main ascending waves of a bull market.
2. Core Logic
A. Left-Side Latency (Rebound/Bottom Fishing)
Capital Allocation: Defaults to 50% position.
Philosophy: "Buy when others fear." Seeks opportunities in extreme panic or momentum divergence.
Entry Signals (Triggered by any of the following):
Extreme Panic: RSI Oversold (<30) + Price below Bollinger Lower Band + Bullish Candle Close (Avoid catching falling knives).
Oversold Bias: Price deviates more than 15% from the 60-day MA (Life Line), betting on mean reversion.
MACD Bullish Divergence: Price makes a new low while MACD histogram does not, accompanied by strengthening momentum.
B. Right-Side Full Position (Trend Following)
Capital Allocation: Aggressively scales up to Full Position (~99%) upon signal trigger.
Philosophy: "Follow the trend." Strike heavily once the trend is confirmed.
Entry Signals (All must be met):
Upward Trend: MACD Golden Cross + Price above 20-day MA.
Breakout Confirmation: CCI indicator breaks above 100, confirming a main ascending wave.
Volume Support: Volume MACD Golden Cross, ensuring price increase is backed by volume.
C. Smart Risk Control
Bear Market Exhaustion Exit: In a bearish trend (MA20 < MA60), the strategy does not "hold and hope." It immediately liquidates left-side positions upon signs of rebound exhaustion (breaking below MA20, touching MA60 resistance, or RSI failure).
ATR Trailing Stop: Uses Average True Range (ATR) to calculate a dynamic stop-profit line that rises with the price to lock in profits.
Hard Stop Loss: Forces a stop-loss if the left-side bottom fishing fails and losses exceed a set ATR multiple, preventing deep drawdowns.
3. Recommendations
Target Assets: High liquidity broad-based ETFs such as CSI 300 ETF (510300), CSI 500 ETF (510500), ChiNext ETF (159915), STAR 50 ETF (588000).
Timeframe: Daily Chart.






















