1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
TopBot Adaptive (Three-Candle) works on standard time-based charts, scaling stop limits with the chart's bar length, and uses the previous closed candles. Options include a minimum directional advantage, a positive-payoff requirement, regular-hours entries, exit labels, entry, stop and target lines, and compact labels with hover details. Comments say the timeframe adaptation is not the earlier five-minute variant, and it is not a Strategy Tester strategy.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Recent training paths
int
240
memory
Warmup settled paths
int
24
minimum
Minimum directional advantage (0.01R)
int
5
advantageHundredths
Require positive estimated payoff
bool
false
positiveOnly
Regular-hours entries (intraday charts only)
bool
true
rthOnly
Show exit labels
bool
true
showExits
Show current status
bool
true
showStatus
Show entry / stop / target lines
bool
true
showLevels
Compact signal labels (hover for trade details)
bool
true
compactLabels
Signal label distance (ATR)
float
1.0
labelSpacing
Label history (bars)
int
600
labelHistory
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 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
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
This indicator calculates a locally weighted regression curve alongside a standard linear regression line to detect directional price shifts. It identifies potential buy signals when the weighted line crosses below the linear regression while falling over a de
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.
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
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