TASC Issue Indicators & Ideas in afl

Technical Analysis of Stocks & Commodities (TASC) is a highly respected monthly publication catering to traders, investors, and developers interested in technical analysis, trading systems, and market indicators. Since its inception in 1982, TASC has been a go-to resource for cutting-edge trading ideas, algorithmic strategies, and in-depth explorations of technical indicators.
This thread is initiative from myself to focus on:

Introducing and summarizing notable new indicators from each TASC issue
Implementing these indicators in Amibroker using AFL
Sharing insights, improvements, and adaptations where relevant

:date: Latest TASC Issue Highlights

As of May 2025, the latest TASC issue includes indicators and strategies such as:

  • A new variation on adaptive moving averages
  • A momentum-based trend strength filter
  • Techniques on market regime classification

I aim to convert these ideas into ** AFL code** with visual plots, parameter tuning options, and compatibility with Amibroker’s backtesting features.

If anyone is interested or want a specific indicator from previous issue I can give it a try as well.
I understand there might be some redundancy in the TASC indicator or idea is much similar to already available indicator, but at the end the slightest improvement that you can add to your trading system can give you extreme edge in the market.

3 Likes

Here is my trial for Trading the channel May 2025 Issue
I directly converted python to afl with some artificial intelligence support, replaced raw implementation with available functions in afl

// -------- INPUT PARAMETERS -------------
period = Param("Period", 140, 10, 500, 1);     // Linear regression lookback
zone   = Param("Zone", 0.20, 0.01, 1.0, 0.01); // Zone width for targets
// ---------------------------------------
/*
// Calculate Linear Regression Line
x = Cum(1); // Simulated x-values (1,2,3,...)
x0 = Ref(x, -period + 1); // Align to rolling window

sumX  = Sum(x0, period);
sumY  = Sum(Close, period);
sumXY = Sum(x0 * Close, period);
sumXX = Sum(x0 * x0, period);

m = (period * sumXY - sumX * sumY) / (period * sumXX - sumX * sumX);
b = (sumY - m * sumX) / period;
*/
m=LinRegSlope(Close,period);
lrLine =LinearReg(Close,period); //m * x0 + b;

// Distance between price and regression line
diff = Close - lrLine;

// Compute upper and lower channel lines
maxDiff = hhv(diff, period);
minDiff = llv(diff, period);
upperLine = lrLine + maxDiff;
lowerLine = lrLine + minDiff;

// Compute upper and lower targets
range = upperLine - lowerLine;
upperTarget = upperLine - zone * range;
lowerTarget = lowerLine + zone * range;

// --------- Plotting ----------
Plot(Close, "Close", colorDefault, styleLine);
Plot(lrLine, "LR Line", colorBlue, styleLine);
Plot(upperLine, "Upper Line", colorGreen, styleDashed);
Plot(lowerLine, "Lower Line", colorRed, styleDashed);
Plot(upperTarget, "Upper Target", colorGreen, styleDots);
Plot(lowerTarget, "Lower Target", colorRed, styleDots);

// Optional slope display in Title
slopeDisp = StrFormat("Slope = %.5f", (m));
Title = Name() + " - Linear Regression Channel\n" + slopeDisp;

[Trading The Channel May 2025 Python code ] (TRADERS’ TIPS - MAY 2025)

7 Likes