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
An inside bar has a lower high and higher low than the bar before it, and an outside bar exceeds both. After the chosen number of consecutive inside bars, an outside bar closing up opens a long and one closing down opens a short. Each trade gets an ATR-based stop and target. Size is 10 percent of equity, pyramiding is off, and signal markers, background and alerts are included.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
ATR Period
integer
14
atrPeriod
Stop Loss Multiplier (ATR)
float
2.0
slMultiplier
Take Profit Multiplier (ATR)
float
4.0
tpMultiplier
Inside Bar Lookback (Consecutive IBs)
integer
1
ibLookback
Show Entry Signals
bool
true
showSignals
Show Background Color
bool
true
showBG
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.
BarUpDn Long Strategy executes long trades based on price bar directional movements and previous bar closes. It places a long stop order above the current high when a bullish candle opens above a prior close. Because short entries are restricted to exiting lon
The OutSide Bar Strategy identifies outside bar candlestick patterns directly on the main price chart. It triggers a long entry when a bar's high exceeds the previous high and its low drops below the previous low, provided the bar closes higher than its open.
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
This strategy detects Opening Range Breakouts in a specified session. It calculates the high and low of the opening range bar then plots these levels on the price chart and fills the area between them. Candles are colored based on their relation to the ORB hig
The Traffic Light Strategy is a breakout trading system overlaid on the main price chart. It detects momentum transitions whenever two consecutive candles have opposing colors (bullish followed by bearish, or vice versa). Upon detection, it marks the combined
This strategy enters long when the chart high breaks the previous higher-timeframe high during a detected higher-timeframe inside bar, and enters short on a break of the previous higher-timeframe low. It sizes positions at 10 percent of equity and has no stop