MACD 绿柱买入 红柱卖出Histogram Strategy逻辑解释:
1.买入条件:
当 MACD 的 Histogram 从负转正(由红柱变为绿柱)时,触发 strategy.entry('MACD_Buy', strategy.long),执行买入操作。
2.卖出条件:
当 MACD 的 Histogram 从正转负(由绿柱变为红柱)时,触发 strategy.close('MACD_Buy'),执行卖出操作。
3.绘图保持不变:
绿柱和红柱都正常显示,MACD 和信号线也正常绘制。
本策略仅供学习与参考,不构成投资建议
您不应该使用此策略进行真实交易,任何情况下使用此策略造成的损失本人概不负责
Logic Explanation:
Buy Condition:
When the MACD Histogram turns from negative to positive (from red bars to green bars), it triggers strategy.entry('MACD_Buy', strategy.long), executing a buy operation.
Sell Condition:
When the MACD Histogram turns from positive to negative (from green bars to red bars), it triggers strategy.close('MACD_Buy'), executing a sell operation.
Plotting remains unchanged:
Green and red bars are displayed correctly, and both the MACD and signal lines are plotted as usual.
Disclaimer:
This strategy is for educational and reference purposes only.
You should not use this strategy for real trading, and I am not responsible for any losses incurred from using this strategy under any circumstances.
Strategy!
Crypto Zilla Strategy 0.61Crypto Zilla Strategy 0.61 - Advanced Indicator Testing Framework
How often do you see an indicator that looks great at first glance, but you don't know if it will actually benefit you and be profitable? Now you have a way to test it.
Turn Any Indicator into a Profitable Trading System
Crypto Zilla Strategy is an advanced trading system designed to test and apply any indicators in live trading. Whether you're using popular third-party indicators or your own custom developments, this strategy enables you to quickly evaluate their effectiveness and convert signals into actionable trades.
Key Features:
✅ Universal Compatibility: Works with any indicator through three independent signal sources
✅ Bidirectional Reversal Trading: Supports both long and short positions
✅ Advanced Risk Management: Customizable Take Profit levels (up to 5 levels) and Stop Loss
✅ Signal Confirmation System: Improves accuracy and reduces false signals
✅ Cornix Integration: Optimized text alerts for automated trading via Cornix
✅ Webhook Trading: Enables direct automated trading through webhook connections to your exchange
✅ Professional Text Alerts: Detailed notifications including leverage, position size, and target levels
Designed For:
• Traders testing the effectiveness of their favorite indicators
• Strategy developers seeking a flexible trading system foundation
• Cryptocurrency investors aiming to automate trading
• Those improving market entry and exit accuracy
Convert your favorite indicators into a comprehensive trading system without writing complex code. CryptoZilla Strategy simplifies the process.
Disclaimer: THIS STRATEGY SCRIPT DOES NOT INCLUDE ANY INDICATORS! All indicators shown in example screenshots are third-party products, not owned or distributed by the author of this code.
This strategy is designed for educational purposes. Always perform thorough backtesting before applying it to live trading.
Ready to unlock the premium version of this strategy for your trading? Contact the developer on Telegram at @CyberBobCryptoAdmin to get started!
ORB Multi-Session Professional System
ORB Multi-Session Professional Trading Strategy (Open Beta)
## Strategy Overview
The ORB Multi-Session Professional is an advanced Opening Range Breakout (ORB) trading strategy designed to capture high-probability trading opportunities during the European and New York trading sessions. This sophisticated strategy leverages multiple technical filters and dynamic risk management to provide a robust approach to intraday trading.
## Key Strategy Features
### Dual Session Trading
- Trades both European (07:00 UTC) and New York (13:30 UTC) opening ranges
- Flexible configuration allows trading:
- Full sessions
- European session only
- New York session only
### Advanced Entry Conditions
- Breakout trading based on 15-minute opening range
- Long and short entries triggered by price breaking above/below the session's high/low
- Optional reversal trading capabilities
### Intelligent Risk Management
- Dynamic position sizing based on:
- ATR (Average True Range)
- Customizable risk percentage
- Multiple stop-loss calculation methods:
- Percentage of opening range
- ATR-based
- Fixed value
- Flexible take-profit strategies:
- Risk-to-reward ratio
- ATR-based
- Fixed value
- Optional trailing stop
### Comprehensive Filters
- Trend filter using EMA (configurable period)
- Volume filter to ensure market activity
- Range size filter to avoid low-volatility periods
- Customizable minimum and maximum range sizes
## Risk Control Mechanisms
- Maximum trades per day (1-5 configurable)
- Dynamic position sizing
- Multiple stop-loss and take-profit strategies
- Optional trailing stop functionality
## Visualization Features
- Highlights trading sessions
- Displays opening range levels
- Shows previous day's high and low
- Visual signals for trade entries
- Informative performance table
## Strategy Configuration Options
### General Settings
- Strategy type selection
- Opening range duration
- Dynamic position sizing
- Risk percentage per trade
- Maximum daily trades
### Risk Management
- Stop-loss types:
- Percentage
- ATR-based
- Fixed value
- Take-profit types:
- Risk-to-reward ratio
- ATR-based
- Fixed value
- No take-profit option
### Filters
- Trend filter
- Volume filter
- Range size constraints
### Session Management
- Time zone adjustments
- Session-specific offsets
- Individual session enabling/disabling
## Performance Tracking
- Accumulated profit tracking
- Winning and losing trade count
- Real-time performance statistics display
## Best Suited For
- Forex markets
- Futures markets
- High-liquidity instruments
- Traders seeking structured, rule-based entry and exit strategies
## Important Considerations
⚠️ **Disclaimer:**
- Backtesting and forward testing are crucial
- Past performance does not guarantee future results
- Always use proper risk management
- Adjust parameters to match your specific trading instrument and risk tolerance
## Recommended Setup
- Timeframe: 5-15-minute charts
- Recommended markets: Major currency pairs, stock indices, commodities
- Suggested initial settings can be customized based on specific trading goals
## Version
**Current Version:** 0.1
**Strategy Type:** Multi-Session Opening Range Breakout Trading System
**Developed:** 2025 by CarlosGV
AlgoTester by FelixTrade ver.1A universal strategy, a backtester that includes many indicators and advanced functionality.
included DCA with settings for purchase coefficients and distance to orders
includes various indicators: RSI, Macd, Roc, ATR, etc...
includes extended profitability and stop loss settings
Rally Base Drop SND Pivots Strategy [LuxAlgo X PineIndicators]This strategy is based on the Rally Base Drop (RBD) SND Pivots indicator developed by LuxAlgo. Full credit for the concept and original indicator goes to LuxAlgo.
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand trading system that detects pivot points based on Rally, Base, and Drop (RBD) candles. This strategy automatically identifies key market structure levels, allowing traders to:
Identify pivot-based supply and demand (SND) zones.
Use fixed criteria for trend continuation or reversals.
Filter out market noise by requiring structured price formations.
Enter trades based on breakouts of key SND pivot levels.
How the Rally Base Drop SND Pivots Strategy Works
1. Pivot Point Detection Using RBD Candles
The strategy follows a rigid market structure methodology, where pivots are detected only when:
A Rally (R) consists of multiple consecutive bullish candles.
A Drop (D) consists of multiple consecutive bearish candles.
A Base (B) is identified as a transition between Rallies and Drops, acting as a pivot point.
The pivot level is confirmed when the formation is complete.
Unlike traditional fractal-based pivots, RBD Pivots enforce stricter structural rules, ensuring that each pivot:
Has a well-defined bullish or bearish price movement.
Reduces false signals caused by single-bar fluctuations.
Provides clear supply and demand levels based on structured price movements.
These pivot levels are drawn on the chart using color-coded boxes:
Green zones represent bullish pivot levels (Rally Base formations).
Red zones represent bearish pivot levels (Drop Base formations).
Once a pivot is confirmed, the high or low of the base candle is used as the reference level for future trades.
2. Trade Entry Conditions
The strategy allows traders to select from three trading modes:
Long Only – Only takes long trades when bullish pivot breakouts occur.
Short Only – Only takes short trades when bearish pivot breakouts occur.
Long & Short – Trades in both directions based on pivot breakouts.
Trade entry signals are triggered when price breaks through a confirmed pivot level:
Long Entry:
A bullish pivot level is formed.
Price breaks above the bullish pivot level.
The strategy enters a long position.
Short Entry:
A bearish pivot level is formed.
Price breaks below the bearish pivot level.
The strategy enters a short position.
The strategy includes an optional mode to reverse long and short conditions, allowing traders to experiment with contrarian entries.
3. Exit Conditions Using ATR-Based Risk Management
This strategy uses the Average True Range (ATR) to calculate dynamic stop-loss and take-profit levels:
Stop-Loss (SL): Placed 1 ATR below entry for long trades and 1 ATR above entry for short trades.
Take-Profit (TP): Set using a Risk-Reward Ratio (RR) multiplier (default = 6x ATR).
When a trade is opened:
The entry price is recorded.
ATR is calculated at the time of entry to determine stop-loss and take-profit levels.
Trades exit automatically when either SL or TP is reached.
If reverse conditions mode is enabled, stop-loss and take-profit placements are flipped.
Visualization & Dynamic Support/Resistance Levels
1. Pivot Boxes for Market Structure
Each pivot is marked with a colored box:
Green boxes indicate bullish demand zones.
Red boxes indicate bearish supply zones.
These boxes remain on the chart to act as dynamic support and resistance levels, helping traders identify key price reaction zones.
2. Horizontal Entry, Stop-Loss, and Take-Profit Lines
When a trade is active, the strategy plots:
White line → Entry price.
Red line → Stop-loss level.
Green line → Take-profit level.
Labels display the exact entry, SL, and TP values, updating dynamically as price moves.
Customization Options
This strategy offers multiple adjustable settings to optimize performance for different market conditions:
Trade Mode Selection → Choose between Long Only, Short Only, or Long & Short.
Pivot Length → Defines the number of required Rally & Drop candles for a pivot.
ATR Exit Multiplier → Adjusts stop-loss distance based on ATR.
Risk-Reward Ratio (RR) → Modifies take-profit level relative to risk.
Historical Lookback → Limits how far back pivot zones are displayed.
Color Settings → Customize pivot box colors for bullish and bearish setups.
Considerations & Limitations
Pivot Breakouts Do Not Guarantee Reversals. Some pivot breaks may lead to continuation moves instead of trend reversals.
Not Optimized for Low Volatility Conditions. This strategy works best in trending markets with strong momentum.
ATR-Based Stop-Loss & Take-Profit May Require Optimization. Different assets may require different ATR multipliers and RR settings.
Market Noise May Still Influence Pivots. While this method filters some noise, fake breakouts can still occur.
Conclusion
The Rally Base Drop SND Pivots Strategy is a non-repainting supply and demand system that combines:
Pivot-based market structure analysis (using Rally, Base, and Drop candles).
Breakout-based trade entries at confirmed SND levels.
ATR-based dynamic risk management for stop-loss and take-profit calculation.
This strategy helps traders:
Identify high-probability supply and demand levels.
Trade based on structured market pivots.
Use a systematic approach to price action analysis.
Automatically manage risk with ATR-based exits.
The strict pivot detection rules and built-in breakout validation make this strategy ideal for traders looking to:
Trade based on market structure.
Use defined support & resistance levels.
Reduce noise compared to traditional fractals.
Implement a structured supply & demand trading model.
This strategy is fully customizable, allowing traders to adjust parameters to fit their market and trading style.
Full credit for the original concept and indicator goes to LuxAlgo.
Cruzamentos de EMAs 8, 20 e 50📈 Strategy Overview: EMA 8/20/50 Crossover System
This strategy uses a combination of EMA crossovers to identify and trade medium-term trend reversals, both long and short. It enters positions in two stages and exits them similarly, allowing for flexible scaling and better risk control.
🔧 Customizable Settings
Initial Capital: User-defined (default: $10,000)
Start Date: Customizable execution start date to control backtest range
🟩 Entry Conditions
LONG Entries:
Buy 60% of capital when EMA 8 crosses above EMA 20
Buy 40% of capital when EMA 8 crosses above EMA 50
SHORT Entries:
Sell short 60% of capital when EMA 8 crosses below EMA 20
Sell short 40% of capital when EMA 8 crosses below EMA 50
🟥 Exit Conditions
LONG Exits:
Close 60% of position when EMA 8 crosses below EMA 20
Close 40% of position when EMA 20 crosses below EMA 50
SHORT Exits:
Cover 60% of short when EMA 8 crosses above EMA 20
Cover 40% of short when EMA 20 crosses above EMA 50
🎯 Strategy Notes
All trades execute only after the user-defined start date
Uses strategy.percent_of_equity for dynamic capital allocation
Suitable for trend-following setups in stocks, crypto, or forex
RCI Strategy [PineIndicators]RCI Strategy
This strategy leverages the Rank Correlation Index (RCI) — a statistical oscillator that measures the relationship between time and price rank — combined with a configurable moving average filter. It offers clean, rule-based entries and exits, and visually enhanced trade tracking via labeled markers and boxes on the chart.
The RCI Strategy is well-suited for momentum traders looking to capture directional shifts with confirmation through RCI smoothing.
Core Logic
1. Rank Correlation Index (RCI)
Measures how closely price changes correlate with time rankings.
Values range between -100 and +100.
Thresholds at ±80 help identify potential reversals or extremes.
2. RCI Smoothing via Moving Average
A moving average (MA) is applied to the RCI to smooth out fluctuations.
Supported MA types:
SMA
EMA
SMMA (RMA)
WMA
VWMA
Users can disable the smoothing by selecting "None".
Trade Entry Logic
Long Entry: RCI crosses above the selected moving average.
Short Entry: RCI crosses below the moving average.
Entries are restricted by trade direction settings:
Long Only
Short Only
Long & Short
Visual Features
RCI Panel Display
Plots RCI line and its moving average in a separate pane.
Horizontal guide lines at 0, +80, and -80 help visualize signal zones.
Trade Labels on Chart
Buy Label: Plotted when a long entry is executed.
Close Label: Plotted when any position is closed.
Triangle markers for visual emphasis on direction change.
Trade Visualization Boxes
A colored box is drawn between entry and exit prices.
Green = profitable trade; Red = losing trade.
Two horizontal lines connect entry and exit prices for reference.
Customization Parameters
RCI Source: Select input price for the RCI (default: close).
RCI Length: Set sensitivity of the oscillator.
MA Type and Length: Choose and configure the smoothing filter.
Trade Direction Mode: Define whether to allow Long, Short, or both.
Use Cases
Swing traders who want to trade directional reversals with statistical backing.
Traders seeking a clean and visual strategy based on rank momentum.
Environments where both trend and range dynamics occur.
Conclusion
The RCI Strategy is a non-repainting, rule-based trading model that combines rank correlation momentum with smoothed trend logic. Its clean visual markers, labeled trades, and flexible MA filters make it a valuable tool for discretionary and systematic traders alike.
Parabolic RSI Strategy [ChartPrime × PineIndicators]This strategy combines the strengths of the Relative Strength Index (RSI) with a Parabolic SAR logic applied directly to RSI values.
Full credit to ChartPrime for the original concept and indicator, licensed under the MPL 2.0.
It provides clear momentum-based trade signals using an innovative method that tracks RSI trend reversals via a customized Parabolic SAR, enhancing traditional oscillator strategies with dynamic trend confirmation.
How It Works
The system overlays a Parabolic SAR on the RSI, detecting trend shifts in RSI itself rather than on price, offering early reversal insight with visual and algorithmic clarity.
Core Components
1. RSI-Based Trend Detection
Calculates RSI using a customizable length (default: 14).
Uses upper and lower thresholds (default: 70/30) for overbought/oversold zones.
2. Parabolic SAR Applied to RSI
A custom Parabolic SAR function tracks momentum within the RSI, not price.
This allows the system to capture RSI trend reversals more responsively.
Configurable SAR parameters: Start, Increment, and Maximum acceleration.
3. Signal Generation
Long Entry: Triggered when the SAR flips below the RSI line.
Short Entry: Triggered when the SAR flips above the RSI line.
Optional RSI filter ensures that:
Long entries only occur above a minimum RSI (e.g. 50).
Short entries only occur below a maximum RSI.
Built-in logic prevents new positions from being opened against trend without prior exit.
Trade Modes & Controls
Choose from:
Long Only
Short Only
Long & Short
Optional setting to reverse positions on opposite signal (instead of waiting for a flat close).
Visual Features
1. RSI Plotting with Thresholds
RSI is displayed in a dedicated pane with overbought/oversold fill zones.
Custom horizontal lines mark threshold boundaries.
2. Parabolic SAR Overlay on RSI
SAR dots color-coded for trend direction.
Visible only when enabled by user input.
3. Entry & Exit Markers
Diamonds: Mark entry points (above for shorts, below for longs).
Crosses: Mark exit points.
Strategy Strengths
Provides early momentum reversal entries without relying on price candles.
Combines oscillator and trend logic without repainting.
Works well in both trending and mean-reverting markets.
Easy to configure with fine-tuned filter options.
Recommended Use Cases
Intraday or swing traders who want to catch RSI-based reversals early.
Traders seeking smoother signals than price-based Parabolic SAR entries.
Users of RSI looking to reduce false positives via trend tracking.
Customization Options
RSI Length and Thresholds.
SAR Start, Increment, and Maximum values.
Trade Direction Mode (Long, Short, Both).
Optional RSI filter and reverse-on-signal settings.
SAR dot color customization.
Conclusion
The Parabolic RSI Strategy is an innovative, non-repainting momentum strategy that enhances RSI-based systems with trend-confirming logic using Parabolic SAR. By applying SAR logic to RSI values, this strategy offers early, visualized, and filtered entries and exits that adapt to market dynamics.
Credit to ChartPrime for the original methodology, published under MPL-2.0.
RSI + Bollinger Bands Pro (No Repaint) v5📘 RSI + Bollinger Bands Pro (No Repaint) v5
🧠 Overview
The RSI + Bollinger Bands (No Repaint) v5 strategy combines two classic technical indicators — the Relative Strength Index (RSI) and Bollinger Bands — to identify high-probability reversal zones. The strategy only generates signals when both indicators align in overbought or oversold conditions, providing a powerful confluence filter.
It opens a long position when:
RSI crosses above the 50 line (momentum shift upward), and
Price crosses up through the lower Bollinger Band.
It opens a short position when:
RSI crosses below the 50 line (momentum shift downward), and
Price crosses down through the upper Bollinger Band.
All signals are based on confirmed bar closes (using the previous candle), ensuring that no repainting occurs after a bar is finalized.
⚙️ Inputs
Parameter Description
Momentum Length RSI period used to detect momentum shifts (default: 6)
Bands Length Period of the central moving average for Bollinger Bands (default: 200)
Bands Width Multiplier Standard deviation multiplier for band width (default: 2.0)
Highlight Candles? Colors the candles green or red on valid signals
Background Tint? Adds a soft background color on signal zones
📊 Visual Guide
Orange Line: central moving average of the Bollinger Bands (neutral zone)
Purple Channel: dynamic volatility envelope (standard deviation bands)
Green/Red Candles: confirmed long or short signals
Purple Fill: high-probability reversal area
✅ Key Benefits
100% Non-Repainting: Signals are locked in after candle close — no false entries.
Clean & Intuitive Display: Highlights only meaningful, high-confluence signals.
Dual Condition Filtering: RSI and Bollinger Band triggers must align.
ML Adaptive NQ Strategy - Apex 300KStrategy Description: ML Adaptive NQ Strategy - Apex 300K
Overview
The ML Adaptive NQ Strategy - Apex 300K is a sophisticated, machine-learning-driven trading strategy designed for the E-mini Nasdaq-100 futures (NQ) on TradingView, optimized for automated execution via PickMyTrade with Tradovate. This strategy leverages a trained 8-6-1 neural network to predict price movements, combining advanced technical analysis, adaptive risk management, and real-time performance tracking to deliver consistent, high-probability trading opportunities. For optimal performance, this strategy is specifically engineered for the 5-minute chart using Heikin Ashi candles, which smooth price action and enhance signal clarity, making it ideal for capturing short-term trends in the fast-moving Nasdaq-100 futures market.
Core Features
Neural Network Prediction: Utilizes an 8-6-1 neural network, externally trained with historical NQ data using Python (TensorFlow), to process eight key market features: Rate of Change (ROC), momentum, relative volume, Relative Strength Index (RSI), MACD histogram, Bollinger Band width, price position, and volume force. The trained weights ensure precise predictions for long and short entries, outperforming random initialization.
Optimized for 5-Minute Heikin Ashi: The strategy performs best on the 5-minute chart with Heikin Ashi candles, as this timeframe and candle type reduce noise, highlight trends, and align with the neural network’s feature calculations, maximizing signal accuracy and trade frequency.
Dynamic Entry Conditions: Trades are triggered based on neural network predictions exceeding customizable thresholds (pred_threshold_long = 0.60, pred_threshold_short = 0.40 by default), combined with an EMA-based trend filter (21-period EMA minus 55-period EMA) and a volume filter (default 1.2x 20-period SMA). To increase trade frequency, users can adjust thresholds to 0.55 (long) and 0.45 (short) or lower the volume filter to 0.8, as optimized via TradingView’s strategy tester.
Adaptive Risk Management: Employs ATR-based position sizing (14-period ATR, 0.8x multiplier by default) to limit risk to $4,000 per trade, with a profit/loss ratio of 2.5:1. Stop losses and take profits are dynamically set, with trailing stops activated at 0.5x stop distance to lock in profits. Pyramiding is supported up to 6 contracts, with a maximum drawdown threshold of $7,500 and a profit target of $20,000.
Performance Dashboard: A real-time dashboard displays critical metrics, including net profit/loss, win rate, drawdown, total trades, maximum consecutive losses, and current position (Long, Short, or Flat), enabling traders to monitor strategy health at a glance.
Automated Alerts: Integrates with PickMyTrade for seamless automation in Tradovate, with alerts for trade execution, closure, and position changes. Take-profit and stop-loss prices are plotted for easy integration into alert messages.
Trading Philosophy
The ML Adaptive NQ Strategy - Apex 300K is designed for traders seeking a data-driven, automated approach to trading NQ futures. By combining a machine-learned neural network with robust technical indicators and dynamic risk controls, the strategy adapts to changing market conditions, balancing accuracy and trade frequency. The use of Heikin Ashi candles on the 5-minute chart is critical, as it minimizes false signals and enhances the neural network’s predictive power, making it particularly effective for intraday trading in volatile markets like the Nasdaq-100.
Customization and Optimization
Trade Frequency: To increase trades, lower volFilter to 0.8 and set pred_threshold_long to 0.55 and pred_threshold_short to 0.45, as validated by TradingView’s strategy tester.
Risk Parameters: Adjust riskPerTrade, atrMultiplier, or profitFactor to tailor risk/reward profiles to your trading style.
Timeframe Caution: While the strategy can operate on other timeframes, the 5-minute Heikin Ashi chart is strongly recommended for optimal alignment with the neural network’s training data and feature calculations. Using other timeframes or candle types (e.g., standard candlesticks) may reduce accuracy.
Manual Trading Periods: The strategy allows trading at any time, with no built-in time restrictions, enabling flexibility for global traders. Users must manually manage no-trading periods (e.g., weekends, low-liquidity hours) via TradingView settings or PickMyTrade controls to avoid unwanted trades.
Performance Expectations
Backtesting on the 5-minute Heikin Ashi chart demonstrates the strategy’s ability to capture short-term trends with a favorable win rate and controlled drawdown, thanks to the trained neural network and adaptive risk management. Performance metrics (net profit, win rate, drawdown) are displayed in real-time, allowing traders to assess effectiveness and optimize parameters. For best results, backtest over at least 3 years of historical data to align with the neural network’s training period (May 10, 2022, to May 9, 2025).
Integration and Execution
TradingView Setup: Deploy the strategy on TradingView’s Pine Editor, ensuring the chart is set to 5-minute Heikin Ashi candles for NQ futures. Compile and add to the chart to activate.
PickMyTrade Automation: Configure alerts (Long Trade Executed, Short Trade Executed, Trade Closed, Position Change) in TradingView and link to PickMyTrade for automated execution in Tradovate. Include tpPrice and slPrice in alert messages for precise trade management.
Data Source: The strategy aligns with daily data from yfinance used in training. Verify TradingView’s NQ futures data matches for consistency (check Yahoo Finance).
Intraday Optimization: For enhanced intraday performance, consider retraining the neural network with 5-minute data using a paid API like FirstRateData to further align with the strategy’s 5-minute Heikin Ashi focus.
Conclusion
The ML Adaptive NQ Strategy - Apex 300K is a cutting-edge, neural-network-powered trading system tailored for NQ futures, delivering high-probability trades with robust risk management and real-time performance insights. Its performance is optimized for the 5-minute chart with Heikin Ashi candles, leveraging smoothed price action to enhance signal accuracy and trade frequency. Ideal for traders seeking automated, data-driven strategies, this system integrates seamlessly with PickMyTrade for Tradovate execution, offering flexibility to trade anytime while requiring manual management of no-trading periods. Backtest, optimize, and deploy on TradingView to capitalize on the Nasdaq-100’s dynamic market with confidence.
Comprehensive Analysis and Strategy Description for ML Adaptive NQ Strategy
Introduction
This comprehensive analysis addresses the user’s request for a detailed description of the "ML Adaptive NQ Strategy - Apex 300K," emphasizing its optimal performance on the 5-minute chart with Heikin Ashi candles. The strategy, implemented in Pinescript v6 for TradingView, uses a trained 8-6-1 neural network to predict price movements for E-mini Nasdaq-100 futures (NQ), with feature calculations, entry/exit conditions, risk management, and a performance dashboard. As of 12:03 AM MDT on Sunday, May 11, 2025, this report provides a robust description that highlights the strategy’s features, optimization, and execution requirements, ensuring clarity for traders and alignment with the user’s trading setup.
Background and Context
The ML Adaptive NQ Strategy is designed for automated trading of NQ futures, leveraging a neural network trained externally with Python (TensorFlow) to process eight market features: ROC, momentum, relative volume, RSI, MACD histogram, Bollinger Band width, price position, and volume force. The strategy uses these predictions to trigger trades based on customizable thresholds, EMA trend, and volume filters, with ATR-based risk management and a real-time performance dashboard.
Troubleshooting and Best Practices
Chart Setup:
Ensure the TradingView chart is set to 5-minute Heikin Ashi candles for NQ futures to align with the strategy’s optimization. Verify in TradingView’s chart settings.
If using a different timeframe or candle type, expect reduced accuracy and consider retraining the neural network with matching data.
Trade Frequency:
If trades are infrequent, adjust volFilter to 0.8, pred_threshold_long to 0.55, and pred_threshold_short to 0.45, as suggested in the strategy comments.
Use TradingView’s strategy tester to optimize parameters for your risk tolerance and market conditions.
Manual No-Trading Periods:
Monitor TradingView or PickMyTrade to pause trading during low-liquidity periods (e.g., weekends, overnight sessions) by disabling alerts or pausing the strategy.
Consider adding a custom input to toggle trading manually if frequent intervention is needed.
Backtesting:
Backtest over at least 3 years to match the Python training period (May 10, 2022, to May 9, 2025). Adjust riskPerTrade, atrMultiplier, or profitFactor based on results.
Monitor dashboard metrics (e.g., drawdown, win rate) to ensure performance aligns with expectations.
PickMyTrade Integration:
Verify that alerts (Long Trade Executed, Short Trade Executed, Trade Closed, Position Change) are correctly configured in TradingView and linked to PickMyTrade.
Include tpPrice and slPrice in alert messages for precise trade execution in Tradovate.
Data Consistency:
Praetor Sentinel V11.2 NOLOOSE BETA📈 Praetor Sentinel V11.2 – "NOLOOSE BETA"
Algorithmic Trading Strategy for Trend Markets with Adaptive Risk Management
Praetor Sentinel V11.2 is an advanced algorithmic trading strategy for TradingView, specifically designed to operate in strong trend conditions. It combines multiple technical systems—including dynamic trend filters, multi-layer EMA structures, ADX-based volatility control, and adaptive trailing stops—into a powerful and automated trading framework.
🔧 Core Features
Multi-EMA Trend Detection: Two EMA pairs (short/long) to identify and confirm directional trends.
XO-EMA Breakout Logic: Fast EMA crossover to detect breakout opportunities.
ADX Trend Filter: Trades only during strong market trends (above custom ADX threshold).
HTF Filter: Optional higher timeframe trend confirmation (e.g. Daily 50 EMA).
VWAP Validation: Ensures entries aren't taken against the volumetric average.
RSI Filter: Adds a momentum filter (e.g. RSI > 50 for long trades).
🎯 Entry Signals
The strategy uses two entry types:
Breakout Entries: Based on XO-EMA cross and multi-EMA trend alignment.
Pullback Entries: Configurable via various methods such as EMA21 reentry, RSI reversal, engulfing candles, or VWAP reclaim.
All entries can be delayed via confirmation candle logic, requiring a bullish or bearish follow-up bar.
🛡️ Risk Management & Exit Logic
Dynamic ATR Trailing Stop: Adjusts stop distance according to market volatility with optional swing high/low protection.
Break-Even Logic: Locks in trades at breakeven once a defined profit is reached.
Hard Stop-Loss: Caps potential loss per trade with a fixed % (e.g. 1%).
Safe Mode ("NOLOOSE"): Exits early if price moves too far against the position — ideal for automated bots that must avoid drawdowns.
🤖 Automation & Alerts
This strategy is fully automatable with services like 3Commas using built-in alert messages for entries and exits.
All parameters are fully configurable to adapt to different assets, timeframes, and trading styles.
⚙️ Additional Features
Configurable leverage & position sizing
Time-based trading window
Built-in Anchored VWAP
Modular design for easy extension
📌 Summary
Praetor Sentinel V11.2 is a professional-grade tool for trend traders who want rule-based entry/exit logic, adaptive stop systems, and robust protection features. When paired with automation tools, it offers a reliable, low-maintenance setup that emphasizes safety, structure, and scalability.
🛠 How to Use Praetor Sentinel V11.2 – NOLOOSE BETA
🔍 1. Basic Configuration (Required)
Setting Description
Enable Long Trades Enables long (buy) positions.
Enable Short Trades Enables short (sell) positions.
Leverage Used for position sizing calculations.
Position Size % Defines % of capital to be used per trade.
⏰ 2. Time Filter (Optional)
Restricts trading to a defined time range.
Setting Description
Start Date Start date for strategy to be active.
End Date End date for strategy to stop.
Time Zone Time zone for above settings.
📊 3. Trend Setup (Essential for Entry Signals)
Setting Description
MA Type Type of moving average: EMA or SMA.
EMA1/2 Short & Long Two EMA-based systems to determine trend.
Fast/Slow EMA (XO) Used for crossover breakout detection.
HTF Filter Uses higher timeframe trend for additional confirmation.
RSI Filter Confirms entries only if momentum (RSI) supports it.
ADX Threshold Ensures trades only occur during strong trends.
🎯 4. Entry Logic
Setting Description
Pullback Entry Type Enables optional entry setups:
"Off"
"EMA21"
"RSI"
"Engulfing"
"VWAP"
| Use Confirmation Candle | Entry is delayed until a confirmation bar appears. |
| VWAP Confirmation | Trade only if price is above/below the VWAP (based on direction). |
Note: You can combine breakout + pullback signals. Only one has to trigger.
🧯 5. Risk Control & Exit Settings
Setting Description
Trailing Stop Mode
"Standard": Classic trailing stop
"Dynamic ATR": Adjusts to current volatility
"Dynamic ATR + Swing": Adds swing high/low buffer
| Enable Break-Even | Moves SL to breakeven once a target % gain is reached. |
| Enable Hard Stop-Loss | Fixed stop-loss (e.g. 1%) to cap trade risk. |
| Enable Safe Mode | Exits trade early if price moves against it beyond defined % (e.g. 0.3%). |
🔔 6. Alerts & Bot Automation
Setting Description
Entry Long/Short Msg Text message sent via alert when a position opens.
Exit Long/Short Msg Alert message for stop-loss/exit logic.
How to automate with 3Commas:
Load the strategy on your chart.
Manually create alerts using "Create Alert" in TradingView.
Use the built-in alert_message values for bot integration.
✅ Recommended Settings (Example for BTC/ETH on 1H)
Long & Short: ✅ Enabled
Leverage: 2.0
Timeframe: 1H
Pullback Entry: "EMA21"
MA Type: EMA
HTF Filter: Enabled (Daily EMA50)
RSI Filter: Enabled
VWAP Filter: Enabled
Break-Even: On at 0.5%
Hard SL: 1.0%
Safe Mode: On at -0.3%
Trailing Stop: "Dynamic ATR + Swing"
📘 Pro Tips for Testing & Customization
Use the Strategy Tester in TradingView to analyze performance over different assets.
Experiment with timeframes and entry modes.
Ideal for trending assets like BTC, ETH, SOL, etc.
You can expand it with take-profit logic, fixed TPs, indicator exits, etc.
Dual-Phase Trend Regime Strategy [Zeiierman X PineIndicators]This strategy is based on the Dual-Phase Trend Regime Indicator by Zeiierman.
Full credit for the original concept and logic goes to Zeiierman.
This non-repainting strategy dynamically switches between fast and slow oscillators based on market volatility, providing adaptive entries and exits with high clarity and reliability.
Core Concepts
1. Adaptive Dual Oscillator Logic
The system uses two oscillators:
Fast Oscillator: Activated in high-volatility phases for quick reaction.
Slow Oscillator: Used during low-volatility phases to reduce noise.
The system automatically selects the appropriate oscillator depending on the market's volatility regime.
2. Volatility Regime Detection
Volatility is calculated using the standard deviation of returns. A median-split algorithm clusters volatility into:
Low Volatility Cluster
High Volatility Cluster
The current volatility is then compared to these clusters to determine whether the regime is low or high volatility.
3. Trend Regime Identification
Based on the active oscillator:
Bullish Trend: Oscillator > 0.5
Bearish Trend: Oscillator < 0.5
Neutral Trend: Oscillator = 0.5
The strategy reacts to changes in this trend regime.
4. Signal Source Options
You can choose between:
Regime Shift (Arrows): Trade based on oscillator value changes (from bullish to bearish and vice versa).
Oscillator Cross: Trade based on crossovers between the fast and slow oscillators.
Trade Logic
Trade Direction Options
Long Only
Short Only
Long & Short
Entry Conditions
Long Entry: Triggered on bullish regime shift or fast crossing above slow.
Short Entry: Triggered on bearish regime shift or fast crossing below slow.
Exit Conditions
Long Exit: Triggered on bearish shift or fast crossing below slow.
Short Exit: Triggered on bullish shift or fast crossing above slow.
The strategy closes opposing positions before opening new ones.
Visual Features
Oscillator Bands: Plots fast and slow oscillators, colored by trend.
Background Highlight: Indicates current trend regime.
Signal Markers: Triangle shapes show bullish/bearish shifts.
Dashboard Table: Displays live trend status ("Bullish", "Bearish", "Neutral") in the chart’s corner.
Inputs & Customization
Oscillator Periods – Fast and slow lengths.
Refit Interval – How often volatility clusters update.
Volatility Lookback & Smoothing
Color Settings – Choose your own bullish/bearish colors.
Signal Mode – Regime shift or oscillator crossover.
Trade Direction Mode
Use Cases
Swing Trading: Take entries based on adaptive regime shifts.
Trend Following: Follow the active trend using filtered oscillator logic.
Volatility-Responsive Systems: Adjust your trade behavior depending on market volatility.
Clean Exit Management: Automatically closes positions on opposite signal.
Conclusion
The Dual-Phase Trend Regime Strategy is a smart, adaptive, non-repainting system that:
Automatically switches between fast and slow trend logic.
Responds dynamically to changes in volatility.
Provides clean and visual entry/exit signals.
Supports both momentum and reversal trading logic.
This strategy is ideal for traders seeking a volatility-aware, trend-sensitive tool across any market or timeframe.
Full credit to Zeiierman.
Parabolic RSI Strategy + MA Filter + TP/SL 【PakunFX】🧠 Parabolic RSI Strategy + MA Filter + TP/SL【PakunFX】
This strategy combines a **custom Parabolic SAR applied to the RSI** (momentum-based trend reversal detection) with a **price-based moving average filter** to create a clear and responsive trend-following system.
Additionally, it **automatically draws Take Profit (TP) and Stop Loss (SL) levels** on the chart based on a fixed risk-reward ratio, providing visual risk clarity and supporting consistent trade planning.
---
## 🔍 What This Script Does
**RSI-Based Trend Detection:**
A custom Parabolic SAR is applied to RSI rather than price, enabling detection of **momentum reversals** instead of just price swings.
**MA Directional Filter:**
Entries are filtered by a moving average (EMA or SMA). The strategy only allows trades **in the direction of the trend**—longs above the MA, shorts below.
**Auto-Drawn TP/SL Levels:**
Each trade includes auto-calculated TP and SL lines using a configurable risk-reward ratio (e.g., 2.0), helping traders maintain consistency and discipline.
**Clear Entry Triggers:**
Positions are opened **when the RSI-based Parabolic SAR flips direction**, but only if the price is on the correct side of the MA filter.
→ This ensures trades are made **at the moment of momentum shift**, but only **in the direction of the dominant trend**.
---
## 🧮 Core Logic Breakdown
✅ Entry Conditions
**Long Entry:**
RSI-based SAR flips below the RSI (bullish signal) **and** price is **above** the moving average.
**Short Entry:**
RSI-based SAR flips above the RSI (bearish signal) **and** price is **below** the moving average.
✅ Exit Conditions (Position Reversal)
When an opposite signal occurs, the current position is **closed immediately**, and a new one is **opened in the opposite direction**.
✅ TP / SL Setup
- SL is placed at a **virtual buffer distance** (e.g., 100 pips from entry).
- TP is calculated using the **risk-reward ratio** (e.g., 2.0 → TP at 200 pips if SL = 100).
→ Delivers consistent, risk-defined trades.
---
## 💰 Risk Management Parameters
**Asset / Timeframe:** Any (Backtested on 10-minute chart)
**Account Size (Virtual):** $3,000
**Commission:** 0.02% per trade
**Slippage Buffer:** Equivalent to 100 pips
**Risk Per Trade:** Approximately 5% of account balance
**Number of Trades (Backtest Period):** 125 trades
---
## 📈 Recommended Usage
**Timeframes:** 5m to 30m (scalping to intraday)
**Market Conditions:** Best in trending markets; responsive even in mild ranges
**Assets:** Forex pairs, Gold, WTI Crude, Indexes with volatility
**Discretionary Support:** Visual TP/SL allows for **pre-planned trades** and avoids impulsive decisions
---
## ⚠️ Notes & Considerations
Positions are reversed on opposite signals (no simultaneous longs & shorts).
Backtests do not include broker-specific execution factors—adjust for slippage and spreads if needed.
Strategy is **originally developed**, inspired by “ChartPrime's RSI Parabolic SAR” idea, but fully standalone.
---
## 🖼 Chart Visuals & Features
**MA Line (orange):** Shows trend direction
**TP Line (green dashed):** Take Profit visualization
**SL Line (red dashed):** Stop Loss boundary
**RSI-SAR Flip Points:** Highlight entry timing visually
---
## ✅ Summary
Parabolic RSI Strategy + MA Filter + TP/SL【PakunFX】 is a
“Momentum Detection × Trend Filtering × Exit Visualization” strategy designed for consistent, visually guided decision-making.
With clearly structured logic and visual aids, it serves both discretionary and systematic traders looking for a **momentum-aligned, risk-controlled approach**.
Gabriel's Price Action Strategy🧠 Gabriel's Price Action Strategy — Smart Signal Sequence with Dynamic Risk Control
Created by: OneWallStreetQuant
Strategy Type: Momentum-based Sequence Logic + Smart Volume & RSI Filters
Ideal For: Intraday scalping, swing trading, and momentum trend entries on stocks, forex, crypto, indices.
🚀 Overview
Gabriel's Price Action Strategy is a multi-layered, logic-driven trading system that combines:
✅ Candle Sequence Detection: Detects persistent bullish/bearish momentum using a smart configurable sequence of green/red candles.
✅ Structure Break Filtering: Prevents entries if recent price invalidates the momentum setup (e.g., a red candle breaks a bullish low).
✅ Custom Volume Engine: Integrates a hybrid tick-volume model using Negative/Positive Volume Index (NVI-PVI) to identify smart money flows.
✅ Advanced RSI Logic: Uses Jurik RSX for accurate oversold/overbought filtering.
✅ Optional MTF Trend Filter: Validates trend direction using a slope-based Jurik MA on higher timeframes.
✅ MPT-Based DMI Filter: Adds pyramid entries only during strong trend phases, based on Gain/Pain ratios and Ulcer-index smoothed ADX.
✅ Risk Management: ATR-based SL/TP and fully customizable trailing logic for both profit and stop-loss.
📈 Entry Logic
Trades are triggered only when:
A minimum number of recent candles are bullish/bearish (Min Green/Red Candles)
Structure has not been broken by opposite price action (optional)
Relative volume exceeds average (optional)
RSI is below overbought or above oversold (optional)
MTF slope is aligned with trend direction (optional)
💡 Key Features
Custom Candle Logic: Detects momentum shifts using a tunable lookback window (up to 50 bars).
Smart Volume Filtering: Volume is intelligently estimated using tick-based ranges and NVI-PVI deltas.
Risk Management Built-in: Set your ATR length, SL/TP multipliers, and dynamic trailing offsets with full control.
Scorecard System: A built-in scoring engine evaluates Win Rate, Drawdown, Sharpe Ratio, Recovery Factor, and Profit Factor — visualized on chart as a label.
Backtest-Friendly: Includes date range toggles, bar-magnifier support, and optimized execution on every tick.
📊 Strategy Scorecard (Label)
Automatically calculates:
✅ Total Trades
✅ Win Rate (%)
✅ Net Profit
✅ Profit Factor
✅ Expected Payoff
✅ Max & Avg Drawdown
✅ Recovery Factor
✅ Sharpe Ratio
✅ VaR (95%)
Plus, assigns a normalized score from 0 to 100 for evaluating overall robustness.
⚙️ Customization
Every module — from entry filters to pyramiding and trailing logic — is fully configurable:
Volume Filters ✅
RSI Filters ✅
Structure Break Checks ✅
HTF Jurik MA & Slope Threshold ✅
Multi-Timeframe Mode ✅
Backtest Score Visualization ✅
⚠️ Notes
Enable bar magnifier and calc on every tick for best accuracy.
On early bars, signal logic may delay until enough candles are available.
Best paired with assets showing directional volatility (SPY, BTC, ETH, Gold, etc.).
Ideally paired on trending timeframes such as M1, M5, M15, M30, 1HR, 4 Hourly, Daily, Weekly, Monthly, etc.
Moving Average Shift WaveTrend StrategyMoving Average Shift WaveTrend Strategy
🧭 Overview
The Moving Average Shift WaveTrend Strategy is a trend-following and momentum-based trading system designed to be overlayed on TradingView charts. It executes trades based on the confluence of multiple technical conditions—volatility, session timing, trend direction, and oscillator momentum—to deliver logical and systematic trade entries and exits.
🎯 Strategy Objectives
Enter trades aligned with the prevailing long-term trend
Exit trades on confirmed momentum reversals
Avoid false signals using session timing and volatility filters
Apply structured risk management with automatic TP, SL, and trailing stops
⚙️ Key Features
Selectable MA types: SMA, EMA, SMMA (RMA), WMA, VWMA
Dual-filter logic using a custom oscillator and moving averages
Session and volatility filters to eliminate low-quality setups
Trailing stop, configurable Take Profit / Stop Loss logic
“In-wave flag” prevents overtrading within the same trend wave
Visual clarity with color-shifting candles and entry/exit markers
📈 Trading Rules
✅ Long Entry Conditions:
Price is above the selected MA
Oscillator is positive and rising
200-period EMA indicates an uptrend
ATR exceeds its median value (sufficient volatility)
Entry occurs between 09:00–17:00 (exchange time)
Not currently in an active wave
🔻 Short Entry Conditions:
Price is below the selected MA
Oscillator is negative and falling
200-period EMA indicates a downtrend
All other long-entry conditions are inverted
❌ Exit Conditions:
Take Profit or Stop Loss is hit
Opposing signals from oscillator and MA
Trailing stop is triggered
🛡️ Risk Management Parameters
Pair: ETH/USD
Timeframe: 4H
Starting Capital: $3,000
Commission: 0.02%
Slippage: 2 pips
Risk per Trade: 2% of account equity (adjustable)
Total Trades: 224
Backtest Period: May 24, 2016 — April 7, 2025
Note: Risk parameters are fully customizable to suit your trading style and broker conditions.
🔧 Trading Parameters & Filters
Time Filter: Trades allowed only between 09:00–17:00 (exchange time)
Volatility Filter: ATR must be above its median value
Trend Filter: Long-term 200-period EMA
📊 Technical Settings
Moving Average
Type: SMA
Length: 40
Source: hl2
Oscillator
Length: 15
Threshold: 0.5
Risk Management
Take Profit: 1.5%
Stop Loss: 1.0%
Trailing Stop: 1.0%
👁️ Visual Support
MA and oscillator color changes indicate directional bias
Clear chart markers show entry and exit points
Trailing stops and risk controls are transparently managed
🚀 Strategy Improvements & Uniqueness
In-wave flag avoids repeated entries within the same trend phase
Filtering based on time, volatility, and trend ensures higher-quality trades
Dynamic high/low tracking allows precise trailing stop placement
Fully rule-based execution reduces emotional decision-making
💡 Inspirations & Attribution
This strategy is inspired by the excellent concept from:
ChartPrime – “Moving Average Shift”
It expands on the original idea with advanced trade filters and trailing logic.
Source reference:
📌 Summary
The Moving Average Shift WaveTrend Strategy offers a rule-based, reliable approach to trend trading. By combining trend and momentum filters with robust risk controls, it provides a consistent framework suitable for various market conditions and trading styles.
⚠️ Disclaimer
This script is for educational purposes only. Trading involves risk. Always use proper backtesting and risk evaluation before applying in live markets.
Adaptive Fibonacci Pullback System -FibonacciFluxAdaptive Fibonacci Pullback System (AFPS) - FibonacciFlux
This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). Original concepts by FibonacciFlux.
Abstract
The Adaptive Fibonacci Pullback System (AFPS) presents a sophisticated, institutional-grade algorithmic strategy engineered for high-probability trend pullback entries. Developed by FibonacciFlux, AFPS uniquely integrates a proprietary Multi-Fibonacci Supertrend engine (0.618, 1.618, 2.618 ratios) for harmonic volatility assessment, an Adaptive Moving Average (AMA) Channel providing dynamic market context, and a synergistic Multi-Timeframe (MTF) filter suite (RSI, MACD, Volume). This strategy transcends simple indicator combinations through its strict, multi-stage confluence validation logic. Historical simulations suggest that specific MTF filter configurations can yield exceptional performance metrics, potentially achieving Profit Factors exceeding 2.6 , indicative of institutional-level potential, while maintaining controlled risk under realistic trading parameters (managed equity risk, commission, slippage).
4 hourly MTF filtering
1. Introduction: Elevating Pullback Trading with Adaptive Confluence
Traditional pullback strategies often struggle with noise, false signals, and adapting to changing market dynamics. AFPS addresses these challenges by introducing a novel framework grounded in Fibonacci principles and adaptive logic. Instead of relying on static levels or single confirmations, AFPS seeks high-probability pullback entries within established trends by validating signals through a rigorous confluence of:
Harmonic Volatility Context: Understanding the trend's stability and potential turning points using the unique Multi-Fibonacci Supertrend.
Adaptive Market Structure: Assessing the prevailing trend regime via the AMA Channel.
Multi-Dimensional Confirmation: Filtering signals with lower-timeframe Momentum (RSI), Trend Alignment (MACD), and Market Conviction (Volume) using the MTF suite.
The objective is to achieve superior signal quality and adaptability, moving beyond conventional pullback methodologies.
2. Core Methodology: Synergistic Integration
AFPS's effectiveness stems from the engineered synergy between its core components:
2.1. Multi-Fibonacci Supertrend Engine: Utilizes specific Fibonacci ratios (0.618, 1.618, 2.618) applied to ATR, creating a multi-layered volatility envelope potentially resonant with market harmonics. The averaged and EMA-smoothed result (`smoothed_supertrend`) provides a robust, dynamic trend baseline and context filter.
// Key Components: Multi-Fibonacci Supertrend & Smoothing
average_supertrend = (supertrend1 + supertrend2 + supertrend3) / 3
smoothed_supertrend = ta.ema(average_supertrend, st_smooth_length)
2.2. Adaptive Moving Average (AMA) Channel: Provides dynamic market context. The `ama_midline` serves as a key filter in the entry logic, confirming the broader trend bias relative to adaptive price action. Extended Fibonacci levels derived from the channel width offer potential dynamic S/R zones.
// Key Component: AMA Midline
ama_midline = (ama_high_band + ama_low_band) / 2
2.3. Multi-Timeframe (MTF) Filter Suite: An optional but powerful validation layer (RSI, MACD, Volume) assessed on a lower timeframe. Acts as a **validation cascade** – signals must pass all enabled filters simultaneously.
2.4. High-Confluence Entry Logic: The core innovation. A pullback entry requires a specific sequence and validation:
Price interaction with `average_supertrend` and recovery above/below `smoothed_supertrend`.
Price confirmation relative to the `ama_midline`.
Simultaneous validation by all enabled MTF filters.
// Simplified Long Entry Logic Example (incorporates key elements)
long_entry_condition = enable_long_positions and
(low < average_supertrend and close > smoothed_supertrend) and // Pullback & Recovery
(close > ama_midline and close > ama_midline) and // AMA Confirmation
(rsi_filter_long_ok and macd_filter_long_ok and volume_filter_ok) // MTF Validation
This strict, multi-stage confluence significantly elevates signal quality compared to simpler pullback approaches.
1hourly filtering
3. Realistic Implementation and Performance Potential
AFPS is designed for practical application, incorporating realistic defaults and highlighting performance potential with crucial context:
3.1. Realistic Default Strategy Settings:
The script includes responsible default parameters:
strategy('Adaptive Fibonacci Pullback System - FibonacciFlux', shorttitle = "AFPS", ...,
initial_capital = 10000, // Accessible capital
default_qty_type = strategy.percent_of_equity, // Equity-based risk
default_qty_value = 4, // Default 4% equity risk per initial trade
commission_type = strategy.commission.percent,
commission_value = 0.03, // Realistic commission
slippage = 2, // Realistic slippage
pyramiding = 2 // Limited pyramiding allowed
)
Note: The default 4% risk (`default_qty_value = 4`) requires careful user assessment and adjustment based on individual risk tolerance.
3.2. Historical Performance Insights & Institutional Potential:
Backtesting provides insights into historical behavior under specific conditions (always specify Asset/Timeframe/Dates when sharing results):
Default Performance Example: With defaults, historical tests might show characteristics like Overall PF ~1.38, Max DD ~1.16%, with potential Long/Short performance variance (e.g., Long PF 1.6+, Short PF < 1).
Optimized MTF Filter Performance: Crucially, historical simulations demonstrate that meticulous configuration of the MTF filters (particularly RSI and potentially others depending on market) can significantly enhance performance. Under specific, optimized MTF filter settings combined with appropriate risk management (e.g., 7.5% risk), historical tests have indicated the potential to achieve **Profit Factors exceeding 2.6**, alongside controlled drawdowns (e.g., ~1.32%). This level of performance, if consistently achievable (which requires ongoing adaptation), aligns with metrics often sought in institutional trading environments.
Disclaimer Reminder: These results are strictly historical simulations. Past performance does not guarantee future results. Achieving high performance requires careful parameter tuning, adaptation to changing markets, and robust risk management.
3.3. Emphasizing Risk Management:
Effective use of AFPS mandates active risk management. Utilize the built-in Stop Loss, Take Profit, and Trailing Stop features. The `pyramiding = 2` setting requires particularly diligent oversight. Do not rely solely on default settings.
4. Conclusion: Advancing Trend Pullback Strategies
The Adaptive Fibonacci Pullback System (AFPS) offers a sophisticated, theoretically grounded, and highly adaptable framework for identifying and executing high-probability trend pullback trades. Its unique blend of Fibonacci resonance, adaptive context, and multi-dimensional MTF filtering represents a significant advancement over conventional methods. While requiring thoughtful implementation and risk management, AFPS provides discerning traders with a powerful tool potentially capable of achieving institutional-level performance characteristics under optimized conditions.
Acknowledgments
Developed by FibonacciFlux. Inspired by principles of Fibonacci analysis, adaptive averaging, and multi-timeframe confirmation techniques explored within the trading community.
Disclaimer
Trading involves substantial risk. AFPS is an analytical tool, not a guarantee of profit. Past performance is not indicative of future results. Market conditions change. Users are solely responsible for their decisions and risk management. Thorough testing is essential. Deploy at your own considered risk.
Uptrick X PineIndicators: Z-Score Flow StrategyThis strategy is based on the Z-Score Flow Indicator developed by Uptrick. Full credit for the original concept and logic goes to Uptrick.
The Z-Score Flow Strategy combines statistical mean-reversion logic with trend filtering, RSI confirmation, and multi-mode trade execution, offering a flexible and structured approach to trading both reversals and trend continuations.
Core Concepts Behind Z-Score Flow
1. Z-Score Mean Reversion Logic
The Z-score measures how far current price deviates from its statistical mean, in standard deviations.
A high positive Z-score (e.g. > 2) suggests price is overbought and may revert downward.
A low negative Z-score (e.g. < -2) suggests price is oversold and may revert upward.
The strategy uses Z-score thresholds to trigger signals when price deviates far enough from its mean.
2. Trend Filtering with EMA
To prevent counter-trend entries, the strategy includes a trend filter based on a 50-period EMA:
Only allows long entries if price is below EMA (mean-reversion in downtrends).
Only allows short entries if price is above EMA (mean-reversion in uptrends).
3. RSI Confirmation and Lockout System
An RSI smoothing mechanism helps confirm signals and avoid whipsaws:
RSI must be below 30 and rising to allow buys.
RSI must be above 70 and falling to allow sells.
Once a signal occurs, it is "locked out" until RSI re-enters the neutral zone (30–70).
This avoids multiple signals in overextended zones and reduces overtrading.
Entry Signal Logic
A buy or sell is triggered when:
Z-score crosses below (buy) or above (sell) the threshold.
RSI smoothed condition is met (oversold and rising / overbought and falling).
The trend condition (EMA filter) aligns.
A cooldown period has passed since the last opposite trade.
This layered approach helps ensure signal quality and timing precision.
Trade Modes
The strategy includes three distinct trade modes to adapt to various market behaviors:
1. Standard Mode
Trades are opened using the Z-score + RSI + trend filter logic.
Each signal must pass all layered conditions.
2. Zero Cross Mode
Trades are based on the Z-score crossing zero.
This mode is useful in trend continuation setups, rather than mean reversion.
3. Trend Reversal Mode
Trades occur when the mean slope direction changes, i.e., basis line changes color.
Helps capture early trend shifts with less lag.
Each mode can be customized for long-only, short-only, or long & short execution.
Visual Components
1. Z-Score Mean Line
The basis (mean) line is colored based on slope direction.
Green = bullish slope, Purple = bearish slope, Gray = flat.
A wide shadow band underneath reflects current trend momentum.
2. Gradient Fill to Price
A gradient zone between price and the mean reflects:
Price above mean = bearish zone with purple overlay.
Price below mean = bullish zone with teal overlay.
This visual aid quickly reveals market positioning relative to equilibrium.
3. Signal Markers
"𝓤𝓹" labels appear for buy signals.
"𝓓𝓸𝔀𝓷" labels appear for sell signals.
These are colored and positioned according to trend context.
Customization Options
Z-Score Period & Thresholds: Define sensitivity to price deviations.
EMA Trend Filter Length: Filter entries with long-term bias.
RSI & Smoothing Periods: Fine-tune RSI confirmation conditions.
Cooldown Period: Prevent signal spam and enforce timing gaps.
Slope Index: Adjust how far back to compare mean slope.
Visual Settings: Toggle mean lines, gradients, and more.
Use Cases & Strategy Strengths
1. Mean-Reversion Trading
Ideal for catching pullbacks in trending markets or fading overextended price moves.
2. Trend Continuation or Reversal
With multiple trade modes, traders can choose between fading price extremes or trading slope momentum.
3. Signal Clarity and Risk Control
The combination of Z-score, RSI, EMA trend, and cooldown logic provides high-confidence signals with built-in filters.
Conclusion
The Z-Score Flow Strategy by Uptrick X PineIndicators is a versatile and structured trading system that:
Fuses statistical deviation (Z-score) with technical filters.
Provides both mean-reversion and trend-based entry logic.
Uses visual overlays and signal labels for clarity.
Prevents noise-driven trades via cooldown and lockout systems.
This strategy is well-suited for traders seeking a data-driven, multi-condition entry framework that can adapt to various market types.
Full credit for the original concept and indicator goes to Uptrick.
VIDYA Auto-Trading(Reversal Logic)Overview
This script is a dynamic trend-following strategy based on the Variable Index Dynamic Average (VIDYA). It adapts in real time to market volatility, aiming to enhance entry precision and optimize risk management.
⚠️ This strategy is intended for educational and research purposes. Past performance does not guarantee future results. All results are based on historical simulations using fixed parameters.
Strategy Objectives
The objective of this strategy is to respond swiftly to sudden price movements and trend reversals, providing consistent and reliable trade signals under historical testing conditions. It is designed to be intuitive and efficient for traders of all levels.
Key Features
Momentum Sensitivity via VIDYA: Reacts quickly to momentum shifts, allowing for accurate trend-following entries.
Volatility-Based ATR Bands: Automatically adjusts stop levels and entry conditions based on current market volatility.
Intuitive Trend Visualization: Uptrends are marked with green zones, and downtrends with red zones, giving traders clear visual guidance.
Trading Rules
Long Entry: Triggered when price crosses above the upper band. Any existing short position is closed.
Short Entry: Triggered when price crosses below the lower band. Any existing long position is closed.
Exit Conditions: Positions are reversed based on signal changes, using a position reversal strategy.
Risk Management Parameters
Market: ETHUSD(5M)
Account Size: $3,000 (reasonable approximation for individual traders)
Commission: 0.02%
Slippage: 2 pip
Risk per Trade: 5% of account equity (adjusted to comply with TradingView guidelines for realistic risk levels)
Number of Trades: 251 (based on backtest over the selected dataset)
⚠️ The risk per trade and other values can be customized. Users are encouraged to adapt these to their individual needs and broker conditions.
Trading Parameters & Considerations
VIDYA Length: 10
VIDYA Momentum: 20
Distance factor for upper/lower bands: 2
Source: close
Visual Support
Trend zones, entry points, and directional shifts are clearly plotted on the chart. These visual cues enhance the analytical experience and support faster decision-making.
Visual elements are designed to improve interpretability and are not intended as financial advice or trade signals.
Strategy Improvements & Uniqueness
Inspired by the public work of BigBeluga, this script evolves the original concept with meaningful enhancements. By combining VIDYA and ATR bands, it offers greater adaptability and practical value compared to conventional trend-following strategies.
This adaptation is original work and not a direct copy. Improvements are designed to enhance usability, risk control, and market responsiveness.
Summary
This strategy offers a responsive and adaptive approach to trend trading, built on momentum detection and volatility-adjusted risk management. It balances clarity, precision, and practicality—making it a powerful tool for traders seeking reliable trend signals.
⚠️ All results are based on historical data and are subject to change under different market conditions. This script does not guarantee profit and should be used with caution and proper risk management.
Triangular Hull Moving Average [BigBeluga X PineIndicators]This strategy is based on the original Triangular Hull Moving Average (THMA) + Volatility indicator by BigBeluga. Full credit for the concept and design goes to BigBeluga.
The strategy blends smoothed trend-following logic using a Triangular Hull Moving Average with dynamic volatility overlays, providing actionable trade signals with responsive visual feedback. It's designed for traders who want a non-lagging trend filter while also monitoring market volatility in real time.
How the Strategy Works
1. Triangular Hull Moving Average (THMA) Core
At its core, the strategy uses a Triangular Hull Moving Average (THMA) — a variation of the traditional Hull Moving Average with triple-smoothing logic:
It combines multiple weighted moving averages (WMAs) to create a faster and smoother trend line.
This reduces lag without compromising trend accuracy.
The THMA reacts more responsively to price movements than classic MAs.
THMA Formula:
thma(_src, _length) =>
ta.wma(ta.wma(_src,_length / 3) * 3 - ta.wma(_src, _length / 2) - ta.wma(_src, _length), _length)
This logic filters out short-term noise while still being sensitive to genuine trend shifts.
2. Volatility-Enhanced Candle Plotting
An optional volatility mode overlays the chart with custom candles that incorporate volatility bands:
Wicks expand and contract dynamically based on market volatility.
The volatility value is computed using a HMA of high-low range over a user-defined length.
The candle bodies reflect THMA values, while the wicks reflect the current volatility spread.
This feature allows traders to visually gauge the strength of price moves and anticipate possible breakouts or slowdowns.
3. Trend Reversal Signal Detection
The strategy identifies trend reversals when the THMA line crosses over/under its own past value:
A bullish signal is triggered when THMA crosses above its value from two bars ago.
A bearish signal is triggered when THMA crosses below its value from two bars ago.
These shifts are marked on the chart with triangle-shaped signals for clear visibility.
This logic helps detect momentum shifts early and enables reactive trade entries.
Trade Entry & Exit Logic
Trade Modes Supported
Users can choose between:
Only Long – Enters long trades only.
Only Short – Enters short trades only.
Long & Short – Enables both directions.
Entry Conditions
Long Entry:
Triggered when a bullish crossover is detected.
Active only if the strategy mode allows long trades.
Short Entry:
Triggered when a bearish crossover is detected.
Active only if the strategy mode allows short trades.
Exit Conditions
In Only Long mode, the strategy closes long positions when a bearish signal appears.
In Only Short mode, the strategy closes short positions when a bullish signal appears.
In Long & Short mode, the strategy does not auto-close positions — instead, it opens new positions on each confirmed signal.
Dashboard Visualization
In the bottom-right corner of the chart, a live dashboard displays:
The current trend direction (🢁 for bullish, 🢃 for bearish).
The current volatility level as a percentage.
This helps traders quickly assess market status and adjust their decisions accordingly.
Customization Options
THMA Length: Adjust how smooth or reactive the trend detection should be.
Volatility Toggle & Length: Enable or disable volatility visualization and set sensitivity.
Color Settings: Choose colors for up/down trend visualization.
Trade Direction Mode: Limit the strategy to long, short, or both types of trades.
Use Cases & Strategy Strengths
1. Trend Following
Use the THMA-based candles and triangle signals to enter with momentum. The indicator adapts quickly, reducing lag and improving trade timing.
2. Volatility Monitoring
Visualize the strength of the trend with volatility wicks. Use expanding bands to confirm breakouts and contracting ones to detect weakening moves.
3. Signal Confirmation
Combine this tool with other indicators or use the trend shift triangles as confirmations for manual entries.
Conclusion
The THMA + Volatility Strategy is a non-repainting trend-following system that integrates:
Triangular Hull MA for advanced trend detection.
Real-time volatility visualization.
Clear entry signals based on trend reversals.
Configurable trade direction settings.
It is ideal for traders who:
Prefer smoothed price analysis.
Want to follow trends with precision.
Value visual volatility feedback for breakout detection.
Full credit for the original concept and indicator goes to BigBeluga.
Strategy Stats [presentTrading]Hello! it's another weekend. This tool is a strategy performance analysis tool. Looking at the TradingView community, it seems few creators focus on this aspect. I've intentionally created a shared version. Welcome to share your idea or question on this.
█ Introduction and How it is Different
Strategy Stats is a comprehensive performance analytics framework designed specifically for trading strategies. Unlike standard strategy backtesting tools that simply show cumulative profits, this analytics suite provides real-time, multi-timeframe statistical analysis of your trading performance.
Multi-timeframe analysis: Automatically tracks performance metrics across the most recent time periods (last 7 days, 30 days, 90 days, 1 year, and 4 years)
Advanced statistical measures: Goes beyond basic metrics to include Information Coefficient (IC) and Sortino Ratio
Real-time feedback: Updates performance statistics with each new trade
Visual analytics: Color-coded performance table provides instant visual feedback on strategy health
Integrated risk management: Implements sophisticated take profit mechanisms with 3-step ATR and percentage-based exits
BTCUSD Performance
The table in the upper right corner is a comprehensive performance dashboard showing trading strategy statistics.
Note: While this presentation uses Vegas SuperTrend as the underlying strategy, this is merely an example. The Stats framework can be applied to any trading strategy. The Vegas SuperTrend implementation is included solely to demonstrate how the analytics module integrates with a trading strategy.
⚠️ Timeframe Limitations
Important: TradingView's backtesting engine has a maximum storage limit of 10,000 bars. When using this strategy stats framework on smaller timeframes such as 1-hour or 2-hour charts, you may encounter errors if your backtesting period is too long.
Recommended Timeframe Usage:
Ideal for: 4H, 6H, 8H, Daily charts and above
May cause errors on: 1H, 2H charts spanning multiple years
Not recommended for: Timeframes below 1H with long history
█ Strategy, How it Works: Detailed Explanation
The Strategy Stats framework consists of three primary components: statistical data collection, performance analysis, and visualization.
🔶 Statistical Data Collection
The system maintains several critical data arrays:
equityHistory: Tracks equity curve over time
tradeHistory: Records profit/loss of each trade
predictionSignals: Stores trade direction signals (1 for long, -1 for short)
actualReturns: Records corresponding actual returns from each trade
For each closed trade, the system captures:
float tradePnL = strategy.closedtrades.profit(tradeIndex)
float tradeReturn = strategy.closedtrades.profit_percent(tradeIndex)
int tradeType = entryPrice < exitPrice ? 1 : -1 // Direction
🔶 Performance Metrics Calculation
The framework calculates several key performance metrics:
Information Coefficient (IC):
The correlation between prediction signals and actual returns, measuring forecast skill.
IC = Correlation(predictionSignals, actualReturns)
Where Correlation is the Pearson correlation coefficient:
Correlation(X,Y) = (nΣXY - ΣXY) / √
Sortino Ratio:
Measures risk-adjusted return focusing only on downside risk:
Sortino = (Avg_Return - Risk_Free_Rate) / Downside_Deviation
Where Downside Deviation is:
Downside_Deviation = √
R_i represents individual returns, T is the target return (typically the risk-free rate), and n is the number of observations.
Maximum Drawdown:
Tracks the largest percentage drop from peak to trough:
DD = (Peak_Equity - Trough_Equity) / Peak_Equity * 100
🔶 Time Period Calculation
The system automatically determines the appropriate number of bars to analyze for each timeframe based on the current chart timeframe:
bars_7d = math.max(1, math.round(7 * barsPerDay))
bars_30d = math.max(1, math.round(30 * barsPerDay))
bars_90d = math.max(1, math.round(90 * barsPerDay))
bars_365d = math.max(1, math.round(365 * barsPerDay))
bars_4y = math.max(1, math.round(365 * 4 * barsPerDay))
Where barsPerDay is calculated based on the chart timeframe:
barsPerDay = timeframe.isintraday ?
24 * 60 / math.max(1, (timeframe.in_seconds() / 60)) :
timeframe.isdaily ? 1 :
timeframe.isweekly ? 1/7 :
timeframe.ismonthly ? 1/30 : 0.01
🔶 Visual Representation
The system presents performance data in a color-coded table with intuitive visual indicators:
Green: Excellent performance
Lime: Good performance
Gray: Neutral performance
Orange: Mediocre performance
Red: Poor performance
█ Trade Direction
The Strategy Stats framework supports three trading directions:
Long Only: Only takes long positions when entry conditions are met
Short Only: Only takes short positions when entry conditions are met
Both: Takes both long and short positions depending on market conditions
█ Usage
To effectively use the Strategy Stats framework:
Apply to existing strategies: Add the performance tracking code to any strategy to gain advanced analytics
Monitor multiple timeframes: Use the multi-timeframe analysis to identify performance trends
Evaluate strategy health: Review IC and Sortino ratios to assess predictive power and risk-adjusted returns
Optimize parameters: Use performance data to refine strategy parameters
Compare strategies: Apply the framework to multiple strategies to identify the most effective approach
For best results, allow the strategy to generate sufficient trade history for meaningful statistical analysis (at least 20-30 trades).
█ Default Settings
The default settings have been carefully calibrated for cryptocurrency markets:
Performance Tracking:
Time periods: 7D, 30D, 90D, 1Y, 4Y
Statistical measures: Return, Win%, MaxDD, IC, Sortino Ratio
IC color thresholds: >0.3 (green), >0.1 (lime), <-0.1 (orange), <-0.3 (red)
Sortino color thresholds: >1.0 (green), >0.5 (lime), <0 (red)
Multi-Step Take Profit:
ATR multipliers: 2.618, 5.0, 10.0
Percentage levels: 3%, 8%, 17%
Short multiplier: 1.5x (makes short take profits more aggressive)
Stop loss: 20%
Scalping Strategy Signal v2 by [INFINITYTRADER]Overview
This Pine Script (v6) implements a scalping strategy that uses higher timeframe data (default: 4H) to generate entry and exit signals, originally designed for the 15-minute timeframe with an option for 30-minute charts. The "Scalping Strategy Signal v2 by " integrates moving averages, RSI, volume, ATR, and candlestick patterns to identify trading opportunities. It features adjustable risk management with ATR-based stop-loss, take-profit, and trailing stops, plus dynamic position sizing based on user-set capital. Trades trigger only on the higher timeframe candle close (e.g., 4H) to limit activity within the same period. This closed-source script offers a structured scalping approach, blending multiple entry methods and risk controls for adaptability across market conditions.
What Makes It Unique
Unlike typical scalping scripts relying on single-indicator triggers (e.g., RSI alone or basic MA crossovers), this strategy combines four distinct entry methods—standard MA crossovers, RSI-based momentum shifts, trend-following shorts, and candlestick pattern logic—evaluated on a 4H timeframe for confirmation. This multi-layered design, paired with re-entry logic after losses and a mix of manual, ATR-based, and trailing exits, aims to balance trade frequency and reliability. The higher timeframe filter adds precision not commonly found in simpler scalping tools, while the 30-minute option enhances consistency by reducing noise.
How It Works
Timeframe Logic
Runs on a base timeframe (designed for 15-minute charts, with a 30-minute option) while pulling data from a user-chosen higher timeframe (default: 4H) for signal accuracy.
Limits entries to the close of each 4H candle, ensuring one trade per period to avoid over-trading in volatile conditions.
Indicators and Data
Moving Averages : Employs 21-period and 50-period simple moving averages on the higher timeframe to detect trends and signal entries/exits.
Volume : Requires volume to exceed 70% of its 20-period average on the higher timeframe for momentum confirmation.
RSI : Uses a 14-period RSI for overbought/oversold filtering and a 6-period RSI for precise entry timing.
ATR : Applies a 14-period Average True Range on the higher timeframe to set adaptive stop-loss and take-profit levels.
Candlestick Patterns : Analyzes consecutive green or red 4H bars for trend continuation signals.
Why These Indicators
The blend of moving averages, RSI, volume, ATR, and candlestick patterns forms a robust scalping framework. Moving averages establish trend context, RSI filters momentum and avoids extremes, volume confirms market activity, ATR adjusts risk to volatility, and candlestick patterns enhance entry timing with price action insights. Together, they target small, frequent moves in flat or trending markets, with the 4H filter reducing false signals common in lower-timeframe scalping.
Entry Conditions
Four entry methods are evaluated at the 4H candle close:
Standard Long Entry: Price crosses above the 21-period moving average, volume exceeds 70% of its 20-period average, and the 1H 14-period RSI is below 70—confirms uptrend momentum.
Special Long Entry: The 6-period RSI crosses above 23, price is more than 1.5 times the ATR from the 21-period moving average, and price exceeds its prior close—targets oversold bounces with a stop-loss at the 4H candle’s low.
Short Entries:
- RSI-Based: The 6-period RSI crosses below 68 with volume support—catches overbought pullbacks.
- Trend-Based: Price crosses below the 21-period moving average, volume is above 70% of its average, and the 1H 14-period RSI is above 30—confirms downtrends.
Red/Green Bar Logic: Two consecutive green 4H bars for longs or red 4H bars for shorts—uses candlestick patterns for continuation, with a tight stop-loss from the base timeframe candle.
Re-Entry Logic
Long : After a losing special long, triggers when the 6-period RSI crosses 27 and price crosses the 21-period moving average.
Short : After a losing short, triggers when the 6-period RSI crosses 50 and price crosses below the 21-period moving average.
Purpose: Offers recovery opportunities with stricter conditions.
Exit Conditions
Manual Exits: Longs close if the 21-period MA crosses below the 50-period MA or the 1H 14-period RSI exceeds 68; shorts close if the 21-period MA crosses above the 50-period MA or RSI drops below 25.
ATR-Based TP/SL: Stop-loss is entry price ± ATR × 1.5 (default); take-profit is ± ATR × 4 (default), checked at 4H close.
Trailing Stop: Adjusts ±6x ATR from peak/trough, closing if price retraces within 1x ATR.
Special/Tight SL: Special longs exit if price opens below the 4H candle’s low; 4th method entries use the base timeframe candle’s low/high, checked every bar.
Position Sizing
Bases trade value on user-set capital (default: 100 USDT), dividing by the higher timeframe close price for dynamic sizing.
Visualization
Displays a table at the bottom-right with current/previous signals, TP/SL levels, equity, trading pair, and trade size—color-coded for clarity (green for buy, red for sell).
Inputs
Initial Capital (USDT): Sets trade value (default: 100, min: 1).
ATR Stop-Loss Multiplier: Adjusts SL distance (default: 1.5, min: 1).
ATR Take-Profit Multiplier: Adjusts TP distance (default: 4, min: 1).
Higher Timeframe: Selects analysis timeframe (options: 1m, 5m, 15m, 30m, 1H, 4H, D, W; default: 4H).
Usage Notes
Intended Timeframe: Designed for 15-minute charts with 4H confirmation for precision and frequency; 30-minute charts improve consistency by reducing noise.
Backtesting: Adjust ATR multipliers and capital to match your asset’s volatility and risk tolerance.
Risk Management: Combines manual, ATR, and trailing exits—monitor to avoid overexposure.
Limitations: 4H candle-close dependency may delay entries in fast markets; RSI/volume filters can reduce trades in low-momentum periods.
Backtest Observations
Tested on BTC/USDT (4H higher timeframe, default settings: Initial Capital: 100 USDT, ATR SL: 1.5x, ATR TP: 4x) across market conditions, comparing 15-minute and 30-minute charts:
Bull Market (Jul 2023 - Dec 2023):
15-Minute: 277 long, 219 short; Win Rate: 42.74%; P&L: 108%; Drawdown: 1.99%; Profit Factor: 3.074.
30-Minute: 257 long, 215 short; Win Rate: 49.58%; P&L: 116.85%; Drawdown: 2.34%; Profit Factor: 3.14.
Notes: Moving average crossovers and green bar patterns suited this bullish phase; 30-minute improved win rate and P&L by filtering weaker signals.
Bear Market (Jan 2022 - Jun 2022):
15-Minute: 262 long, 211 short; Win Rate: 44.4%; P&L: 239.80%; Drawdown: 3.74%; Profit Factor: 3.419.
30-Minute: 250 long, 200 short; Win Rate: 52.22%; P&L: 258.77%; Drawdown: 5.34%; Profit Factor: 3.461.
Notes: Red bar patterns and RSI shorts thrived in the downtrend; 30-minute cut choppy reversals for better consistency.
Flat Market (Jan 2021 - Jun 2021):
15-Minute: 280 long, 208 short; Win Rate: 51.84%; P&L: 340.33%; Drawdown: 9.59%; Profit Factor: 2.924.
30-Minute: 270 long, 209 short; Win Rate: 55.11%; P&L: 315.42%; Drawdown: 7.21%; Profit Factor: 2.598.
Notes: High trade frequency and P&L showed strength in ranges; 30-minute lowered drawdown for better risk control.
Results reflect historical performance on BTC/USDT with default settings—users should test on their assets and timeframes. Past performance does not guarantee future results and is shared only to illustrate the strategy’s behavior.
Why It Works Well in Flat Markets
A "flat market" lacks strong directional trends, with price oscillating around moving averages, as in Jan 2021 - Jun 2021 for BTC/USDT. This strategy excels here because its crossover-based entries trigger frequently in tight ranges. In trending markets, an exit might not be followed by a new entry without a pullback, but flat markets produce multiple crossovers, enabling more trades. ATR-based TP/SL and trailing stops capture these small swings, while RSI and volume filters ensure momentum, driving high P&L and win rates.
Technical Details
Built in Pine Script v6 for TradingView compatibility.
Prevents overlapping trades with long/short checks.
Handles edge cases like zero division and auto-detects the trading pair’s base currency (e.g., BTC from BTCUSDT).
This strategy suits scalpers seeking structured entries and risk management. Test on 15-minute or 30-minute charts to match your style and market conditions.
QuantJazz Turbine Trader BETA v1.17QuantJazz Turbine Trader BETA v1.17 - Strategy Introduction and User Guide
Strategy Introduction
Welcome to the QuantJazz Turbine Trader BETA v1.17, a comprehensive trading strategy designed for TradingView. This strategy is built upon oscillator principles, drawing inspiration from the Turbo Oscillator by RedRox, and incorporates multiple technical analysis concepts including RSI, MFI, Stochastic oscillators, divergence detection, and an optional FRAMA (Fractal Adaptive Moving Average) filter.
The Turbine Trader aims to provide traders with a flexible toolkit for identifying potential entry and exit points in the market. It presents information through a main signal line oscillator, a histogram, and various visual cues like dots, triangles, and divergence lines directly on the indicator panel. The strategy component allows users to define specific conditions based on these visual signals to trigger automated long or short trades within the TradingView environment.
This guide provides an overview of the strategy's components, settings, and usage. Please remember that this is a BETA version (v1.17). While developed with care, it may contain bugs or behave unexpectedly.
LEGAL DISCLAIMER: QuantJazz makes no claims about the fitness or profitability of this tool. Trading involves significant risk, and you may lose all of your invested capital. All trading decisions made using this strategy are solely at the user's discretion and responsibility. Past performance is not indicative of future results. Always conduct thorough backtesting and risk assessment before deploying any trading strategy with real capital.
This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.
Core Concepts and Visual Elements
The Turbine Trader indicator displays several components in its own panel below the main price chart:
1. Signal Line (Avg & Avg2): This is the primary oscillator. It's a composite indicator derived from RSI, MFI (Money Flow Index), and Stochastic calculations, smoothed using an EMA (Exponential Moving Average).
Avg: The faster smoothed signal line.
Avg2: The slower smoothed signal line.
Color Coding: The space between Avg and Avg2 is filled. The color (Neon Blue/gColor or Neon Purple/rColor) indicates the trend based on the relationship between Avg and Avg2. Blue suggests bullish momentum (Avg > Avg2), while Purple suggests bearish momentum (Avg2 > Avg).
Zero Line Crosses: Crossovers of the Avg line with the zero level can indicate shifts in momentum.
2. Histogram (resMfi): This histogram is based on smoothed and transformed MFI calculations (Fast MFI and Slow MFI).
Color Coding: Bars are colored Neon Blue (histColorUp) when above zero, suggesting bullish pressure, and Neon Purple (histColorDn) when below zero, suggesting bearish pressure. Transparency is applied.
Zero Line Crosses: Crossovers of the histogram with the zero level can signal potential shifts in money flow.
3. Reversal Points (Dots): Dots appear on the Signal Line (specifically on Avg2) when the color changes (i.e., Avg crosses Avg2).
Small Dots: Appear when a reversal occurs while the oscillator is in an "extreme" zone (below -60 for bullish reversals, above +60 for bearish reversals).
Large Dots: Appear when a reversal occurs outside of these extreme zones.
Colors: Blue (gRdColor) for bullish reversals (Avg crossing above Avg2), Purple (rRdColor) for bearish reversals (Avg crossing below Avg2).
4. Take Profit (TP) Signals (Triangles): Small triangles appear above (+120) or below (-120) the zero line.
Bearish Triangle (Down, Purple rTpColor): Suggests a potential exit point for long positions or an entry point for short positions, based on the oscillator losing upward momentum above the 50 level.
Bullish Triangle (Up, Blue gTpColor): Suggests a potential exit point for short positions or an entry point for long positions, based on the oscillator losing downward momentum below the -50 level.
5. Divergence Lines: The strategy automatically detects and draws potential regular and hidden divergences between the price action (highs/lows) and the Signal Line (Avg).
Regular Bullish Divergence (White bullDivColor line, ⊚︎ label): Price makes a lower low, but the oscillator makes a higher low. Suggests potential bottoming.
Regular Bearish Divergence (White bearDivColor line, ⊚︎ label): Price makes a higher high, but the oscillator makes a lower high. Suggests potential topping.
Hidden Bullish Divergence (bullHidDivColor line, ⊚︎ label): Price makes a higher low, but the oscillator makes a lower low. Suggests potential continuation of an uptrend.
Hidden Bearish Divergence (bearHidDivColor line, ⊚︎ label): Price makes a lower high, but the oscillator makes a higher high. Suggests potential continuation of a downtrend.
Delete Broken Divergence Lines: If enabled, newer divergence lines originating from a similar point will replace older ones.
6. Status Line: A visual bar at the top (95 to 105) and bottom (-95 to -105) of the indicator panel. Its color intensity reflects the confluence of signals:
Score Calculation: +1 if Avg > Avg2, +1 if Avg > 0, +1 if Histogram > 0.
Top Bar (Bullish): Bright Blue (gStatColor) if score is 3, Faded Blue if score is 2, Black otherwise.
Bottom Bar (Bearish): Bright Purple (rStatColor) if score is 0, Faded Purple if score is 1, Black otherwise.
Strategy Settings Explained
The strategy's behavior is controlled via the settings panel (gear icon).
1. Date Range:
Start Date, End Date: Define the period for backtesting. Trades will only occur within this range.
2. Optional Webhook Configuration: (For Automation)
3C Email Token, 3C Bot ID: Enter your 3Commas API credentials if you plan to automate trading using webhooks. The strategy generates JSON alert messages compatible with 3Commas. You can go ahead and just leave the text field as defaulted, "TOKEN HERE" / "BOT ID HERE" if not using any bot automations at this time. You can always come back later and automate it. More info can be made available from QuantJazz should you need automation assistance with custom indicators and trading strategies.
3. 🚀 Signal Line:
Turn On/Off: Show or hide the main signal lines (Avg, Avg2).
gColor, rColor: Set the colors for bullish and bearish signal line states.
Length (RSI): The lookback period for the internal RSI calculation. Default is 2.
Smooth (EMA): The smoothing period for the EMAs applied to the composite signal. Default is 9.
RSI Source: The price source used for RSI calculation (default: close).
4. 📊 Histogram:
Turn On/Off: Show or hide the histogram.
histColorUp, histColorDn: Set the colors for positive and negative histogram bars.
Length (MFI): The base lookback period for MFI calculations. Default is 5. Fast and Slow MFI lengths are derived from this.
Smooth: Smoothing period for the final histogram output. Default is 1 (minimal smoothing).
5.💡 Other:
Show Divergence Line: Toggle visibility of regular divergence lines.
bullDivColor, bearDivColor: Colors for regular divergence lines.
Show Hidden Divergence: Toggle visibility of hidden divergence lines.
bullHidDivColor, bearHidDivColor: Colors for hidden divergence lines.
Show Status Line: Toggle visibility of the top/bottom status bars.
gStatColor, rStatColor: Colors for the status line bars.
Show TP Signal: Toggle visibility of the TP triangles.
gTpColor, rTpColor: Colors for the TP triangles.
Show Reversal points: Toggle visibility of the small/large dots on the signal line.
gRdColor, rRdColor: Colors for the reversal dots.
Delete Broken Divergence Lines: Enable/disable automatic cleanup of older divergence lines.
6. ⚙️ Strategy Inputs: (CRITICAL for Trade Logic)
This section defines which visual signals trigger trades. Each signal (Small/Large Dots, TP Triangles, Bright Bars, Signal/Histogram Crosses, Signal/Histogram Max/Min, Divergences) has a dropdown menu:
Long: This signal can trigger a long entry.
Short: This signal can trigger a short entry.
Disabled: This signal will not trigger any entry.
Must Be True Checkbox: If checked for a specific signal, that signal's condition must be met for any trade (long or short, depending on the dropdown selection for that signal) to be considered. Multiple "Must Be True" conditions act as AND logic – all must be true simultaneously.
How it Works:
The strategy first checks if all conditions marked as "Must Be True" (for the relevant trade direction - long or short) are met.
If all "Must Be True" conditions are met, it then checks if at least one of the conditions not marked as "Must Be True" (and set to "Long" or "Short" respectively) is also met.
If both steps pass, and other filters (like Date Range, FRAMA) allow, an entry order is placed.
Example: If "Large Bullish Dot" is set to "Long" and "Must Be True" is checked, AND "Bullish Divergence" is set to "Long" but "Must Be True" is not checked: A long entry requires BOTH the Large Bullish Dot AND the Bullish Divergence to occur simultaneously. If "Large Bullish Dot" was "Long" but not "Must Be True", then EITHER a Large Bullish Dot OR a Bullish Divergence could trigger a long entry (assuming no other "Must Be True" conditions are active).
Note: By default, the strategy is configured for long-only trades (strategy.risk.allow_entry_in(strategy.direction.long)). To enable short trades, you would need to comment out or remove this line in the Pine Script code and configure the "Strategy Inputs" accordingly.
7. 💰 Take Profit Settings:
Take Profit 1/2/3 (%): The percentage above the entry price (for longs) or below (for shorts) where each TP level is set. (e.g., 1.0 means 1% profit).
TP1/2/3 Percentage: The percentage of the currently open position to close when the corresponding TP level is hit. The percentages should ideally sum to 100% if you intend to close the entire position across the TPs.
Trailing Stop (%): The percentage below the highest high (for longs) or above the lowest low (for shorts) reached after the activation threshold, where the stop loss will trail.
Trailing Stop Activation (%): The minimum profit percentage the trade must reach before the trailing stop becomes active.
Re-entry Delay (Bars): The minimum number of bars to wait after a TP is hit before considering a re-entry. Default is 1 (allows immediate re-entry on the next bar if conditions met).
Re-entry Price Offset (%): The percentage the price must move beyond the previous TP level before a re-entry is allowed. This prevents immediate re-entry if the price hovers around the TP level.
8. 📈 FRAMA Filter: (Optional Trend Filter)
Use FRAMA Filter: Enable or disable the filter.
FRAMA Source, FRAMA Period, FRAMA Fast MA, FRAMA Slow MA: Parameters for the FRAMA calculation. Defaults provided are common starting points.
FRAMA Filter Type:
FRAMA > previous bars: Allows trades only if FRAMA is significantly above its recent average (defined by FRAMA Percentage and FRAMA Lookback). Typically used to confirm strong upward trends for longs.
FRAMA < price: Allows trades only if FRAMA is below the current price (framaSource). Can act as a baseline trend filter.
FRAMA Percentage (X), FRAMA Lookback (Y): Used only for the FRAMA > previous bars filter type.
How it Affects Trades: If Use FRAMA Filter is enabled:
Long entries require the FRAMA filter condition to be true.
Short entries require the FRAMA filter condition to be false (as currently coded, this acts as an inverse filter for shorts if enabled).
How to Use the Strategy
1. Apply to Chart: Open your desired chart on TradingView. Click "Indicators", find "QuantJazz Turbine Trader BETA v1.17" (you might need to add it via Invite-only scripts or if published publicly), and add it to your chart. The oscillator appears below the price chart, and the strategy tester panel opens at the bottom.
2. Configure Strategy Properties: In the Pine Script code itself (or potentially via the UI if supported), adjust the strategy() function parameters like initial_capital, default_qty_value, commission_value, slippage, etc., to match your account, broker fees, and risk settings. The user preferences provided (e.g., 1000 initial capital, 0.1% commission) are examples. Remember use_bar_magnifier is false by default in v1.17.
3. Configure Inputs (Settings Panel):
Set the Date Range for backtesting.
Crucially, configure the ⚙️ Strategy Inputs. Decide which signals should trigger entries and whether they are mandatory ("Must Be True"). Start simply, perhaps enabling only one or two signals initially, and test thoroughly. Remember the default long-only setting unless you modify the code.
Set up your 💰 Take Profit Settings, including TP levels, position size percentages for each TP, and the trailing stop parameters. Decide if you want to use the re-entry feature.
Decide whether to use the 📈 FRAMA Filter and configure its parameters if enabled.
Adjust visual elements (🚀 Signal Line, 📊 Histogram, 💡 Other) as needed for clarity.
4. Backtest: Use the Strategy Tester panel in TradingView. Analyze the performance metrics (Net Profit, Max Drawdown, Profit Factor, Win Rate, Trade List) across different assets, timeframes, and setting configurations. Pay close attention to how different "Strategy Inputs" combinations perform.
5. Refine: Based on backtesting results, adjust the input settings, TP/SL strategy, and signal combinations to optimize performance for your chosen market and timeframe, while being mindful of overfitting.
6. Automation (Optional): If using 3Commas or a similar platform:
Enter your 3C Email Token and 3C Bot ID in the settings.
Create alerts in TradingView (right-click on the chart or use the Alert panel).
Set the Condition to "QuantJazz Turbine Trader BETA v1.17".
In the "Message" box, paste the corresponding placeholder, which will pass the message in JSON from our custom code to TradingView to pass through your webhook: {{strategy.order.alert_message}}.
In the next tab, configure the Webhook URL provided by your automation platform. Put a Whale sound, while you're at it! 🐳
When an alert triggers, TradingView will send the pre-formatted JSON message from the strategy code to your webhook URL.
Final Notes
The QuantJazz Turbine Trader BETA v1.17 offers a wide range of customizable signals and strategy logic. Its effectiveness heavily depends on proper configuration and thorough backtesting specific to the traded asset and timeframe. Start with the default settings, understand each component, and methodically test different combinations of signals and parameters. Remember the inherent risks of trading and never invest capital you cannot afford to lose.
Dow Theory Trend StrategyDow Theory Trend Strategy (Pine Script)
Overview
This Pine Script implements a trading strategy based on the core principles of Dow Theory. It visually identifies trends (uptrend, downtrend) by analyzing pivot highs and lows and executes trades when the trend direction changes. This script is an improved version that features refined trend determination logic and strategy implementation.
Core Concept: Dow Theory
The script uses a fundamental Dow Theory concept for trend identification:
Uptrend: Characterized by a series of Higher Highs (HH) and Higher Lows (HL).
Downtrend: Characterized by a series of Lower Highs (LH) and Lower Lows (LL).
How it Works
Pivot Point Detection:
It uses the built-in ta.pivothigh() and ta.pivotlow() functions to identify significant swing points (potential highs and lows) in the price action.
The pivotLookback input determines the number of bars to the left and right required to confirm a pivot. Note that this introduces a natural lag (equal to pivotLookback bars) before a pivot is confirmed.
Improved Trend Determination:
The script stores the last two confirmed pivot highs and the last two confirmed pivot lows.
An Uptrend (trendDirection = 1) is confirmed only when the latest pivot high is higher than the previous one (HH) AND the latest pivot low is higher than the previous one (HL).
A Downtrend (trendDirection = -1) is confirmed only when the latest pivot high is lower than the previous one (LH) AND the latest pivot low is lower than the previous one (LL).
Key Improvement: If neither a clear uptrend nor a clear downtrend is confirmed based on the latest pivots, the script maintains the previous trend state (trendDirection := trendDirection ). This differs from simpler implementations that might switch to a neutral/range state (e.g., trendDirection = 0) more frequently. This approach aims for smoother trend following, acknowledging that trends often persist through periods without immediate new HH/HL or LH/LL confirmations.
Trend Change Detection:
The script monitors changes in the trendDirection variable.
changedToUp becomes true when the trend shifts to an Uptrend (from Downtrend or initial state).
changedToDown becomes true when the trend shifts to a Downtrend (from Uptrend or initial state).
Visualizations
Background Color: The chart background is colored to reflect the currently identified trend:
Blue: Uptrend (trendDirection == 1)
Red: Downtrend (trendDirection == -1)
Gray: Initial state or undetermined (trendDirection == 0)
Pivot Points (Optional): Small triangles (shape.triangledown/shape.triangleup) can be displayed above pivot highs and below pivot lows if showPivotPoints is enabled.
Trend Change Signals (Optional): Labels ("▲ UP" / "▼ DOWN") can be displayed when a trend change is confirmed (changedToUp / changedToDown) if showTrendChange is enabled. These visually mark the potential entry points for the strategy.
Strategy Logic
Entry Conditions:
Enters a long position (strategy.long) using strategy.entry("L", ...) when changedToUp becomes true.
Enters a short position (strategy.short) using strategy.entry("S", ...) when changedToDown becomes true.
Position Management: The script uses strategy.entry(), which automatically handles position reversal. If the strategy is long and a short signal occurs, strategy.entry() will close the long position and open a new short one (and vice-versa).
Inputs
pivotLookback: The number of bars on each side to confirm a pivot high/low. Higher values mean pivots are confirmed later but may be more significant.
showPivotPoints: Toggle visibility of pivot point markers.
showTrendChange: Toggle visibility of the trend change labels ("▲ UP" / "▼ DOWN").
Key Improvements from Original
Smoother Trend Logic: The trend state persists unless a confirmed reversal pattern (opposite HH/HL or LH/LL) occurs, reducing potential whipsaws in choppy markets compared to logic that frequently resets to neutral.
Strategy Implementation: Converted from a pure indicator to a strategy capable of executing backtests and potentially live trades based on the Dow Theory trend changes.
Disclaimer
Dow Theory signals are inherently lagging due to the nature of pivot confirmation.
The effectiveness of the strategy depends heavily on the market conditions and the chosen pivotLookback setting.
This script serves as a basic template. Always perform thorough backtesting and implement proper risk management (e.g., stop-loss, take-profit, position sizing) before considering any live trading.
Trendline Breaks with Multi Fibonacci Supertrend StrategyTMFS Strategy: Advanced Trendline Breakouts with Multi-Fibonacci Supertrend
Elevate your algorithmic trading with institutional-grade signal confluence
Strategy Genesis & Evolution
This advanced trading system represents the culmination of a personal research journey, evolving from my custom " Multi Fibonacci Supertrend with Signals " indicator into a comprehensive trading strategy. Built upon the exceptional trendline detection methodology pioneered by LuxAlgo in their " Trendlines with Breaks " indicator, I've engineered a systematic framework that integrates multiple technical factors into a cohesive trading system.
Core Fibonacci Principles
At the heart of this strategy lies the Fibonacci sequence application to volatility measurement:
// Fibonacci-based factors for multiple Supertrend calculations
factor1 = input.float(0.618, 'Factor 1 (Weak/Fibonacci)', minval = 0.01, step = 0.01)
factor2 = input.float(1.618, 'Factor 2 (Medium/Golden Ratio)', minval = 0.01, step = 0.01)
factor3 = input.float(2.618, 'Factor 3 (Strong/Extended Fib)', minval = 0.01, step = 0.01)
These precise Fibonacci ratios create a dynamic volatility envelope that adapts to changing market conditions while maintaining mathematical harmony with natural price movements.
Dynamic Trendline Detection
The strategy incorporates LuxAlgo's pioneering approach to trendline detection:
// Pivotal swing detection (inspired by LuxAlgo)
pivot_high = ta.pivothigh(swing_length, swing_length)
pivot_low = ta.pivotlow(swing_length, swing_length)
// Dynamic slope calculation using ATR
slope = atr_value / swing_length * atr_multiplier
// Update trendlines based on pivot detection
if bool(pivot_high)
upper_slope := slope
upper_trendline := pivot_high
else
upper_trendline := nz(upper_trendline) - nz(upper_slope)
This adaptive trendline approach automatically identifies key structural market boundaries, adjusting in real-time to evolving chart patterns.
Breakout State Management
The strategy implements sophisticated state tracking for breakout detection:
// Track breakouts with state variables
var int upper_breakout_state = 0
var int lower_breakout_state = 0
// Update breakout state when price crosses trendlines
upper_breakout_state := bool(pivot_high) ? 0 : close > upper_trendline ? 1 : upper_breakout_state
lower_breakout_state := bool(pivot_low) ? 0 : close < lower_trendline ? 1 : lower_breakout_state
// Detect new breakouts (state transitions)
bool new_upper_breakout = upper_breakout_state > upper_breakout_state
bool new_lower_breakout = lower_breakout_state > lower_breakout_state
This state-based approach enables precise identification of the exact moment when price breaks through a significant trendline.
Multi-Factor Signal Confluence
Entry signals require confirmation from multiple technical factors:
// Define entry conditions with multi-factor confluence
long_entry_condition = enable_long_positions and
upper_breakout_state > upper_breakout_state and // New trendline breakout
di_plus > di_minus and // Bullish DMI confirmation
close > smoothed_trend // Price above Supertrend envelope
// Execute trades only with full confirmation
if long_entry_condition
strategy.entry('L', strategy.long, comment = "LONG")
This strict requirement for confluence significantly reduces false signals and improves the quality of trade entries.
Advanced Risk Management
The strategy includes sophisticated risk controls with multiple methodologies:
// Calculate stop loss based on selected method
get_long_stop_loss_price(base_price) =>
switch stop_loss_method
'PERC' => base_price * (1 - long_stop_loss_percent)
'ATR' => base_price - long_stop_loss_atr_multiplier * entry_atr
'RR' => base_price - (get_long_take_profit_price() - base_price) / long_risk_reward_ratio
=> na
// Implement trailing functionality
strategy.exit(
id = 'Long Take Profit / Stop Loss',
from_entry = 'L',
qty_percent = take_profit_quantity_percent,
limit = trailing_take_profit_enabled ? na : long_take_profit_price,
stop = long_stop_loss_price,
trail_price = trailing_take_profit_enabled ? long_take_profit_price : na,
trail_offset = trailing_take_profit_enabled ? long_trailing_tp_step_ticks : na,
comment = "TP/SL Triggered"
)
This flexible approach adapts to varying market conditions while providing comprehensive downside protection.
Performance Characteristics
Rigorous backtesting demonstrates exceptional capital appreciation potential with impressive risk-adjusted metrics:
Remarkable total return profile (1,517%+)
Strong Sortino ratio (3.691) indicating superior downside risk control
Profit factor of 1.924 across all trades (2.153 for long positions)
Win rate exceeding 35% with balanced distribution across varied market conditions
Institutional Considerations
The strategy architecture addresses execution complexities faced by institutional participants with temporal filtering and date-range capabilities:
// Time Filter settings with flexible timezone support
import jason5480/time_filters/5 as time_filter
src_timezone = input.string(defval = 'Exchange', title = 'Source Timezone')
dst_timezone = input.string(defval = 'Exchange', title = 'Destination Timezone')
// Date range filtering for precise execution windows
use_from_date = input.bool(defval = true, title = 'Enable Start Date')
from_date = input.time(defval = timestamp('01 Jan 2022 00:00'), title = 'Start Date')
// Validate trading permission based on temporal constraints
date_filter_approved = time_filter.is_in_date_range(
use_from_date, from_date, use_to_date, to_date, src_timezone, dst_timezone
)
These capabilities enable precise execution timing and market session optimization critical for larger market participants.
Acknowledgments
Special thanks to LuxAlgo for the pioneering work on trendline detection and breakout identification that inspired elements of this strategy. Their innovative approach to technical analysis provided a valuable foundation upon which I could build my Fibonacci-based methodology.
This strategy is shared under the same Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license as LuxAlgo's original work.
Past performance is not indicative of future results. Conduct thorough analysis before implementing any algorithmic strategy.