Strategy · Pine Script v5 · On the chart

Sapphire Fibonacci Strategies

by sapphire-edge

Sapphire Fibonacci Strategies is a multi-mode strategy that combines Momentum Breakout, Mean Reversion, and Fibonacci Retracement models built on Fibonacci-period moving averages.

View on GitHub

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code167
Settings17inputs
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 Fibonacci Strategies generates long and short trade signals based on price crossovers and moving average alignments. The strategy manages exits using percentage-based stop loss and take profit targets. Key options include toggling individual entry models, choosing between SMA and EMA calculations for each sub-strategy, and enforcing an EST trading session window filter. All elements plot directly on the price chart.

Details

Published by

sapphire-edge on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Moving averages, Mean reversion, Breakout

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
Enable Long SignalsbooltrueenableMomentumLong
Enable Short SignalsbooltrueenableMomentumShort
Use EMA? (Off: SMA,On: EMA)boolfalseuseEMAMomentum
Show Plots?booltrueshowMomentumPlots
Enable Long SignalsbooltrueenableMeanReversionLong
Enable Short SignalsbooltrueenableMeanReversionShort
Use EMA? (Off: SMA,On: EMA)boolfalseuseEMAMeanReversion
Show Plots?booltrueshowMeanReversionPlots
Enable Long SignalsbooltrueenableFibonacciLong
Enable Short SignalsbooltrueenableFibonacciShort
Use EMA? (Off: SMA,On: EMA)boolfalseuseEMAFibonacci
Show Plots?booltrueshowFibonacciPlots
Show all 17 settings
SettingTypeDefaultVariable
Take Profit %float1.5takeProfitPerc
Stop Loss %float1.0stopLossPerc
Enable Trading Window (EST)booltrueuseTradingWindowFilter
Show Background FillbooltrueshowBackgroundFill
Trading Windowsession0930-1600:1234567tradingWindow
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

This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries

Strategy v5 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner PRO [Alorse]
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

12/26-IT Strategy

by hasnocool
106 stars

This strategy executes trades based on crossovers between a 12-period and a 26-period exponential moving average (EMA). Long positions can be filtered by pivot resistance breakouts and RSI boundary ranges. For trade management, it provides two configurable par

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 12/26-IT Strategy

Bollinger Bands Strategy

by cklose2000
105 stars

This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy

均线突破交易系统

by tangly1024
76 stars

This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the

Strategy v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of 均线突破交易系统

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