Elephant Bars Single Retracement flags candles whose body is at least a set multiple of the average body, then marks a following bar as a retracement when its body is small relative to the elephant bar and its price stays within a set fraction of the elephant bar's range. A further marker appears when a later bar closes beyond the retracement bar in the elephant's direction. Three optional simple moving averages are included.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Length of the lookback period in the calculation of SMA for the body range of the bars.
int
100
averageRangeBacklog
The threshold a bar's body range must exceed in order to be classied as an Elephant.
float
1.5
elephantBarThreshold
The threshold a bar's body range must NOT exceed in order to be classified as a Retracemnt, calculated as a percentage o
float
0.50
retracementBodyThreshold
The threshold a bar's price must NOT exceed away from the Elephant bar's close to be classified as a retracement, calcul
float
0.25
retracementPriceThreshold
The total number of bars a retracment consolidation can last before an Elephant is abondoned
int
2
retracementConsolidatonMaxLength
Enable 1st MA
bool
true
a
Enable 2nd MA
bool
true
b
Enable 3rd MA
bool
true
c
Length1
int
3
len1
Length2
int
8
len2
Length3
int
21
len3
Source1
source
close
src1
Show all 14 settings
Setting
Type
Default
Variable
Source2
source
close
src2
Source3
source
close
src3
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a
This educational script demonstrates custom candlestick rendering on the price chart using the plotcandle function. It calculates a 20-period Simple Moving Average and checks if the bar's low price remains strictly above it. When the condition is met, the indi
This indicator identifies candlestick patterns on the price chart by combining price action with momentum factors and trend filters. It calculates one of four selectable oscillators: Karobein Oscillator, Money Flow Index, RSI, or Stochastic, alongside trend ru
This indicator draws smoothed candlesticks on the price chart. It applies a simple moving average of a user-set length, defaulting to nine, separately to open, high, low, and close, then plots those four values with plotcandle. Wick color is green when the raw
Major Buy Setup plots a 20-period and a 50-period simple moving average on the price chart. It marks a buy when the current bar is both a bullish engulfing candle and a bald bull candle, defined as a green candle whose upper shadow is no more than five percent
30 min Pivot is an overlay indicator that plots an exponential moving average (EMA) calculated from a specified timeframe (default 30 minutes) and flags specific multi-bar candle setups. It checks the relative distance between price and the higher-timeframe EM