ExoScope Signal
ExoScope Trend Follow
EMA fast/slow crossover confirmed by ADX trend strength and above-average volume on the signal bar.
exoscopeemaadxtrend
Sign in to installPublished 5/20/2026
Source
29 lines · 1175 chars
const fast = input('fast_ema', 9, { min: 2, max: 50 });
const slow = input('slow_ema', 21, { min: 5, max: 100 });
const minGap = input('min_gap', 8, { min: 3, max: 30 });
const adxPeriod = input('adx_period', 14);
const adxMin = input('adx_min', 25, { min: 15, max: 50 });
const emaFast = ta.ema(close, fast);
const emaSlow = ta.ema(close, slow);
const adx = ta.adx(high, low, close, adxPeriod);
const volAvg = ta.sma(volume, 20);
const crossUp = ta.crossover(emaFast, emaSlow);
const crossDown = ta.crossunder(emaFast, emaSlow);
let last = -minGap;
for (let i = slow + 1; i < barCount; i++) {
if (i - last < minGap) continue;
const adxVal = adx.adx[i];
if (adxVal === null || adxVal < adxMin) continue;
if (volAvg[i] === null) continue;
if (crossUp[i] && adx.plusDI[i] !== null && adx.minusDI[i] !== null && adx.plusDI[i] > adx.minusDI[i] && volume[i] > volAvg[i]) {
signal(i, 'buy', close[i], 'Trend up');
last = i;
} else if (crossDown[i] && adx.minusDI[i] !== null && adx.plusDI[i] !== null && adx.minusDI[i] > adx.plusDI[i] && volume[i] > volAvg[i]) {
signal(i, 'sell', close[i], 'Trend down');
last = i;
}
}
Code runs in a sandboxed Web Worker — no network or DOM access. Use at your own risk. Not financial advice.