Nur Nutzer, die das Produkt gekauft oder gemietet haben, können Kommentare hinterlassen
Ryan Paul Kennedy  

KAB v1.41

The indicator now runs with series indexing, has safer initialization, more robust parameter validation, and a much smarter volatility lock (hysteresis + optional timed release).

In other words, it's more efficient, more reliable, and smarter.

It also gains an option to operate strictly on closed bars to avoid repaint-style behavior on the forming bar.

Although, having said that, repainting is already avoided by a variety of functions:

1. Closed-bar policy

input bool useClosedOnly = false; // use bar-1 at bar 0

2. Use the previous closed bar’s index everywhere the “current” bar is referenced

int piStart = useClosedOnly ? MathMax(start,1) : start;

int pi = useClosedOnly ? MathMax(i,1) : i;

3. All state/price lookbacks use only prior closes

double sATR = CalcTR(high[piStart], low[piStart], close[piStart+1]);

double tr = CalcTR(high[pi], low[pi], close[pi+1]);

double unsm = prev + alpha * (close[pi] - prev);

4. Seed/recursion is strictly causal (each bar depends only on the previous output)

if(prev_calculated == 0) m_kabBuffer[start] = close[piStart];

double prev = (i==start ? m_kabBuffer[i] : m_kabBuffer[i+1]);


KAB is context-aware where traditional Moving Averages are static. When choosing a baseline, choose KAB.