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
ORB + Fib + MACD Strategy flags bullish and bearish breakouts of that range and uses Fibonacci levels for an entry zone, a default stop, and an optional take-profit extension. Take profit can instead use the session high or low, fixed points, a risk-reward ratio, or a range multiple; the stop can use Fibonacci, fixed points, or ATR. Fast and slow EMA lengths and MACD lengths are settings. The script snippet ends before the order logic, so full entry filters are not shown.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Opening Range Duration (minutes)
int
30
input_openingRangeMinutes
Fibonacci Entry Zone Start
float
0.50
input_fibEntryStart
Fibonacci Entry Zone End
float
0.618
input_fibEntryEnd
Stop Loss Fibonacci Level
float
0.786
input_stopLossFibLevel
Take Profit Method
string
Session High/Low
input_tpMethod
TP Fixed Points (Pips)
float
100.0
input_tpFixedPoints
TP Risk-Reward Ratio (e.g., 2 for 1:2)
float
2.0
input_tpRiskRewardRatio
TP Opening Range Multiplier
float
1.0
input_tpRangeMultiplier
TP Fibonacci Extension Level
float
1.272
input_tpFibExtensionLevel
Stop Loss Method
string
Fibonacci Level
input_slMethod
SL Fixed Points (Pips)
float
50.0
input_slFixedPoints
SL ATR Multiplier
float
1.5
input_slAtrMultiplier
Show all 18 settings
Setting
Type
Default
Variable
SL ATR Length
int
14
input_slAtrLength
Fast EMA Length
int
9
input_emaFastLength
Slow EMA Length
int
21
input_emaSlowLength
MACD Fast Length
int
12
input_macdFastLength
MACD Slow Length
int
26
input_macdSlowLength
MACD Signal Smoothing
int
9
input_macdSignalSmoothing
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 script monitors opening gap conditions and breakout behavior relative to the first candle's range across up to twenty configurable stock tickers. It detects whether following bars remain inside the opening range before breaking out, displaying the status
This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim
This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take
This strategy tracks an opening session time range to establish directional bias and triggers pullback trades using Stochastic RSI. Once price breaks out of the initial range, it establishes a directional bias and enters when the Stochastic RSI crosses over in
This strategy plots dynamic pivot-based support and resistance trendlines on the price chart and trades breakouts beyond those lines. By default it allows longs only when EMA 50 is above EMA 200 and an RSI-SMA momentum filter is met, with an ATR entry buffer.
This overlay strategy tracks the high and low of a user-defined London session and plots the previous session levels as support and resistance. It flags a break beyond a level when price closes past an ATR buffer, then waits a set number of bars for a retest w