Learn NinjaScript: Detecting Crosses, Flips, and Directional Shifts
You have an SMA. You want to know when price crosses it — that’s a signal. You also want to know when the SMA itself changes direction — that’s a different signal, same class of problem. Both come down to comparing current and previous values, and NinjaScript has built-in helpers for the common case plus…









