Your condition compares midpoint averages
Use the AO calculation
It matches the specified input and averaging method. A close-based EMA difference implements another rule.
TradingView indicator comparison
Short answer
Awesome Oscillator vs MACD compares two different moving-average calculations. AO subtracts the 34-bar SMA of (high + low) / 2 from its 5-bar SMA. A common MACD setup subtracts the 26-bar EMA of close from its 12-bar EMA, then adds a 9-bar signal EMA. AO bars show the average difference itself; MACD histogram bars show MACD minus signal. Compare AO with the MACD line when checking zero crossings.
| Criterion | MACD | Awesome Oscillator | Practical meaning |
|---|---|---|---|
| Price input | Close for the 12/26/9 EMA setup used here; TradingView offers a source setting. | Each bar midpoint: (high + low) / 2. | A close near a candle extreme can change MACD while an unchanged midpoint leaves the new AO input unchanged. |
| Smoothing | EMA here; TradingView also offers SMA for oscillator and signal averages. | SMA with lengths 5 and 34. | SMA gives equal weight within its window. EMA carries a decaying contribution from earlier inputs. |
| What the bars measure | Histogram = MACD line minus signal line. | AO = fast SMA minus slow SMA. | A negative MACD histogram can coexist with a positive MACD line and positive AO. |
| Matched zero event | MACD line crosses zero when its fast and slow averages cross. | AO crosses zero when its fast and slow averages cross. | A MACD histogram zero crossing instead marks a MACD/signal crossing. |
Use the AO calculation
It matches the specified input and averaging method. A close-based EMA difference implements another rule.
Use MACD with an explicit signal setting
Write down the signal length and average type. Adding a signal average to AO would create a custom variant.
Change one calculation input at a time
Hold lengths fixed, compare close with midpoint, then compare SMA with EMA. Changing all three cannot isolate the cause.
Define exits and costs after checking values
A numerical match verifies implementation. It does not establish which rule earns more or handles future conditions better.
This is a hypothetical calculation in price units, not a backtest. Bars 1 through 34 have high, low, and close equal to 100. Seed both price EMAs at 100 and the signal EMA at 0. Use AO 5/34 and MACD 12/26/9 with EMA smoothing for both MACD and signal. All values below use completed bars and are rounded only for display.
For each new value x, update an N-bar EMA as previous EMA + (2 / (N + 1)) × (x − previous EMA). Update the signal with the new MACD value and N = 9. For AO, average the latest 5 midpoints and subtract the average of the latest 34 midpoints.
At bar 35, the midpoint remains 100. Both AO averages therefore remain 100, even though the close rises to 104. The fast EMA becomes 100 + 4 × 2/13 = 100.615385; the slow EMA becomes 100 + 4 × 2/27 = 100.296296. Their unrounded difference is 0.319088, and the signal takes one fifth of that value.
At bar 36, the AO averages are 100 + 3/5 = 100.6 and 100 + 3/34 = 100.088235. Their difference is 0.511765. At bar 37, midpoint deviations of 3 and 1 remain in both windows, giving AO = 4/5 − 4/34 = 0.682353.
Bar 37 separates the two meanings of zero: MACD remains above zero but drops below its signal, so its histogram becomes negative. AO stays positive and rises. Neither calculation is broken. They answer different numerical questions.
At bar 38, AO is unchanged because the added and removed midpoints are both 100 in each SMA window. The EMAs continue moving toward the close of 100. This example explains disagreement; it does not rank predictive accuracy or signal speed.
Add both built-in indicators to one chart and record their settings before comparing timestamps. Use the same symbol, session, timeframe, and candle type. Keep MACD on the chart timeframe for this first check; a separate indicator timeframe introduces another comparison variable.
Read numerical values rather than comparing pane heights. On each selected closed bar, record high, low, close, AO, MACD, signal, and histogram. Verify the histogram subtraction first. Then inspect each source series and moving-average setting.
These examples define a research process. They are not trade calls or evidence that a setup will make money.
Rule to test
Calculate one 12/26 EMA difference on close and another on midpoint. Keep smoothing and lengths identical.
Validation
Log both source values and differences at the same timestamp. This isolates source choice, without changing the averaging method.
Rule to test
Calculate 5/34 differences using SMA and EMA on midpoint. Keep source and lengths identical.
Validation
Record initialization and available history. Differences now come from weighting and initialization, rather than source or length.
Rule to test
Record AO zero crossings, MACD-line zero crossings, and MACD/signal crossings in separate columns.
Validation
Treat these as diagnostic events. Define a separate exit, position size, execution timing, and cost model before testing trades.
In the worked example, bar 35 checks source sensitivity: close changes while midpoint stays at 100.
Bar 37 checks event identity: a negative MACD histogram does not require a negative MACD line.
Keep full precision during calculation. Rounded labels can hide small differences around zero.
Give the Pine Script AI Coding Agent the source, lengths, average types, and bar-close requirement from this comparison. Ask it to expose AO, MACD, signal, and histogram values for inspection, with separate conditions for each crossing. Verify the generated values against the four-bar example before adding strategy exits, sizing, and costs.
Build an AO and MACD comparison scriptDefine an Alligator trend filter, MACD timing rule, exits, and controlled Pine Script tests.
Compute Moving Average Convergence Divergence values to identify trend direction and momentum.
Learn how to create and customize the MACD indicator in TradingView using Pine Script. Covers the formula, manual coding, and no-code creation with Pineify.
Compare daily MACD histogram values and momentum states across covered symbols. Positive and negative readings are displayed around the zero line.
Source review completed 2026-10-17.
The numbers are a hypothetical calculation, not market observations or trading results. This page explains indicator mechanics and does not provide investment advice or predict returns.