Cybersloth
Member
@TraderZen : I'm kind of knocked out nobody has provided any appreciation for your thoughtful indicator and I'm sorry I didn't see it until now. Is there any chance you can add the Cong Adaptive Moving Average, with the option to use either maximum range or price displacement? I include the formulae below:
Cong Adaptive Moving Average
input price = close;
input length = 10;
input mode = {default "maximum range", "price displacement"};
def result;
switch (mode) {
case "maximum range":
result = Highest(high, length) - Lowest(low, length);
case "price displacement":
result = AbsValue(close - close[length]);
}
def effort = Sum(TrueRange(high, close, low), length);
def alpha = result / effort;
def cama = CompoundValue(1, alpha * price + (1 - alpha) * cama[1], price);
plot MovAvgAdaptive = cama;
MovAvgAdaptive.SetDefaultColor(GetColor(1));
Cong Adaptive Moving Average
input price = close;
input length = 10;
input mode = {default "maximum range", "price displacement"};
def result;
switch (mode) {
case "maximum range":
result = Highest(high, length) - Lowest(low, length);
case "price displacement":
result = AbsValue(close - close[length]);
}
def effort = Sum(TrueRange(high, close, low), length);
def alpha = result / effort;
def cama = CompoundValue(1, alpha * price + (1 - alpha) * cama[1], price);
plot MovAvgAdaptive = cama;
MovAvgAdaptive.SetDefaultColor(GetColor(1));