Fibonacci Moving Averages Input
Feb 26, 2023

The Fibonacci Moving Averages Input indicator provides a flexible framework for backtesting and visualizing moving average crossovers using a combination of Fibonacci-sequenced and standard period lengths.
Usage
The Usage section describes how the script can be used to identify trend shifts and execute automated backtests. Users can select specific moving averages to monitor for "Golden Cross" (bullish) or "Death Cross" (bearish) signals.
- Trend Identification: By enabling multiple Fibonacci moving averages (1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181), users can visualize a "ribbon" effect to determine trend strength and direction.
- Backtesting Crossovers: The strategy allows for specific pairings of any two averages. For example, a user can set a Bullish signal for when a 34 EMA crosses over a 144 EMA, while simultaneously setting a Bearish signal for when a 55 EMA crosses under a 144 SMA.
- Visual Analysis: The script includes color-coded plots where a rising value is green and a falling value is red, allowing for immediate feedback on price momentum across various time horizons.
Details
The script executes based on two primary components: a visual plotting engine and a strategy execution engine.
- Moving Average Calculation: The tool supports both Simple Moving Averages (SMA) and Exponential Moving Averages (EMA).
- Fibonacci Integration: The default lengths follow the Fibonacci sequence, which are often used by technical analysts to find support and resistance levels that correlate with natural market cycles.
- Strategy Logic: The backtesting component uses the
ta.crossoverandta.crossunderfunctions. Unlike static indicators, this script allows the user to independently define which MA types and lengths trigger long vs. short entries, enabling "asymmetric" strategy testing.
Settings
Long or Short Settings
- Long EMA or SMA: Toggles between Exponential and Simple Moving Average for the primary bullish signal line.
- Long: Sets the period length for the primary bullish signal line.
- Crossover EMA or SMA: Toggles between EMA and SMA for the secondary bullish baseline.
- Crossover: Sets the period length for the secondary bullish baseline.
- Short EMA or SMA: Toggles between EMA and SMA for the primary bearish signal line.
- Short: Sets the period length for the primary bearish signal line.
- Crossunder EMA or SMA: Toggles between EMA and SMA for the secondary bearish baseline.
- Crossunder: Sets the period length for the secondary bearish baseline.
Visual FibMA Settings
- Fib EMA or SMA: Global toggle for the type of moving average used for the Fibonacci-sequenced plots.
- MA1 - MA4181: Individual toggles and length inputs for 18 different Fibonacci-based moving averages.
Visual MA Settings
- EMA or SMA: Global toggle for the type of moving average used for the standard period plots.
- MA50 - MA200: Individual toggles and length inputs for common market benchmarks (50, 100, 150, and 200 periods).
FAQ
How do I change the signal from a 50/200 cross to something else?
Navigate to the "Long or Short Settings" group in the script settings and input your desired lengths in the "Long" and "Crossover" fields for bullish signals, or "Short" and "Crossunder" for bearish signals.
Can I use both EMAs and SMAs at the same time?
Yes, the strategy settings allow you to select the moving average type (EMA or SMA) independently for each of the four signal lines used in the crossover logic.
How do I get access to the Fibonacci Moving Averages Input?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Unlock Unlimited Access to the LuxAlgo Library
Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

