Strategy · Pine Script v4 · On the chart

Diego's Strategy

by jerryinyang

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.

View on GitHub

GitHub stars5on the repository
Pine versionv4older, still runs
Lines of code329
Settings22inputs
LicenceNone stated
Last update2 years ago12 May 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

jerryinyang on GitHub

Type

Strategy, Pine Script v4

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Deviationfloat3threshold_multiplier
Depthint10depth
Extend RightbooltrueextendRight
Show Levelsbooltruelevels
levelsFormatstringPercentlevelsFormat
Labels PositionstringLeftlabelsPosition
Show Fibonacci Levels?booltrueshowFib
Show Second Fibonacci Levels?boolfalseshowFib2
Fibonacci Level Colorcolorcolor.purplefibColor
Fibonacci 2 Level Colorcolorcolor.olivefib2Color
Use EMA Filter?booltrueuseEmaFilt
EMA Lengthint200emaLen
Show all 22 settings
SettingTypeDefaultVariable
EMA TimeframetimeframeemaRes
Display EMA?boolfalseshowEma
Filter Trade by Session?booltrueuseSess
What Trading Session? stringCustomwhatSess
Custom Sessionsession0500-1600sessCust
Fibonacci Levels for Entry Zonestring38% - 50%fibZone
Trade In Fibonacci Overall Direction?booltruetradeFibDir
Fibonacci for EntrystringFib 1entryFib
Stop Loss Fibonacci Levelstring100%tpLevel
Take Profit Fibonacci Levelstring23.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.

Similar Pine Scripts

ATOM 1m scalp HK

by dearvn
43 stars

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

Strategy v5 ScalpingSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of ATOM 1m scalp HK

1-Min Gold Taylor Technique

by eddiebelaval
7 stars

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

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of 1-Min Gold Taylor Technique
3 stars

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,

Strategy v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Strategy Rewrite

algo-trade-indian-commodity

by akash-yellgetti
1 stars

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

Strategy v5 Sessions & timeTrend
Updated 2 years ago · None stated GitHub repository of algo-trade-indian-commodity

AlgoBot VWAP Pullback Strategy

by ghostnathan30-ops
1 stars

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

Strategy v6 TrendSessions & time
Updated 6 months ago · None stated GitHub repository of AlgoBot VWAP Pullback Strategy

More Support & resistance scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers