All indicators

RibboNN Machine Learning

Jul 24, 2023

Static chart image
Dynamic OverlaysSignalsForecastingMachine LearningMoving Averages

The RibboNN Machine Learning indicator is a trend-following tool that utilizes a Nearest Neighbor algorithm to predict market direction and visualize it through an adaptive ribbon overlay. This script aims to provide traders with robust trend forecasts by analyzing historical data patterns to identify potential bullish or bearish market shifts.

Usage

The Usage section describes how the script can be used to identify market trends and potential entry points. The indicator displays a multi-layered ribbon on the price chart that changes color based on the machine learning model's prediction:

  • Bullish Trend: When the model predicts an upward move, the ribbon turns green. This indicates a potential long bias or an environment suitable for trend-following buy positions.
  • Bearish Trend: When the model predicts a downward move, the ribbon turns red. This indicates a potential short bias or an environment suitable for trend-following sell positions.

Traders can use the ribbon as a dynamic support or resistance zone during strong trends. The gradient and width of the ribbon provide visual feedback on the strength of the predicted trend.

Details

The script operates using a combination of conditional classification and a Nearest Neighbor (NN) algorithm:

  • Conditional Classification: The model generates a base prediction by evaluating two sets of data (Fast and Slow periods) against specific sensitivity thresholds.
  • Nearest Neighbor Algorithm: To refine these predictions, the script stores historical feature data and uses the Manhattan distance to find historical instances that resemble current market conditions. It then aggregates the outcomes of these "neighbors" to form a final prediction.
  • Range-Weighted MA: The visual ribbon is constructed using a series of moving averages weighted by bar range, creating a smoother and more reactive visual than standard simple moving averages.

Settings

Core Settings

  • Slow Period: Sets the lookback period for the primary long-term data calculation.
  • Fast Period: Sets the lookback period for the primary short-term data calculation.
  • Neighbours Count: Determines how many historical data points are analyzed to find patterns. Smaller values make the model more sensitive to local price action, while larger values provide smoother, more global trend analysis.
  • Long Sensitivity: Adjusts the threshold for generating uptrend classification labels.
  • Short Sensitivity: Adjusts the threshold for generating downtrend classification labels.

Visual Settings

  • Bull: Customizable colors for the bullish ribbon gradient.
  • Bear: Customizable colors for the bearish ribbon gradient.

FAQ

How do I interpret the ribbon color changes?

A change from red to green suggests the machine learning model has detected a shift toward an uptrend, while a change from green to red suggests a shift toward a downtrend.

What happens if I increase the Neighbours Count?

Increasing the Neighbours Count typically results in a smoother ribbon with fewer signals, as the algorithm requires more historical agreement to change its prediction.

How can I access RibboNN Machine Learning?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.