This indicator trains a single-neuron artificial neural network (perceptron) on each bar to classify price movement and plot an adaptive moving average on the main chart.
Machine Learning: Perceptron-Based Strategy evaluates historical sample data to iteratively adjust weights using a step activation function, positioning the perceptron line above or below price to reflect directional bias. Users can customize the dataset, sample depth, threshold, holding period, and optional volatility or volume filters, alongside display options such as bar coloring and an information panel.
Online single-neuron perceptron training per bar
Perceptron-based adaptive moving average overlay
Volatility and volume signal filters
Custom directional movement index integration
Configurable holding period and trailing stop mechanisms
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Dataset
source
hl2
Dataset
Timeframe
timeframe
1
Timeframe
Period
int
14
Period
Sample Size
int
12
Depth
Threshold [0..100]
int
28
Threshold
Filter
string
Volatility
Filter
Holding Period
int
5
Holding
Smoothed
bool
false
Smooth
Perceptron MA
bool
true
Perceptron
SMA
bool
false
Ma
Bar Color
bool
true
Barcolor
Trailing
bool
false
Trailing
Show all 13 settings
Setting
Type
Default
Variable
Info
bool
true
Info
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.
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.
The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec
This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab
This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
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