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
Evening Star with Bollinger Bands Strategy enters a short when the high pokes above the upper Bollinger Band, the candle body is small relative to its range, MACD is above zero and an optional session window allows trading. The stop sits one ATR multiple above the signal high and trails lower, and position size is set so the stop distance risks a chosen percentage of equity. Bands, signals and the trailing stop are plotted.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
最大损失比例
float
2.0
maxLossPercent
ATR周期
int
14
atrPeriod
ATR倍数
float
1.0
atrMultiplier
启用交易时间限制
bool
false
useTimeFilter
交易时段
session
0930-1600
sessionTime
布林带周期
int
20
length
布林带标准差倍数
float
2.0
mult
MACD快线
int
12
fast_length
MACD慢线
int
26
slow_length
MACD信号线
int
9
signal_length
K线实体占比阈值
float
30
bodyPercentageThreshold
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.
Exceeded Candle [Alorse] is a mean-reversion strategy that identifies candlestick engulfing patterns combined with Bollinger Bands filters. It enters a long position when a green candle surpasses the body of the previous red candle while price is below the mid
Big Bar Strategy identifies unusually large candles relative to a moving average of recent bar body sizes. It executes contrarian trades by opening long positions following a large bearish bar and short positions after a large bullish bar, with an optional con
This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a
Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish
The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or
The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po