strategy · own pane · open source

Aroon Trend Strategy

Aroon Trend Strategy is a free open-source strategy. Aroon Up/Down trend strategy: long when Aroon Up crosses above 70 and Aroon Down is below… Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What Aroon Trend Strategy does

Aroon Up/Down trend strategy: long when Aroon Up crosses above 70 and Aroon Down is below 30 (fresh bullish extreme), exit when the relationship reverses.

  • Both lines below 30 = consolidation; expect a breakout.
  • Combine with volume confirmation for the strongest setups.
  • 25-period is the canonical Aroon lookback.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
strategy("Aroon Trend Strategy", overlay=false, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10, commission_type=strategy.commission.percent, commission_value=0.05)
len = input.int(25, "Length", minval=5, maxval=100, step=1)
stopPct = input.float(2, "Stop Loss %", minval=0.5, maxval=10, step=0.1)
tpPct = input.float(6, "Take Profit %", minval=0, maxval=20, step=0.1)
colorUp = input.color("color.green", "Color  Up")
colorDown = input.color("color.red", "Color  Down")
colorNeutral = input.color("color.gray", "Color  Neutral")
aroonUp = 100 * (len - ta.highestbars(high, len)) / len
aroonDn = 100 * (len - ta.lowestbars(low, len)) / len
longSignal = strategy.position_size == 0 and ta.crossover(aroonUp, 70) and aroonDn < 30
exitSignal = strategy.position_size > 0 and ta.crossunder(aroonUp, 50)
if longSignal
    strategy.entry("Long", strategy.long)
if strategy.position_size > 0
    strategy.exit("Risk", stop=stopPct > 0 ? strategy.position_avg_price * (1 - stopPct / 100) : na, limit=tpPct > 0 ? strategy.position_avg_price * (1 + tpPct / 100) : na)
if exitSignal
    strategy.close("Long", comment="Aroon fade")
hline(70, "Strong", color=colorNeutral, linestyle=hline.style_dashed)
hline(30, "Weak", color=colorNeutral, linestyle=hline.style_dashed)
p_Aroon_Up = plot(aroonUp, "Aroon Up", color=colorUp, linewidth=2)
p_Aroon_Down = plot(aroonDn, "Aroon Down", color=colorDown, linewidth=2)
plotshape(longSignal, "Long", style=shape.triangleup, location=location.belowbar, color=colorUp, text="L")
plotshape(exitSignal, "Exit", style=shape.triangledown, location=location.abovebar, color=colorDown, text="X")
alertcondition(longSignal, "Aroon long entry", "Aroon Up crossed 70 with Down below 30")
alertcondition(exitSignal, "Aroon exit", "Aroon Up crossed below 50")

Comments

No comments yet.

Sign in to comment.