In thinkorswim they have an indicator I like which is good at picking up end-of-trends. Here is the code in their scripting language
declare lower;
input length = 14;
def inert = Inertia(close, length);
plot LRR = if inert >= inert[1] then 1 else -1;
LRR.SetDefaultColor(GetColor(8));
plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(5));The crux of the calculation is an Inertia() function. Is there something similar in NT? I'm wondering if there's a similar indicator available for NT, or if somebody knew a formula for calculating inertia.
I like to use linear regression lines for exits on positions that run away: as it rides above the line it steepens and gets tighter to price. If prices closes through to the other side of the line it's probably time to get out. Not as good for shorter profit target taking/scalping though. But it's good for detecting trend reversals...when you're not in chop.