AnimalMother
New member
Hello traders. I need a bit of help changing the direction of the negative values (white histogram) in Mashume's Tick Delta study so it points in the same direction as Mobius Volume Waves or viceversa. It would be nice to have both indicators point in the same direction. Thank you.
Below are the original codes
######################
######################
######################
######################
######################
######################
@mashume @BenTen @SleepyZ
Below are the original codes
Ruby:
#Author: Mashume
#Tick Delta
#2022 V.2
declare lower;
input length = 15;
def trend_change = if (open[1] < close[1] and open > close) or (open[1] > close[1] and open < close) then 1 else 0;
def direction = if (open[1] < close[1] and open > close) then -1 else if (open[1] > close[1] and open < close) then 1 else direction[1];
def cumulative_trend_tick_count = if trend_change == 1 then direction * tick_count() else cumulative_trend_tick_count[1] + (direction * tick_count());
def CTTC = cumulative_trend_tick_count;
plot sumsum = Sum(CTTC, length) / length;
sumsum.SetDefaultColor(Color.BLACK);
sumsum.AssignValueColor(if sumsum <= 0 then Color.Red else Color.Green);
sumsum.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
sumsum.hide();
plot Ctick = cumulative_trend_tick_count;
Ctick.AssignValueColor(if CTTC <= 0 then Color.White else Color.Yellow);
Ctick.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
#End Code Mashume Tick Delta
######################
######################
######################
######################
######################
######################
Ruby:
# Mobius Volume Wave
# V01.2020
# Plots Volume Waves based on trend.
declare lower;
input n = 20;
DefineGlobalColor("LabelGreen", CreateColor(255, 255, 0)) ;
def v = volume;
def accumulation = isAscending(HLc3, n);
def distribution = isDescending(Hlc3, n);
def w = if accumulation and !accumulation[1]
then v
else if distribution and !distribution[1]
then v
else w[1] + v;
plot waves = w;
waves.SetPaintingStrategy(PaintingStrategy.Histogram);
waves.AssignValueColor(if accumulation
then GlobalColor("LabelGreen")
else if distribution
then color.Light_Gray
else color.yellow);
# End Code Mobius Volume Waves