You can separate the two for only and only. Everything else is the same as the strategy.
- trend filter.
- trade exit.
- Both long and short or each on it's own.
The source code should be open if you want to see it or modify it for your own project. I hope it helps!
Global Market Signals
Also changed the default values for the ROC Upper and Lower from 0.01 & -0.01 to 1 & -1
I hope it helps,
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.