Se lo devi usare solo sul sottostante è meglio che ci metti anche gli attraversamenti opposti perchè altrimenti avresti delle fasi di trend opposto che non verrebbero intercettate:

Buy:

Set a = StochasticOscillatorPCTK(21, 8, 5, SIMPLE)
a > 20 and REF(a, 1) < 20 OR a > 80 and  REF(a, 1) < 80
Sell:

Set a = StochasticOscillatorPCTK(21, 8, 5, SIMPLE)
a < 80 and REF(a, 1) > 80 OR a < 20 and  REF(a, 1) > 20