OPEN-SOURCE SCRIPT

Kaufman Moving Average Adaptive (KAMA) Backtest

Everyone wants a short-term, fast trading trend that works without large
losses. That combination does not exist. But it is possible to have fast
trading trends in which one must get in or out of the market quickly, but
these have the distinct disadvantage of being whipsawed by market noise
when the market is volatile in a sideways trending market. During these
periods, the trader is jumping in and out of positions with no profit-making
trend in sight. In an attempt to overcome the problem of noise and still be
able to get closer to the actual change of the trend, Kaufman developed an
indicator that adapts to market movement. This indicator, an adaptive moving
average (AMA), moves very slowly when markets are moving sideways but moves
swiftly when the markets also move swiftly, change directions or break out of
a trading range.

You can change long to short in the Input Settings
Please, use it only for learning or paper trading. Do not for real trading.
algotradingbacktestbacktestingMoving AveragesstrategyTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer