Indicator · Pine Script v4 · On the chart

Machine Learning: Perceptron-based Strategy

by capissimo

Machine Learning: Perceptron-based Strategy is a Pine Script overlay indicator intended to implement a simple perceptron machine learning model for signal generation.

View on GitHub

GitHub stars114on the repository
Pine versionv4older, still runs
Lines of code7
Settings0inputs
LicenceNone statedfile: MPL-2.0
Last update1 year ago7 Nov 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

7 lines of Pine Script v4 from scripts/100-ML-Perceptron-based-Strategy-(v2).pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

100-ML-Perceptron-based-Strategy-(v2).pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © capissimo

//@version=4
study('Machine Learning: Perceptron-based strategy (v.2)', '', true)

deleted 07-04-2024

Overview

However, the author deleted the underlying script logic from the source file, leaving only the study declaration header. As a result, the script performs no calculations, produces no plots or signals, and includes no customizable settings. It remains in the repository as a historical placeholder without functional trading or analytical features.

Details

Published by

capissimo on GitHub

Type

Indicator, Pine Script v4

Draws

On the price chart

Category

AI / machine learning

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.

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

Function K-Means Clustering

by ricardosantos79
261 stars

This indicator implements a K-means clustering algorithm in Pine Script to partition two-dimensional data points into user-defined clusters. It features an internal pseudo-random number generator for centroid initialization and computes Euclidean distances acr

Indicator v4 AI / machine learning
Updated 4 years ago · None stated GitHub repository of Function K-Means Clustering
257 stars

This indicator uses a Lorentzian distance k-nearest neighbors classification algorithm to predict market direction based on up to five technical features, such as RSI, WaveTrend, CCI, and ADX. It compares current feature values against historical bar patterns

Indicator v5 AI / machine learningOscillators & momentum
Updated 6 weeks ago · None stated GitHub repository of Donald - Machine Learning Options

AI Trend Navigator

by hasnocool
106 stars

This indicator calculates a trend direction and smoothed moving average using a k-nearest neighbours (k-NN) classification algorithm directly on the main price chart. Users can select input price types, target values, neighborhood size, and smoothing periods.

Indicator v5 AI / machine learningTrend
Updated 2 years ago · GPL-3.0 GitHub repository of AI Trend Navigator

Machine Learning: Lorentzian Classification

by artificial-intelligence-edge
75 stars

This indicator classifies the current bar by comparing its feature vector with historical bars using Lorentzian distance and a k-nearest-neighbors vote. Configurable features include RSI, WaveTrend, CCI, and ADX. Optional volatility, regime, ADX, and EMA filte

Indicator v5 AI / machine learningOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Machine Learning: Lorentzian Classification
47 stars

Calculates and plots a forward price prediction directly on the main chart using an on-chart multilayer perceptron neural network. The model processes technical input features including moving average ratios, RSI, normalized ATR, and Bollinger bandwidth throug

Indicator v6 AI / machine learning
Updated 8 months ago · MIT GitHub repository of Multilayer Perceptron Predictor
46 stars

This indicator uses a Hidden Markov Model (HMM) framework combined with an adaptive dual moving average engine and Directional Movement Index (DMI) features to identify market regimes (bullish, bearish, or ranging/chop). It calculates regime probabilities on e

Indicator v5 AI / machine learningTrend
Updated 7 weeks ago · None stated GitHub repository of HMM Enhanced: Regime Probability

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers