OPEN-SOURCE SCRIPT
Rifle Unified

This script is designed for use on 30-second charts of Dow Jones-related symbols (YM, MYM, US30). It provides automated buy and sell signals using a combination of price action, RSI (Relative Strength Index), and volume analysis. The script is intended for both live trading signals and backtesting, with configurable risk management and debugging features.
Core Functionality
1. Signal Generation Logic
Buy Signal: A buy is triggered if, after setup:
2. Trade Management
3. Filters & Enhancements
User Inputs & Customization
Technical Features
Intended Use
Notable Customization & Extension Points
This script is highly modular, with extensive user controls, and is suitable for both live trading and historical analysis of Dow Jones index movements
Core Functionality
1. Signal Generation Logic
- Trigger: The algorithm looks for a sharp price move (drop or rise) of a user-defined threshold (default: 80 points) within a specified lookback window (default: 20 minutes).
- Levels: It monitors for price drops below specific numerical levels ending in 23, 43, or 73 (e.g., 42223, 42273).
- RSI Condition: When price falls below one of these levels and the RSI is below 30, the setup is considered active.
Buy Signal: A buy is triggered if, after setup:
- Price rises back above the level,
- The RSI rate of change (ROC) indicates exhaustion of the drop,
- The current bar shows positive momentum.
2. Trade Management
- Stop Loss & Take Profit: Configurable fixed or trailing stop loss and take profit levels are plotted and managed automatically.
- Exit Signals: The script signals exit based on price action relative to these risk management levels.
3. Filters & Enhancements
- Parabolic Move Filter: Prevents entries during extreme price moves.
- Dead Cat Bounce Filter: Avoids false signals after sharp reversals.
- Volume Filter: Optionally requires volume conditions for trade entries (especially for shorts).
- Multiple Confirmation Layers: Includes checks for 5-minute RSI, momentum, and price retracement.
User Inputs & Customization
- Trade Direction: Toggle between LONG and SHORT signal generation.
- Trigger Settings: Adjust thresholds for price moves, lookback windows, RSI ROC, and volume requirements.
- Trade Settings: Set take profit, stop loss, and trailing stop behavior.
- Debug & Visualization: Enable or disable various plots, labels, and debug tables for in-depth analysis.
- Backtesting: Integrated backtester with summary and detailed statistics tables.
Technical Features
- Uses External Libraries: Relies on RifleShooterLib for core logic and BackTestLib for backtesting and statistics.
- Multi-timeframe Analysis: Incorporates both 30-second and 5-minute RSI calculations.
- Chart Annotations: Plots entry/exit points, risk levels, and debug information directly on the chart.
- Alert Conditions: Built-in alert triggers for key events (initial move, stall, entry).
Intended Use
- Markets: Dow Jones symbols (YM, MYM, US30, or US30 CFD).
- Timeframe: 30-second chart.
- Purpose: Automated signal generation for discretionary or algorithmic trading, with robust risk management and backtesting support.
Notable Customization & Extension Points
- Momentum Calculation: Plans to replace the current momentum measure with "sqz momentum".
- Displacement Logic: Future update to use "FVG concept" for displacement.
- High-Contrast RSI: Optional visual enhancements for RSI extremes.
- Time-based Stop: Consideration for adding a time-based stop mechanism.
This script is highly modular, with extensive user controls, and is suitable for both live trading and historical analysis of Dow Jones index movements
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.