1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
In low volatility it buys RSI below 30 and sells above 70. In the middle regime it follows a 20 and 50 EMA crossover, with longs allowed only while price is above SPY's daily 200 EMA. In high volatility it only buys when RSI crosses above 20 under the same filter. It uses 10 percent of equity per trade and has no stop loss or profit target.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
波動率回測深度
int
200
volLookback
低波動門檻 (%)
int
25
lowThresh
高波動門檻 (%)
int
75
highThresh
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi
Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma
This strategy combines Volume Weighted Moving Average (VWMA) Bollinger Bands with 200-period and 50-period Exponential Moving Averages (EMAs). It identifies long trade opportunities when the 50 EMA is above the 200 EMA and price falls to or below the lower Fib
This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po
This strategy plots a Keltner channel from an EMA basis and ATR bands on the price chart. It enters long when price crosses back above the lower band while trading above a slower trend EMA, and short when price crosses back below the upper band while below tha
This strategy identifies shorting opportunities by calculating Fear and Greed zones based on price extremums relative to moving averages and standard deviation bands. It measures price deviation from recent highs or lows to detect extreme market conditions and