This indicator had been implemented by TrendSpider in JavaScript on TrendSpider. Check out the developer documentation to learn more about JS on TrendSpider.
describe_indicator('Fractal Highs and Lows');
paint(fractal_high(high, 21), { style: 'labels_above', color: 'red', backgroundBorderRadius: 14, verticalOffset: -2, backgroundColor: 'orange' });
paint(fractal_low(low, 21), { style: 'labels_below', color: 'black', backgroundColor: 'black', backgroundOpacity: 1e-3, fontSize: 18 });