Leledc Exhaustion Bar does a great job of pointing out when a trend may be coming to an end.
An Exhaustion Bar is a bar which signals the exhaustion of the trend in the current direction. In other words, an exhaustion bar is “A bar of the last seller” in case of a downtrend and “A bar of last buyer” in case of an uptrend. Having said that when a party cannot take the price further in their direction, naturally the other party comes in, takes charge and reverses the direction of the trend.
Note: This indicator does not repaint
An Exhaustion Bar is a bar which signals the exhaustion of the trend in the current direction. In other words, an exhaustion bar is “A bar of the last seller” in case of a downtrend and “A bar of last buyer” in case of an uptrend. Having said that when a party cannot take the price further in their direction, naturally the other party comes in, takes charge and reverses the direction of the trend.
Note: This indicator does not repaint
thinkScript Code
Code:
#Leledc Exhaustion Port
#Joy_Bangla
#
#https://www.tradingview.com/script/pQv1kge2-Leledc-Exhaustion-V4/
#The Psychology
#Let's assume that we have a group of people, say 100 people who decide to go for a casual running.
#After running for a few KM's few of them will say “I am exhausted. I cannot run further”.
#They will quit running. After running further, another bunch of runners will say I am exhausted. I can’t run further
#and they also will quit running. This goes on and on and then there will be a stage where only a few will be left
#in the running. Now a stage will come where the last person left in the running will say am exhausted and he stops running.
#That means no one is left now in the running. This means all are exhausted in the running.
#
#The same way an exhaustion bar works. The reason is an exhaustion bar sometimes formed at almost tops and bottoms.
#
#Timeframe
#The exhaustion bars are found on all Time frames as a trend also exists on all Timeframes.
#However, as a thumb rule Higher the Time frame, higher will be the accuracy as well as the profitability.
#
#Trading the Leledec Exhaustion Bars
#I may trade as soon as it is shown on the chart.
#I may trade when price breaks the high/low of the bar depending on whether I am getting bullish or bearish signal
#I may trade when price breaks the high/low of the bar depending on whether I am getting bullish or bearish signal.
#I may also be looking to ensure the current volume is higher than the previous few
#(? how many?) bar volumes.
#
# Ported 2019.11.16
# Release 1.0
#
input maj_qual = 6;
input maj_len = 30;
script lele {
input qual = 6; #default major
input len = 30; #default major
def bIndex = CompoundValue(1,
if (bIndex[1] > qual) and (close < open) and high >= Highest(high, len) then 0 else
if (close > close[4]) then bIndex[1] + 1 else bIndex[1]
, 0);
def sIndex = CompoundValue(1,
if ((sIndex[1] > qual) and (close > open) and (low <= Lowest(low, len))) then 0 else
if (close < close[4]) then sIndex[1] + 1 else sIndex[1]
, 0);
def ret =
if (bIndex[1] > qual) and (close < open) and high >= Highest(high, len) then -1 else
if ((sIndex[1] > qual) and (close > open) and (low <= Lowest(low, len))) then 1
else 0;
plot sData = ret;
}
#PLOTS
def major = lele(maj_qual,maj_len);
plot pUP = major == 1;
pUP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
pUP.SetDefaultColor(Color.GREEN);
pUP.SetLineWeight(2);
plot pDown = major == -1;
pDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
pDown.SetDefaultColor(Color.RED);
pDown.SetLineWeight(2);
# Alerts
Alert(pUP, " ", Alert.Bar, Sound.Chimes);
Alert(pDown, " ", Alert.Bar, Sound.Bell);
Last edited by a moderator: