Milli.aiFree guides

The Milli Dots Indicators

Two free TradingView indicators we built and then tried to break. Buy dots, exit dots and phone alerts. Copy, paste, done in 2 minutes.

How it works: Paste the code → blue dot on the setup → phone alert → exit dot or red stop line

READ FIRST: Pullback Dots: daily charts only. A dot is a setup, not a promise. Risk small: we tested 1% per trade.

Free full guide (step by step, with 12 copy-paste prompts, daily routine and weekly review): milli-ai.com/free/dots

Why this works

We locked the settings using 2010 to 2019 data only. Then we tested on 2020 to now: years the indicators had never seen.

Pullback Dots failed our 4-hour test, so use it on daily charts only.

Step 1: Add Pullback Dots (2 minutes)

  1. Open TradingView on a computer and open any chart.
  2. Click Pine Editor at the bottom of the screen.
  3. Delete everything in the editor. Paste the code below.
  4. Click Save, then Add to chart.
  5. Switch the chart to 1D (daily).
//@version=6
// Milli Pullback Dots by Milli.ai (DAILY charts: the 4-hour version did not hold up in testing)
// Buy dot: 50 EMA above 200 EMA, price above the 200 EMA, and RSI(2) under 5 (a sharp dip inside an uptrend).
// Exit: first close above the 5 EMA (next bar's open), or a 2 x ATR(14) stop set at entry.
// Settings were picked on 2010-2019 data only, then tested on 2020-2026 data they never saw.
// Educational tool. Hypothetical backtests. Not financial advice. Past results do not guarantee future results.
strategy("Milli Pullback Dots", overlay = true, initial_capital = 10000, commission_type = strategy.commission.percent,
     commission_value = 0.05, process_orders_on_close = false)

rsiLen  = input.int(2, "RSI length", minval = 1)
lo      = input.float(5, "Buy when RSI below", minval = 1)
k       = input.float(2.0, "Stop (x ATR 14)", minval = 0.5, step = 0.5)
exitLen = input.int(5, "Exit when close crosses this EMA", minval = 1)
riskPct = input.float(1.0, "Risk per trade (% of equity)", minval = 0.1, step = 0.1)
maxLev  = input.float(5.0, "Max position (x equity)", minval = 0.1)

r   = ta.rsi(close, rsiLen)
e50 = ta.ema(close, 50)
e200 = ta.ema(close, 200)
ex  = ta.ema(close, exitLen)
atr = ta.atr(14)
warm = bar_index > 200
buySig = warm and e50 > e200 and close > e200 and r < lo
flat = strategy.position_size == 0

var float stopPx = na
if flat and buySig
    stopPx := close - k * atr
    qty = math.min(strategy.equity * riskPct / 100 / (k * atr), strategy.equity * maxLev / close)
    strategy.entry("Long", strategy.long, qty = qty)
if strategy.position_size > 0
    strategy.exit("Stop", "Long", stop = stopPx)
    if close > ex
        strategy.close("Long", comment = "Exit dot")

plot(e200, "200 EMA", color.new(color.gray, 40))
plotshape(flat and buySig, "Buy dot", shape.circle, location.belowbar, color.new(#3987e5, 0), size = size.small)
plotshape(strategy.position_size > 0 and close > ex, "Exit dot", shape.xcross, location.abovebar, color.new(color.orange, 0), size = size.tiny)
if flat and buySig
    alert("Milli Pullback Dots: BUY dot on " + syminfo.ticker + " at " + str.tostring(close), alert.freq_once_per_bar_close)

Step 2: Add Trend Dots (2 minutes)

Same steps. Open a new Pine Editor tab, paste this, Save, Add to chart.

//@version=6
// Milli Trend Dots by Milli.ai
// Buy dot: close breaks the highest high of the last 20 bars while price is above the 200 EMA.
// Exit: a 3 x ATR(14) trailing stop that only moves in your favour (the red line). One trade at a time.
// Settings were picked on 2010-2019 data only, then tested on 2020-2026 data they never saw.
// Educational tool. Hypothetical backtests. Not financial advice. Past results do not guarantee future results.
strategy("Milli Trend Dots", overlay = true, initial_capital = 10000, commission_type = strategy.commission.percent,
     commission_value = 0.05, process_orders_on_close = false, calc_on_every_tick = false)

n        = input.int(20, "Breakout lookback (bars)", minval = 2)
emaLen   = input.int(200, "Trend filter EMA", minval = 1)
k        = input.float(3.0, "Trailing stop (x ATR 14)", minval = 0.5, step = 0.5)
riskPct  = input.float(1.0, "Risk per trade (% of equity)", minval = 0.1, step = 0.1)
maxLev   = input.float(5.0, "Max position (x equity)", minval = 0.1)
allowShort = input.bool(false, "Also take sell dots (off in the tested version)")

ema = ta.ema(close, emaLen)
hh  = ta.highest(high, n)[1]
ll  = ta.lowest(low, n)[1]
atr = ta.atr(14)
warm = bar_index > math.max(n, emaLen)

buySig  = warm and close > hh and close[1] <= hh[1] and close > ema
sellSig = warm and allowShort and close < ll and close[1] >= ll[1] and close < ema

var float trail = na
flat = strategy.position_size == 0

if flat and buySig
    stopPx = close - k * atr
    qty = math.min(strategy.equity * riskPct / 100 / (k * atr), strategy.equity * maxLev / close)
    strategy.entry("Long", strategy.long, qty = qty)
    trail := stopPx
else if flat and sellSig
    stopPx = close + k * atr
    qty = math.min(strategy.equity * riskPct / 100 / (k * atr), strategy.equity * maxLev / close)
    strategy.entry("Short", strategy.short, qty = qty)
    trail := stopPx

if strategy.position_size > 0
    trail := math.max(nz(trail, close - k * atr), close - k * atr)
    strategy.exit("Long exit", "Long", stop = trail)
else if strategy.position_size < 0
    trail := math.min(nz(trail, close + k * atr), close + k * atr)
    strategy.exit("Short exit", "Short", stop = trail)
else if not (buySig or sellSig)
    trail := na

plot(ema, "Trend EMA", color.new(color.gray, 40))
plot(strategy.position_size != 0 ? trail : na, "Trailing stop", color.new(color.red, 0), 2, plot.style_linebr)
plotshape(flat and buySig, "Buy dot", shape.circle, location.belowbar, color.new(#3987e5, 0), size = size.small)
plotshape(flat and sellSig, "Sell dot", shape.circle, location.abovebar, color.new(#e66767, 0), size = size.small)
if flat and buySig
    alert("Milli Trend Dots: BUY dot on " + syminfo.ticker + " " + timeframe.period + " at " + str.tostring(close), alert.freq_once_per_bar_close)
if flat and sellSig
    alert("Milli Trend Dots: SELL dot on " + syminfo.ticker + " " + timeframe.period + " at " + str.tostring(close), alert.freq_once_per_bar_close)

Step 3: Read the dots

Step 4: Get a phone alert for every new dot

  1. Click the alarm clock (Alerts) on the right.
  2. Condition: pick Milli Pullback Dots (or Trend Dots), then alert() function calls only.
  3. Turn on Notify in app. Click Create.
  4. Install the TradingView app on your phone and log in. New dots now ping your phone.

Keep it safe

Hypothetical backtests on Yahoo Finance prices, next-bar entries, costs included. Past results don't guarantee future results. Educational tool, not financial advice. You make every decision.

Troubleshooting

Problem Fix
No dots on the chart Switch to the 1D chart and scroll back. Dots only show in an uptrend.
"Script could not be translated" error Delete everything in the Pine Editor first, then paste. Line 1 must be //@version=6.
Alert doesn't fire Pick "alert() function calls only" in the alert condition.

Want the finished version?

These indicators are free forever. Want finished trading bots that do the watching for you (one-command install, plain setup steps, and help if you get stuck)? They are in the Milli.ai AI Desk.

Educational only. Not financial advice. It never places trades for you. You make every decision.