DojiCandle body size RSI-SMMA filter MTF
Mar 10, 2023

The DojiCandle body size RSI-SMMA filter MTF indicator identifies potential trend reversals and continuations by combining candle body analysis, relative strength, and long-term trend filtering. It provides actionable buy and sell signals based on Doji candlestick patterns that occur within specific RSI extreme levels and align with the smoothed moving average trend.
Usage
The Usage section describes how the script can be used to identify high-probability trade setups.
- Bullish Signal: A buy signal is generated when the price is above the SMMA 200, the RSI is (or recently was) in the oversold territory (below 30), and a bullish Doji candle forms.
- Bearish Signal: A sell signal is generated when the price is below the SMMA 200, the RSI is (or recently was) in the overbought territory (above 70), and a bearish Doji candle forms.
The indicator automatically changes the color of the SMMA and the price bars to reflect the current trend direction. Users can look for signals specifically when the price retraces toward the SMMA or during trend exhaustion indicated by the RSI levels.
Details
This script is inspired by the combination of RSI and engulfing patterns but focuses on the Doji candlestick. Unlike traditional Doji definitions, this tool allows for a flexible "Body Size" parameter to define what constitutes a Doji relative to the candle's range.
The integration of the SMMA 200 acts as a structural filter to ensure trades are taken in the direction of the primary trend. The RSI filter includes a lookback mechanism, checking the current and previous two bars to ensure the momentum context remains valid even if the RSI has just ticked out of the extreme zones.
Settings
DojiCandle
- Body Size: Determines the maximum allowed ratio of the candle body relative to its total range to be considered a Doji.
RSI Settings
- RSI Source: The price source used for RSI calculations (default is Close).
- RSI Length: The lookback period for the RSI calculation.
- RSI Overbought Level: The threshold used to identify overbought conditions (default is 70).
- RSI Oversold Level: The threshold used to identify oversold conditions (default is 30).
SMMA Filter
- Use SMMA Filter: Toggles the long-term trend filter. If disabled, signals will appear regardless of the price's position relative to the SMMA.
- SMMA Length: The lookback period for the Smoothed Moving Average (default is 200).
FAQ
How do I use the Body Size setting?
The Body Size setting allows you to control how "strict" the Doji detection is. A smaller value requires a smaller body relative to the candle's range, while a larger value allows for more standard-looking candles to trigger signals.
Can I use this on different timeframes?
Yes, the script is designed for Multi-Timeframe (MTF) use. You can apply it to any chart timeframe, and the calculations will adjust based on the current chart's data.
How can I access the DojiCandle body size RSI-SMMA filter MTF?
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.