Aroon indicator on TradingView
Aroon measures how many bars have passed since the window's highest high and lowest low. Aroon Up tracks the high; Aroon Down tracks the low. A reading near 100 means the extreme is recent. It does not tell you how far price moved or how the next trade will perform.
Illustrative reading: length 14
If the window high was 2 bars ago and its low was 11 bars ago, Aroon Up is 85.71 and Aroon Down is 21.43. The high is more recent. Those values alone say nothing about the size of the move.
Count bars, then convert the age to a scale
Let N be the length, H the bars since the window high and L the bars since the window low. The current bar has age 0.
Aroon Up = 100 × (N − H) / N
Aroon Down = 100 × (N − L) / N
The TradingView-style calculation searches N + 1 bars: the current bar plus N previous bars. For N = 14, age 0 maps to 100, age 7 to 50 and age 14 to 0. Using only 14 observations with a denominator of 14 removes that oldest age and changes the scale. TradingView's Aroon Oscillator documentation states the extra-bar convention explicitly.
| High age / Low age | Up / Down | What changed |
|---|---|---|
| 2 / 11 | 85.71 / 21.43 | The high is more recent. |
| 3 / 12 | 78.57 / 14.29 | One bar passes with the same extremes. |
| 0 / 13 | 100 / 7.14 | A new window high resets Up. |
With unchanged extremes, each line falls by 100/N per bar. It can jump when a new extreme appears or an old extreme leaves the window. Aroon therefore moves in steps even when price moves smoothly. On an intraday chart, the count is chart bars, not calendar days.
Read Aroon Up and Down together
The second line shows whether the opposite extreme is also recent. One high reading on its own leaves that question unanswered.
| Reading | Mechanical meaning | Interpretation boundary |
|---|---|---|
| Up 100, Down 0 | The high is on the current bar; the low is at the oldest edge. | A directional history, but no guarantee the next bar continues. |
| Up above 50, Down below 50 | The high is in the newer half of the window and the low in the older half. | A possible upward-trend filter to compare with price structure. |
| Down above 50, Up below 50 | The low is more recent while the high is older. | A possible downward-trend filter, not a short entry by itself. |
| Both below 50 | Neither window extreme occurred in the newer half. | Price may be consolidating inside an older range. |
| Both near 100 | Both extremes occurred recently, possibly on the same outside bar. | A wide recent range can produce this without a sustained direction. |
Aroon Oscillator subtracts Down from Up, producing a value from −100 to +100. It compresses two readings into one. Up 90 / Down 80 and Up 20 / Down 10 both yield +10, although the ages differ. Keep both lines visible when the recency of each extreme matters.
Why crossovers fail inside a range
Up crossing above Down means the high has become more recent than the low. A range can repeatedly create that ordering without a breakout: price touches one edge, reverses, then reaches the other. An aging extreme leaving the window can also change the ordering.
Consider a hypothetical range from 100 to 102. A touch at 102 can push Up to 100; a later touch at 100 can push Down to 100. Neither event proves that price has escaped the range. An outside bar that sets both window extremes can put both lines at 100 at once.
Turn a reading into a testable filter
- Fix the symbol, regular or extended session, chart timeframe and length before comparing signals.
- For an illustrative bullish filter, require a closed bar with Up above 70 and Down below 30. Reverse those conditions for a bearish filter.
- Define the separate entry trigger, such as a close above a previously identified range high. Specify how that range is selected before testing.
- Define the stop, exit and order timing separately. Count fees, slippage and losses; compare a held-out period as well as the development sample.
The 70/30 thresholds are example design choices, not validated settings. Requiring two qualifying closes adds a one-bar delay relative to the first close and may miss moves; it does not promise fewer losing trades. Aroon also ignores the distance between highs and lows, so it cannot replace a volatility or risk-size rule.
Pine Script example with confirmed crossovers
This indicator preserves Pineify's Aroon formula, exposes Length as an input and waits for a full window before plotting. Crossovers are marked only when the chart bar closes. The lines themselves still update on the open bar. The example does not place orders.
//@version=6
indicator("Aroon: confirmed crossovers", overlay=false)
length = input.int(14, "Length", minval=1)
// Preserve the same extreme-offset calculation used by Pineify.
p_ta_aroon(simple int length) =>
upper = 100 * (ta.highestbars(high, length + 1) + length) / length
lower = 100 * (ta.lowestbars(low, length + 1) + length) / length
[upper, lower]
[up, down] = p_ta_aroon(length)
ready = bar_index >= length
crossUp = ta.crossover(up, down)
crossDown = ta.crossunder(up, down)
confirmedUp = ready and ready[1] and barstate.isconfirmed and crossUp
confirmedDown = ready and ready[1] and barstate.isconfirmed and crossDown
plot(ready ? up : na, "Aroon Up", color=color.orange, linewidth=2)
plot(ready ? down : na, "Aroon Down", color=color.blue, linewidth=2)
hline(50, "Midpoint", color=color.gray)
plotshape(confirmedUp, "Confirmed cross up", shape.triangleup, location.bottom, color.orange, size=size.tiny)
plotshape(confirmedDown, "Confirmed cross down", shape.triangledown, location.top, color.blue, size=size.tiny)
alertcondition(confirmedUp, "Aroon bullish crossover", "Aroon Up crossed above Aroon Down on a closed bar.")
alertcondition(confirmedDown, "Aroon bearish crossover", "Aroon Down crossed above Aroon Up on a closed bar.")Select the code manually if clipboard access is unavailable.
- Open TradingView's Pine Editor, paste the full script and select Add to chart.
- Match Length, symbol, timeframe and session when comparing it with the built-in Aroon indicator.
- To use an alert condition, create an alert in TradingView and select the named crossover. Choose Once Per Bar Close.
TradingView's repainting documentation explains why open-bar values differ from confirmed history. Waiting for the chart close introduces a delay; it does not confirm an unfinished higher-timeframe bar in a different script.
Length and equal extremes belong in the specification
A shorter length changes the comparison window and increases the step size per bar. A longer length retains older extremes for longer. Neither choice is universally better. Compare signals on identical data rather than assigning one length to all crypto, forex or day-trading charts.
Preserve the use of ta.highestbars and ta.lowestbars when extending this example. Those functions resolve the occurrence of equal extremes. Replacing them with a custom loop can change which matching bar supplies the age. For an illustrative length of 14, selecting an equal high 2 bars ago gives 85.71; selecting one 7 bars ago gives 50. That is a material change, even though the maximum price is identical.
A comparison test should include repeated equal highs, repeated equal lows, a bar setting both extremes and an old extreme leaving the window. A simple count since price last matched a rolling high is not a substitute for locating the current window's extreme: when the old maximum expires, the new maximum may be an older bar.
Aroon versus ADX
Aroon uses the age of extremes. ADX uses smoothed directional movement to describe trend strength without a bullish or bearish sign. Their values are not interchangeable. Adding ADX creates another filter to test; agreement does not supply a probability of success. See the officialADX calculation for the directional-movement formula.
Build an Aroon trend filter in Pineify
Pineify's Visual Editor includes Aroon with a Length input and separate Up and Down outputs. The AI Coding Agent can help turn a written rule into Pine Script. Keep the window, equal-extreme handling, confirmation and exit rules explicit in your request.
Use Aroon length 14 with the existing highestbars/lowestbars calculation over 15 bars. Evaluate the trend filter only on closed chart bars: Up above 70 and Down below 30. Keep the crossover alert separate from that filter. Explain the warm-up and equal-high/low behavior.
Review the generated code and compare its readings in TradingView. A syntax check does not verify trading logic or profitability.
Aroon FAQ
What does the Aroon indicator measure?
Aroon measures the time since the highest high and lowest low in a rolling window. Up tracks the high; Down tracks the low. Both range from 0 to 100. A high value means that extreme occurred recently, not that price traveled a large distance.
Why does Aroon use length + 1 in Pine Script?
The calculation includes the current bar and the previous length bars. For length 14, that is 15 observations with ages from 0 to 14. Dividing by 14 lets a current extreme map to 100 and an extreme 14 bars ago map to 0.
Does an Aroon crossover mean buy or sell?
A crossover changes which extreme is more recent. It does not define an order, stop or profit target. In a range, alternating highs and lows can repeatedly reverse the crossover. Review price structure and test a complete rule before treating it as a trade.
What are the best Aroon settings?
There is no best length established by this guide. The example starts at 14, matching Pineify's Aroon configuration. Compare lengths on the same symbol, timeframe, session and test period. Reserve a separate period for validation rather than choosing only the most profitable historical setting.
Does Aroon repaint?
The current reading can change while the candle is open because its high and low can change. This example waits for the chart bar to close before marking crossovers. That does not prevent data revisions or make a separate higher-timeframe implementation immune to repainting.
What happens when highs or lows are equal?
This example preserves the tie handling of Pine Script's ta.highestbars and ta.lowestbars functions, as used by Pineify's Aroon calculation. When comparing another implementation, test repeated equal highs and lows explicitly: choosing a different occurrence changes the age and therefore the Aroon reading.
Sources and related reading
Official documentation checked October 16, 2026.
- TradingView: Aroon definition, formula and interpretation
- TradingView: Aroon Oscillator and the extra-bar window
- TradingView: realtime values and repainting
- Browse TradingView indicator guides
- Read the Directional Movement Index guide
Educational information, not investment advice. All numeric examples here are hypothetical. No backtest, accuracy rate or future return is claimed. Trading involves risk of loss.