Ttm squeeze pro

Hi!
I found the code for the TTM SQUEEZE PRO indicator on internet.
But it is the Tradingview code. I´m trying to translate the code to afl.
I have now run in to a problem.Processing: TTM Squeeze under utv..afl...

There is one line in the code, see below:
mom = linearreg(close - ma(avg(highest(high, length), lowest(low, length)), ma(close, length)), length, 0);

Does anyone know how to code this in afl?

Best regards,
Leif Axelsson
Sweden

length = 20;
avg1 = (HHV(H, length)+LLV(L, length)) * 0.5;
avg2 = (avg1 + MA(C, length)) * 0.5;
mom = LinearReg(C - avg2, length);
2 Likes

Many thanks!

Shall try this!

/Leif

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.