Thank you for your effort. This is one I actually disagree with you. Alessio literally says that pulses should fire when keltner channels go outside bollinger bands. You went that way, but at the end you used true range and a comparison of the deviation of the channels. I believe a better reproducibility of his indicator would be given keltner_lower > bollinger_lower and keltner_upper < bollinger_upper. When both true, pulses be red; when one of them false, pulses be blue.