Mobius Thrust Bars Plots Volume and True Range in the same scale.
Per Mobius:
Per Mobius:
Adjust the Thrust Limit to fit your strategy best. The Default Thrust Limit excludes 99% of bars. It is plotting only the most recent of the top 1%.When price is expanding and is accompanied by higher volume, a trend is typically ending or beginning.
Ruby:
# Thrust Bars
# Mobius
# Plots Volume and True Range in the same scale. When price expands accompanied by higher volume a trend is typically ending or beginning. Defult ThrustLimit excludes 99% of bars. Plotting only the most recent of the top 1%.
input n = 20;
input ThrustLimit = .99; #hint ThrustLimit: Percentile of bar to exclude.
def h = high;
def l = low;
def c = close;
def v = volume;
def x = barNumber();
def TR = TrueRange(h, c, l);
def TRh = highest(TR, n);
def TRl = lowest(TR, n);
def TRm = (TR - TRl) / (TRh - TRl);
def Vh = highest(v, n);
def Vl = lowest(v, n);
def Vm = (v - Vl) / (Vh - Vl);
def T_Bar = if TRm >= ThrustLimit and
Vm >= ThrustLimit
then x
else double.nan;
def T_h = if !isNaN(T_Bar)
then h
else T_h[1];
def T_l = if !isNaN(T_Bar)
then l
else t_l[1];
plot ThrustBar_h = if x >= HighestAll(T_Bar)
then HighestAll(if isNaN(c[-1])
then T_h
else double.nan)
else double.nan;
ThrustBar_h.SetDefaultColor(Color.dark_gray);
plot ThrustBar_l = if x >= HighestAll(T_Bar)
then HighestAll(if isNaN(c[-1])
then T_l
else double.nan)
else double.nan;
ThrustBar_l.SetDefaultColor(Color.dark_gray);
AddCloud(ThrustBar_l, ThrustBar_h, color.dark_gray, color.dark_gray);
# End Code