A long-only strategy for one-minute spot charts that waits for a bullish break of structure above a swing high, then parks an entry at a Fibonacci retracement of the impulse leg, defaulting to the 0.618 level inside a 0.5 to 0.618 zone.
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
The stop goes below the anchor swing low with a buffer and the target is a reward-to-risk multiple. Optional EMA and ADX filters, session limits and a date window are available. Setups expire if price does not retrace in time.
Break of structure then Fibonacci retracement entry
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Pivot Left Bars
int
5
leftBars
Pivot Right Bars
int
5
rightBars
BOS Trigger Source
string
Close
bosSrcMode
Require a Higher Low before BOS
bool
true
requireHigherLow
Abandon Setup if No Retrace Within (bars)
int
60
maxImpulseBars
Gold Zone Start (shallow retracement)
float
0.500
fibZoneA
Gold Zone End (deep retracement)
float
0.618
fibZoneB
Entry Retracement Level
float
0.618
fibEntry
Entry Execution
string
Limit at Entry Fib
entryMode
Min Impulse Leg Size (%)
float
0.15
minImpulsePct
Cancel Unfilled Order After (bars)
int
45
maxWaitBars
Stop Buffer Mode
string
Percent
slMode
Show all 40 settings
Setting
Type
Default
Variable
Stop Buffer (%)
float
0.05
slBufPct
Stop Buffer (ticks)
int
10
slBufTicks
Take Profit Mode
string
Risk:Reward
tpMode
Risk : Reward Ratio
float
1.5
rrTarget
Reject Setup Below This R:R
float
1.0
minRR
Require Close Above EMA
bool
true
useEma
EMA Length
int
200
emaLen
Require ADX Above Threshold
bool
true
useAdx
ADX / DI Length
int
14
adxLen
Min ADX
float
20.0
adxMin
Limit Backtest to Date Range
bool
false
useWindow
Start
time
timestamp("01 Jan 2024 00:00 +0000")
startTime
End
time
timestamp("01 Jan 2030 00:00 +0000")
endTime
Enable Session Filter
bool
false
useSession
Session (exchange time)
session
0000-2400
sessSpec
Show Gold Zone Box
bool
true
showZone
Show Entry / SL / TP Lines
bool
true
showLevels
Show BOS Level + Label
bool
true
showBosViz
Show Confirmed Pivots
bool
true
showPivots
Show Bias EMA
bool
true
showEma
Show Status Panel
bool
true
showTable
Keep Historical Drawings
bool
true
keepHistory
Gold Zone Fill
color
color.new(color.orange, 82)
colZoneFill
Gold Zone Border
color
color.new(color.orange, 35)
colZoneEdge
BOS Level
color
color.new(#2962ff, 0)
colBos
Entry Level
color
color.new(#ff9800, 0)
colEntry
Stop Loss
color
color.new(#ef5350, 0)
colSl
Take Profit
color
color.new(#26a69a, 0)
colTp
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.
Gold Scalping BOS & CHoCH is an overlay strategy designed for detecting market structure shifts. It calculates rolling swing highs and lows to identify Break of Structure (BOS) and Change of Character (CHoCH) events. Long signals trigger when bullish BOS and C
This trading strategy detects key support and resistance zones on the price chart by identifying candle rejection wicks over a customizable lookback period. It filters potential trades using an Exponential Moving Average (EMA), Change in Status/Direction (CISD
This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto
This strategy plots the previous daily high and low on the price chart and calculates the Andean oscillator bull and bear components with an exponential moving average signal. It looks for a bull or bear cross of that signal, then confirms the setup against re
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis
This overlay strategy targets one-minute ATOM scalps. It tracks pivot highs and lows as resistance and support, compares a three-period EMA with a multi-stage smoothed close, and flags long or short when price crosses that curve in the matching direction. Dail