Strategy · Pine Script v5 · On the chart

Sapphire FiboBands Strategy

by sapphire-edge

This strategy plots Fibonacci Bollinger Bands on the price chart.

View on GitHub

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code157
Settings20inputs
LicenceNone stated
Last update1 year ago10 Jan 2025

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

Sapphire FiboBands Strategy generates buy and sell signals based on selected Fibonacci ratios (1.618, 2.618, or 4.236) combined with Bollinger Band calculations using a configurable source and length. Trades enter on matching buy and sell signals with optional profit targets or stop losses in percentage terms. Main settings adjust the Fibonacci level used for signals, signal offset, and optional time-of-day filters to close positions. It defaults to one contract per trade on the price chart.

Details

Published by

sapphire-edge on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Volatility & bands, Support & resistance, Trend

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Settings

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

SettingTypeDefaultVariable
Lengthint20length
Sourcesourceclosesrc
Offsetint0offset
Fibonacci Ratio 1float1.618fibo1
Fibonacci Ratio 2float2.618fibo2
Fibonacci Ratio 3float4.236fibo3
Fibonacci BuystringFibo 1fiboBuy
Fibonacci SellstringFibo 1fiboSell
Show SignalsbooltrueshowSignals
Signal Vertical Offsetint5signalOffset
Enable Profit TargetboolfalseuseProfitPerc
Take Profit (%)float1.0takeProfitPerc
Show all 20 settings
SettingTypeDefaultVariable
Enable Stop LossboolfalseuseStopLossPerc
Stop Loss (%)float1.0stopLossPerc
Enable Time Filter 1boolfalseuseTimeFilter1
Start Hour (24-hour format)int0startHour1
Start Minuteint0startMinute1
End Hour (24-hour format)int23endHour1
End Minuteint45endMinute1
Close Trades at End of Time WindowboolfalsecloseAtEndTimeWindow
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

257 stars

This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry

Strategy v6 Volatility & bandsSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of V1.6 ES - Futures 1M No Repaint

Nasdaq Prop Firm Strategy

by TradersPost
218 stars

This strategy uses multiple VWAP anchors and a custom Lull indicator to generate buy and sell signals on the Nasdaq price chart. It plots the VWAP trend line and three VWAP anchors with customizable colors and mitigation methods. The Lull indicator produces si

Strategy v6 TrendSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Nasdaq Prop Firm Strategy
106 stars

This overlay strategy plots a two-timeframe Ichimoku setup on the price chart, with Tenkan, Kijun, Chikou, and Kumo from a base higher timeframe and an optional highest-timeframe cloud. It allows two entries in the same direction and uses ATR-based trailing st

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of 2Tier Ichimoku Pyramiding [Takazudo]

This strategy implements a multi-stage trend following system inspired by John W. Seykota. It generates long and short entries when price breaks above or below Donchian channels of specified length. Each entry adds a unit sized to risk a fixed percentage of cu

Strategy v6 TrendVolatility & bands
Updated 11 months ago · None stated GitHub repository of Seykota Alt 29: Multi-Stage Scaling
11 stars

Calculates upper and lower Donchian Channel bands over a customizable lookback length and plots them on the main price chart. At a specified exchange hour, the strategy places a long buy stop order at the upper Donchian Channel level. Unfilled pending orders a

Strategy v6 BreakoutSupport & resistance
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia Donchian Breakout
9 stars

Smooth Trend Radar Strategy calculates a double-smoothed Supertrend baseline using WMA and EMA to identify trend direction and sideway regimes. It plots baseline rejection signals on flips, trend slope filters, and statistical overextension highlights with can

Strategy v6 TrendMoving averages
Updated yesterday · MIT GitHub repository of Smooth Trend Radar Strategy

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers