Diego's Strategy draws confirmed swing pivots on the price chart and connects them with dashed lines when the price move exceeds an ATR-based deviation threshold.
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
Diego's Strategy can plot Fibonacci retracement levels and use a chosen zone for entries, with separate Fibonacci levels assigned as stop loss and take profit. An optional EMA and a custom trading session can filter when trades are allowed. Depth, deviation, label placement, and whether levels or the EMA appear are adjustable. The supplied code ends before the order logic is fully shown.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Deviation
float
3
threshold_multiplier
Depth
int
10
depth
Extend Right
bool
true
extendRight
Show Levels
bool
true
levels
levelsFormat
string
Percent
levelsFormat
Labels Position
string
Left
labelsPosition
Show Fibonacci Levels?
bool
true
showFib
Show Second Fibonacci Levels?
bool
false
showFib2
Fibonacci Level Color
color
color.purple
fibColor
Fibonacci 2 Level Color
color
color.olive
fib2Color
Use EMA Filter?
bool
true
useEmaFilt
EMA Length
int
200
emaLen
Show all 22 settings
Setting
Type
Default
Variable
EMA Timeframe
timeframe
emaRes
Display EMA?
bool
false
showEma
Filter Trade by Session?
bool
true
useSess
What Trading Session?
string
Custom
whatSess
Custom Session
session
0500-1600
sessCust
Fibonacci Levels for Entry Zone
string
38% - 50%
fibZone
Trade In Fibonacci Overall Direction?
bool
true
tradeFibDir
Fibonacci for Entry
string
Fib 1
entryFib
Stop Loss Fibonacci Level
string
100%
tpLevel
Take Profit Fibonacci Level
string
23.6%
slLevel
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 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
This intraday strategy implements session-based trading rules tailored for gold on short timeframes. It tracks the Asian session price range, VWAP, 20-period EMA, and previous day high and low levels to identify liquidity sweeps during London and New York trad
Brucetrade Mechanical Framework is an overlay strategy combining higher-timeframe bias with Smart Money Concepts (SMC). It detects Fair Value Gaps (FVG), Inverted FVGs, and liquidity sweeps across configurable higher and momentum timeframes. Signals are filter
Hercules Strategy Rewrite is an automated backtesting strategy that generates entry signals using engulfing candlestick patterns, tick thresholds, and support or resistance level breakouts. It offers multi-layer filtering including moving average trend checks,
A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by start hour and minute inputs, with alerts when price crosses the high or low. It adds VWAP and a SuperTrend with adjustable ATR period, m
A futures strategy for 15-minute charts that builds a daily-reset VWAP with standard deviation bands. It requires several consecutive bars on one side of VWAP, then a pullback to within a small percentage of it and a bar closing in the trend direction. Entries