When candle color change from red to gray user can buy or sell when change from gray to red. When indicator crosses zero from lower you can also buy or sell when oscillator crosses zero from top.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.