In the short-term, prices fluctuate up and down on wide spread exchanges.
And if the price moves to one side, the price tends to return to its original position momentarily.
This strategy set stop order. Stop price is calculated with upper and lower shadows.
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.