OPEN-SOURCE SCRIPT
Range Oscillator Strategy + Stoch Confirm / Long Only by (Mara)

Strategy Overview
This script is a long-only trend-following strategy that combines:
– Range-based trend filter (inspired by "Range Oscillator" by Zeiierman)
– Stochastic (7 / 3 / 3) for pullback & entry timing
– EMA Exit Filter for adaptive exits as default 70
Use it to backtest, tweak, and study how this combination behaves on different markets.
1. Trend Filter
Trade longs only when the trend filter value is above the user-defined Threshold.
If the filter ≤ Threshold → no new long entries.
Threshold is adjustable in the settings.
2. Pullback Logic – Stochastic (7 / 3 / 3)
While trend is bullish:
Wait for %K to pull back below a chosen level (e.g. 50 or 20),
then look for a bullish %K over %D crossover.
All parameters are configurable.
3. Entry Conditions (Long Only)
– Trend filter > Threshold
– Stoch pullback condition met
– Bullish %K > %D at bar close
No short entries.
4. Stop Loss & Take Profit
Configurable Stop Loss and optional Take Profit.
Use Inputs to compare fixed RR vs. indicator/exit-based management.
5. EMA Exit Filter (Optional)
Additional custom exit logic to react faster to weakening conditions.
Toggleable in Inputs.
6. How to Test
Try on BTC and major markets (1D / 4D / 1H) and review:
net profit, drawdown, win rate, and robustness over multiple years.
7. Disclaimer
This script is for testing, education, and strategy development only.
It is not financial advice and not a guarantee of profits.
Always manage your own risk.
This script is a long-only trend-following strategy that combines:
– Range-based trend filter (inspired by "Range Oscillator" by Zeiierman)
– Stochastic (7 / 3 / 3) for pullback & entry timing
– EMA Exit Filter for adaptive exits as default 70
Use it to backtest, tweak, and study how this combination behaves on different markets.
1. Trend Filter
Trade longs only when the trend filter value is above the user-defined Threshold.
If the filter ≤ Threshold → no new long entries.
Threshold is adjustable in the settings.
2. Pullback Logic – Stochastic (7 / 3 / 3)
While trend is bullish:
Wait for %K to pull back below a chosen level (e.g. 50 or 20),
then look for a bullish %K over %D crossover.
All parameters are configurable.
3. Entry Conditions (Long Only)
– Trend filter > Threshold
– Stoch pullback condition met
– Bullish %K > %D at bar close
No short entries.
4. Stop Loss & Take Profit
Configurable Stop Loss and optional Take Profit.
Use Inputs to compare fixed RR vs. indicator/exit-based management.
5. EMA Exit Filter (Optional)
Additional custom exit logic to react faster to weakening conditions.
Toggleable in Inputs.
6. How to Test
Try on BTC and major markets (1D / 4D / 1H) and review:
net profit, drawdown, win rate, and robustness over multiple years.
7. Disclaimer
This script is for testing, education, and strategy development only.
It is not financial advice and not a guarantee of profits.
Always manage your own risk.
Skrip sumber terbuka
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Skrip sumber terbuka
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.