An indicator that draws how much an exponential moving average has risen (or fallen) compared with a few candles ago, to read the “slope” of the trend.
- Weapon tier
- Advanced
- Slots used
- Sub-charts 1/2
Concept
The SONAR line is “the exponential moving average now − the exponential moving average 6 candles ago”. While the average is rising it is above 0, and while it is falling it is below 0. Where it crosses the zero line is where the average changes direction.
The signal line (sonarSignal) is a slower line: SONAR averaged once more. SONAR above the signal line is read as the slope getting steeper; below it, as the slope flattening.
- sonar
- sonarSignal
Charts by TradingView Lightweight Charts™
80 candles with the SONAR line, its signal line and volume. While the price falls for a while, SONAR stays below the zero line. After the price bottoms and starts to rise, at candle 60 (↑ marker) SONAR climbs above the zero line, then stays above 0 for a while as the price rises. Keyboard: ←/→ to move, +/− to zoom, 0 to see the whole chart.
The ↑ marker comes a few candles after the bottom. SONAR is the slope of an average, so it changes only after the bottom has been “confirmed”. This scene is one where the price rose after the cross above 0, and it does not always go that way. Drag the chart sideways with a finger or the mouse to move it, and pinch with two fingers to zoom in. With a keyboard, click the chart, then use ←/→ to move and +/− to zoom.
How it is calculated
Find the 9-candle exponential moving average of the close: an average that gives more weight to recent candles.
SONAR = the exponential moving average now − the exponential moving average 6 candles ago. The 6 candles are fixed in this game and cannot be changed.
Signal line = the 5-candle exponential moving average of SONAR.
The values are price differences, not percentages, so pricier stocks show bigger numbers. Do not compare sizes between stocks; look only at the relation to the zero line and the signal line.
Parameters
| What it sets | Name in the game | Default | Range |
|---|---|---|---|
| Candles used for the exponential moving average | period | 9 | 2 – 60 |
| Candles used for the signal line | signalPeriod | 5 | 2 – 60 |
Trading ideas
Crossing zero: when SONAR climbs from below the zero line to above it, it is commonly read as “the average has turned from falling to rising”. The chart on this page shows that scene. Dropping below the zero line means the average has turned down.
Crossing the signal line: some traders watch SONAR crossing its signal line as an earlier signal than the zero line. It is faster but gives more false signals.
Common traps
- Because it looks at an average of an average, it is late. By the time it crosses zero, the price has often already risen quite a bit from the bottom.
- When the price moves sideways, SONAR hovers around the zero line and crosses it often. Check first whether there is a trend (lesson 2).
- None of these are sure signals. Read them together with the trend and volume.
In the game
- “SONAR” is a “Advanced” weapon and uses 1 of the “Sub-charts” panels (limit 2). Volume in the starting setup already uses 1, so adding it brings it to 2 (0 left).
- The panel shows two lines, SONAR (sonar) and its signal line (sonarSignal); the zero line is drawn as a dotted line only when the panel has values below 0.
Related indicators and lessons
- RSI — An indicator that compares recent up moves with recent down moves and shows, as a number from 0 to 100, which side has been stronger lately.
- Stochastic — An indicator that shows, on a scale of 0 to 100, where today’s close sits between the lowest and the highest price of the last few candles.
- TRIX — An indicator that shows by what percent, per candle, a very smooth line — an exponential moving average stacked three times — rises or falls.
- CCI — An indicator that shows how many times its usual swing the price has moved away from its recent average.
- ROC — An indicator that connects into a line how many percent the close has risen or fallen compared with the close a few candles ago.
- Disparity Index — An indicator that shows, around a baseline of 100, how many percent the close is away from its moving average.
- Psychological Line — An indicator that reads the market mood, upbeat or gloomy, from the percentage of recent candles that closed higher.
- Williams %R — An indicator that shows, as a number from −100 to 0, how far today’s close sits below the highest price of recent candles.
- AB Ratio — An indicator that compares how far each candle rose above and fell below its open, showing which side was stronger during the session.
- Ultimate Oscillator — An indicator that blends buying pressure over a short, a medium and a long period into a number from 0 to 100.
- 3. Moving averages
- 2. Trends and sideways moves