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 strategy, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.
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
An eight-value state vector from price z-score, RSI, ATR ratio, EMA slope, volume, MACD and candle features feeds the network, which learns online from a replay buffer with decaying exploration. Orders use an ATR-based stop loss and a risk-to-reward target with percentage risk sizing. It draws on the price chart and depends on an external library.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
State Dimension
int
8
state_dim
Replay Buffer Size
int
200
buffer_size
Batch Size
int
32
batch_size
Discount Factor γ
float
0.95
gamma
Soft-Update τ
float
0.01
tau
Initial ε
float
0.5
epsilon_init
Min ε
float
0.05
epsilon_min
ε Decay Bars
int
500
decay_bars
Learning Rate α
float
0.001
learning_rate
Stop Loss ATR Multiple
float
2.0
sl_atr_mult
Take Profit R:R Ratio
float
2.5
tp_rr_ratio
Risk per Trade %
float
1.0
risk_per_trade
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.
Donald - AI Futures 5M 15M Timeframe is an overlay trading strategy designed for intraday futures trading. It utilizes rational quadratic kernel regression to construct dynamic momentum zones and smoothed price boundaries on the main price chart. The strategy
This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.
This overlay strategy combines a machine-learning distance model with a MACD oscillator to open trades on the price chart. It compares recent history using cosine similarity or Euclidean and Lorentzian distance, then filters direction with selectable moving-av
Donald - AI Futures is a price-chart strategy that estimates inner and outer high-low zones and a smoothed close with rational quadratic kernel regression. It builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving
Calculates MACD line and signal line differences, passing current and previous deltas through a two-layer neural network model with ReLU activation functions. User-configurable weights, biases, and threshold values determine output classification signals. The
Knn Filter A007 is a strategy that applies a K-Nearest Neighbors classification algorithm to evaluate historical feature performance and filter out low-probability trade setups. It executes long and short entries based on learned historical patterns. Risk mana