Q Indicator for Amibroker (AFL)
AMIBROKER: TREND-QUALITY-BALANCE INDICATOR
In “Trend-Quality Indicator” in this issue, David Sepiashvili presents an innovative trend-detection tool — the trend-quality indicator — that attempts to estimate the trend in relation to noise.
Calculations presented in the article can be easily reproduced using AmiBroker Formula Language. The only tricky part is a piecewise exponential moving average that restarts the calculations on every moving average crossover, but we managed to implement it in two lines of code, thanks to AmiBroker’s powerful Ama2 function, which allows easy implementation of all kinds of single-order infinite impulse response filters.
Listing 1 shows ready-to-use indicator code to plot the Q-indicfator. In AmiBroker, select Indicator Builder from the Analysis menu, click the “Add” button, enter the formula, and then press “Apply.” Figure 3 shows a sample chart. reproduces the chart presented in Sepiashvili’s article.
—Tomasz Janeczko, AmiBroker.com
Submitted by persee about 6 years ago
Please login here to leave a comment.