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.
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
Donald - AI Futures builds bullish and bearish momentum signals, optionally compares volume with a volume-weighted moving average, and filters fair value gaps by width while showing mitigation. Entries are limited to a session window and a previous-day volume threshold, with separate long and short toggles and an optional trailing stop. It recalculates on every tick, so signals can change on the live bar, and no stop loss is attached by default.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Show Signals
bool
true
showSignals
Factor Volume
bool
false
factorVolume
Zone Inside Length
int
50
zoneLengths
Zone Outside Length
int
75
zoneOutsideLengths
Smoothing length
int
14
smoothingLength
Lookback Window
int
8
lookbackWindow
Relative Weighting
float
8.
relativeWeighting
Start Regression at Bar
int
25
startBar
Fair Value Gap Width Filter
float
.5
fvgTH
Bullish, Imbalance
color
color.new(#089981, 55)
fvgBC
Mitigation
color
color.new(#787b86, 77)
fvgAC
Bearish, Imbalance
color
color.new(#f23645, 55)
fvgSC
Show all 40 settings
Setting
Type
Default
Variable
Mitigation
color
color.new(#787b86, 77)
fvgFC
Display Percentage of Mitigation
bool
true
fvgPR
Historical Fair Value Gaps
bool
true
fvgVF
From Month
int
1
fromMonth
Day
int
1
fromDay
Year
int
2018
fromYear
To Month
int
1
thruMonth
Day
int
1
thruDay
Year
int
2300
thruYear
Position Entry Window
session
0700-1245
tradeTimes
Previous Day Volume Threshold
int
1000
minPrevDayVolume
Default Contract Quantity
int
1
defaultQty
Close Above 8 EMA within X Bars
int
6
retestBars
Attach Broker Trailing Stop
bool
false
attachTrail
Allow Longs
bool
true
allow_long
Trail Long Loss (%)
float
0.75
longTrailPerc
Trail Long Source
source
high
longTrailSrc
Allow Shorts
bool
false
allow_short
Trail Short Loss (%)
float
1
shortTrailPerc
Trail Short Source
source
low
shortTrailSrc
5m EMA 1 Length
int
8
ema1len
5m EMA 2 Length
int
55
ema2len
15m EMA Length
int
165
ema15len
EMA Source
source
close
src
Show Pivot Points
bool
false
show_pivot_labels
Pivot High
int
10
leftLenH
/
int
10
rightLenH
Pivot High
color
color.black
textColorH
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 plots on the XAUUSD price chart and looks for Smart Money Concepts entries on the fifteen-minute timeframe. It scores fair value gaps, order blocks, liquidity sweeps, break of structure, and change of character, plus EMA, RSI, MACD, and higher-ti
This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto
This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo
This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad
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