OPEN-SOURCE SCRIPT

RSI Momentum Trend MM with Risk Per Trade [MTF]

103
This is a comprehensive and highly customizable trend-following strategy based on RSI momentum. The core logic identifies strong directional moves when the RSI crosses user-defined thresholds, combined with an EMA trend confirmation. It is designed for traders who want granular control over their strategy's parameters, from signal generation to risk management and exit logic.

This script evolves a simple concept into a powerful backtesting tool, allowing you to test various money management and trade management theories across different timeframes.

Key Features

- RSI Momentum Signals: Uses RSI crosses above a "Positive" level or below a "Negative" level to generate trend signals. An EMA filter ensures entries align with the immediate trend.

- Multi-Timeframe (MTF) Analysis: The core RSI and EMA signals can be calculated on a higher timeframe (e.g., using 4H signals to trade on a 1H chart) to align trades with the larger trend. This feature helps to reduce noise and improve signal quality.

Advanced Money Management

- Risk per Trade %: Calculate position size based on a fixed percentage of equity you want to risk per trade.

- Full Equity: A more aggressive option to open each position with 100% of the available strategy equity.

Flexible Exit Logic: Choose from three distinct exit strategies to match your trading style

- Percentage (%) Based: Set a fixed Stop Loss and Take Profit as a percentage of the entry price.

- ATR Multiplier: Base your Stop Loss and Take Profit on the Average True Range (ATR), making your exits adaptive to market volatility.

- Trend Reversal: A true trend-following mode. A long position is held until an opposite "Negative" signal appears, and a short position is held until a "Positive" signal appears. This allows you to "let your winners run."

Backtest Date Range Filter: Easily configure a start and end date to backtest the strategy's performance during specific market periods (e.g., bull markets, bear markets, or high-volatility periods).

How to Use

RSI Settings

- Higher Timeframe: Set the timeframe for signal calculation. This must be higher than your chart's timeframe.

- RSI Length, Positive above, Negative below: Configure the core parameters for the RSI signals.

Money Management

Position Sizing Mode

- Choose "Risk per Trade" to use the Risk per Trade (%) input for precise risk control.

- Choose "Full Equity" to use 100% of your capital for each trade.

- Risk per Trade (%): Define the percentage of your equity to risk on a single trade (only works with the corresponding sizing mode).

SL/TP Calculation Mode

Select your preferred exit method from the dropdown. The strategy will automatically use the relevant inputs (e.g., % values, ATR Multiplier values, or the trend reversal logic).

Backtest Period Settings

Use the Start Date and End Date inputs to isolate a specific period for your backtest analysis.

License & Disclaimer
© waranyu.trkm — MIT License.

This script is for educational purposes only and should not be considered financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and risk assessment before making any trading decisions.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.