Triple Moving Averages + RSI Divergence + Trade Creator
Sep 23, 2023

The Triple Moving Averages + RSI Divergence + Trade Creator tool provides a comprehensive trend-following and trade management system by combining triple moving averages, linear regression analysis, and an automated trade setup dashboard. It aims to identify prevailing trends and potential reversals while streamlining risk management and P&L estimation directly on the chart.
Usage
The Usage section focuses on how to interpret the trend signals and utilize the trade management features. The script identifies trend milestones based on the interactions of three moving averages (Fast, Medium, and Slow).
- Trend Identification: Users should observe the "Market Outlook" to identify the current stage of a trend, ranging from initial momentum to trend termination.
- Trade Strategy: By adjusting the "Side" setting to 'Auto', the script suggests Long or Short positions based on current data. Users can manually override this to design specific setups.
- Risk Management: The tool calculates optimal targets and stop-losses based on input preferences for ROI, Maximum Loss, and RRR (Risk Reward Ratio). Adjusting the "Leverage" and "Equity investment per trade" settings will dynamically update the trade rating and estimated P&L metrics.
- Linear Regression Analysis: Users can monitor the linear regression of both closing price and RSI to confirm trend strength or spot potential divergences that may signal an upcoming reversal.
- Trade Box: Enabling the "Show Trade Box" allows for a visual representation of profit/loss zones and entry/exit levels on the chart.
Details
The script utilizes a triple moving average crossover system (SMA or EMA) to categorize the market state. It tracks specific milestones:
- Initial Momentum: Early signs of a shift in average alignment.
- Trend Start: Confirmation of a trend direction.
- Entry Zone: A calculated area where risk-to-reward parameters are statistically favorable.
- Buy/Sell Signals: Specific trigger points for trade execution.
The linear regression component calculates the best-fit line for both price and RSI starting from the beginning of the current trend. This provides a mathematical view of momentum relative to price action. The "Trade Creator" engine calculates position sizing, accounting for broker fees and leverage, to provide a "Trade Rating" based on user-defined minimum entry prerequisites.
Settings
Moving Averages
- Type: Toggle between Simple (SMA) and Exponential (EMA) moving averages.
- Fast/Medium/Slow: Define the lookback periods for the three averages used for trend detection.
RSI & Divergence
- Show RSI box: Toggles the visibility of the RSI and Linear Regression overlay.
- Vertical size of RSI box: Adjusts the scale of the RSI window (Compact, Normal, Large).
- Auto RSI Divergence: Automatically detects discrepancies between price linear regression and RSI linear regression.
Trade Setup
- Side: Select 'Auto' for algorithmic detection, or 'Long'/'Short' for manual planning.
- Leverage (x): Set the multiplier for capital to calculate ROE and liquidation risks.
- Target/Entry Levels: Options to anchor entry and exit prices to specific moving averages or historical highs/lows.
Risk & Economics
- Equity investment per entry (%): The percentage of total equity allocated to a single trade.
- Stoploss size: Sets the stop-loss distance (Tight, Medium, Loose).
- Available equity: The base currency amount used to calculate P&L in nominal terms.
- Exchange Fees: Input fields for entry and exit fee percentages to improve P&L accuracy.
Entry Conditions
- Min winning ROI/RRR: Thresholds that must be met for the "Trade Rating" to indicate a valid setup.
- Minimum Trade Rating (%): The total score required to trigger an entry signal.
FAQ
How do I interpret the Trade Rating? The Trade Rating is a percentage score based on how many of your custom entry conditions (ROI, RRR, RSI Divergence, etc.) are currently met. A higher percentage indicates a setup that aligns better with your defined strategy.
What do the different colors in the linear regression lines mean? The lines are colored green during bullish trends and red during bearish trends. They represent the mathematical slope of price and RSI, helping you identify if momentum is accelerating or slowing down.
How can I access this tool? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.