1 Plot Fibonacci Moving Average Ribbon
"A Fibonacci Moving Averages Ribbon Using One Plot" by alexgrover, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: A Fibonacci Moving Averages Ribbon Using One Plot (v1.0), read 2026-11-15T18:34:23.898Z; source language v4.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
A Fibonacci Moving Averages Ribbon Using One Plot by alexgrover, ported from Pine v4. Overlay indicator with 1 plot and 3 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2020-08-27; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
// Mr Dogo ૮ ・ﻌ・ა & Mr Kitty =^._.^= ∫ approve this script.
// © alexgrover
// ------------------------------------------------------------------------------------------------
// Original author: alexgrover
// Original title: A Fibonacci Moving Averages Ribbon Using One Plot
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 4
// Fetched: 2026-11-15
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
// Converted by the FloScript converter from a Pine-compatible v4 source.
indicator("1 Plot Fibonacci Moving Average Ribbon", "1FMAR", true)
From = input.int(3, "From Fibonacci Number", minval=3, maxval=19)
To = input.int(15, "To Fibonacci Number", minval=3, maxval=19)
src = input(close)
//------------------------------------------------------------------------------
phi = (math.sqrt(5) + 1) / 2
n = bar_index
csum = ta.cum(src)
//------------------------------------------------------------------------------
N = To + 1 - From
l = From + n % N / N * (To + 1 - From)
fib = math.round((math.pow(phi, l) - math.pow(-phi, -l)) / math.sqrt(5))
//------------------------------------------------------------------------------
ma = (csum - csum[fib]) / fib
css = l == 3 ? #ff1100 : l == 4 ? #0cb51a : l == 5 ? #8c03ac : l == 6 ? #c2d774 : l == 7 ? #6b610a : l == 8 ? #cffb41 : l == 9 ? #cd8e74 : l == 10 ? #a37dd5 : l == 11 ? #b103a1 : l == 12 ? #0705b1 : l == 13 ? #281cc5 : l == 14 ? #3c5a28 : l == 15 ? #0cb51a : l == 16 ? #f0c11f : l == 17 ? #f05f7d : l == 18 ? #51e41c : #7c6f99
//------------------------------------------------------------------------------
plot(ma, "Plot", css, 1, plot.style_circles)
This file is under the Mozilla Public License 2.0; it is a port of the original by alexgrover, with the original licence header kept and the changes made for FloScript noted in the file.
- v1
Library refresh 2026-11-15
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.