Public signals — official ExoScope featured rows are pinned at the top.
TTM-style squeeze: fires when the Bollinger bands, which had contracted inside the Keltner channel, expand back out — in the direction of MACD momentum.
const bbPeriod = input('bb_period', 20, { min: 10, max: 50 });
const kcMult = input('kc_mult', 1.5, { min: 1, max: 3, type: 'float' });
const minGap = input('min_gap', 10, { min: 5, max: 40 });
const bb = ta.bb(close, bbPeriod, 2);
const kc = ta.keltner(high, low, close, bbPeriod, bbPeriod, kcMult);
const macd = ta.macd(close);
let last = -minGap;
let squeezeOn = false;
for (let i = bbPeriod; i < barCount; i++) {
if (bb.upper[i] === null || bb.lower[i] === null || kc.upper[i] === null || kc.lower[i] === null) continue;
const inSqueeze = bb.upper[i] < kc.upper[i] && bb.lower[i] > kc.lower[i];
const released = squeezeOn && !inSqueeze;
squeezeOn = inSqueeze;
if (!released || i - last < minGap) continue;
const hist = macd.histogram[i];
if (hist === null) continue;
if (hist > 0) { signal(i, 'buy', close[i], 'Squeeze up'); last = i; }
else if (hist < 0) { signal(i, 'sell', close[i], 'Squeeze down'); last = i; }
}
Code runs in a sandboxed Web Worker — no network or DOM access. Use at your own risk. Not financial advice.