Oscillators and waves: from formula to testable condition
Teaching tables and diagrams with explicit inputs, formulas, seeds, local conditions and limits when checking Elliott wave hypotheses.
Published: (UTC+3)
Русский · English · Deutsch · Español · Français · Italiano · 繁體中文 · 日本語 · 한국어
This lab connects indicators to a wave hypothesis through explicit calculations. Every example price, volume and parameter is invented. A positive indicator condition describes a local state; it does not establish an entire Elliott count or measure a probability of profit.
Invented inputs and calculation rules
The table contains completed bars. t is an ordinal index; O/H/L/C mean open/high/low/close and V is invented volume from one source, not an entire-market total. Dataset A has a preceding bar t=−1 with C=99, H=100, L=98. Windows include the current bar unless explicitly stated otherwise.
SMA_n is the mean of the latest n values. EMA_n uses α=2/(n+1) and RMA_n uses α=1/n; both recursions y_t=αx_t+(1−α)y_(t−1) start with the mean of the first n available values. Intermediate values are not rounded; tables display up to six decimals. “—” means insufficient history or an undefined value, not zero. Missing inputs are not replaced with zero. Short teaching periods are not recommended settings; the seeds and zero policies are declared here, without a claim of parity with every platform.
| Dataset | t | O | H | L | C | V |
|---|---|---|---|---|---|---|
| A | 0 | 99.5 | 101 | 99 | 100 | 10 |
| A | 1 | 101.5 | 103 | 101 | 102 | 12 |
| A | 2 | 100.5 | 102 | 100 | 101 | 8 |
| A | 3 | 103.5 | 105 | 103 | 104 | 15 |
| A | 4 | 102.5 | 104 | 102 | 103 | 9 |
| A | 5 | 105.5 | 107 | 105 | 106 | 20 |
| A | 6 | 103.5 | 105 | 103 | 104 | 11 |
| A | 7 | 106.5 | 108 | 106 | 107 | 18 |
| A | 8 | 104.5 | 106 | 104 | 105 | 14 |
| A | 9 | 107.5 | 109 | 107 | 108 | 22 |
| A | 10 | 103.5 | 105 | 103 | 104 | 16 |
Can an early undefined indicator value be replaced by zero and counted as a negative signal?
No. A missing full window and a calculated zero are different states; freeze the warm-up policy in advance.
RSI: smoothed close changes
G and L denote smoothed positive and negative changes in C; L is a positive magnitude. Formula and worked calculation: ΔC_t=C_t−C_(t−1); G=RMA3(max(ΔC,0)); L=RMA3(max(−ΔC,0)); RSI=100G/(G+L). t7: 100×1.7736625514403292/(1.7736625514403292+0.5871056241426612)=75.130738.
The first change uses C_(−1)=99; G and L are seeded from changes t0–2. If G=L=0 RSI is undefined; L=0<G gives 100 and G=0<L gives 0.
Local research predicate: t7: RSI3>70. RSI>70 holds at t7, but it does not mean “wave five has ended.” Price reaches a higher H=109 at t9; a high RSI does not prohibit continuation.
| t | C | G_RMA3 | L_RMA3 | RSI3 |
|---|---|---|---|---|
| 0 | 100 | — | — | — |
| 1 | 102 | — | — | — |
| 2 | 101 | 1 | 0.333333 | 75 |
| 3 | 104 | 1.666667 | 0.222222 | 88.235294 |
| 4 | 103 | 1.111111 | 0.481481 | 69.767442 |
| 5 | 106 | 1.740741 | 0.320988 | 84.431138 |
| 6 | 104 | 1.160494 | 0.880658 | 56.854839 |
| 7 | 107 | 1.773663 | 0.587106 | 75.130738 |
| 8 | 105 | 1.182442 | 1.05807 | 52.77551 |
| 9 | 108 | 1.788294 | 0.70538 | 71.71322 |
| 10 | 104 | 1.192196 | 1.803587 | 39.795815 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
75.130738>70. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
Stochastic: the close within its range
HH3 and LL3 are the highest H and lowest L across three bars; this is version 3/1/2 with no extra K smoothing. Formula and worked calculation: K=100(C−LL3)/(HH3−LL3); D=SMA2(K). t7: K=100(107−103)/(108−103)=80; D=(40+80)/2=60.
K first exists at t2 and D at t3. If HH3=LL3, K and the affected D are undefined; this model does not carry the previous value forward.
Local research predicate: t7: K≥80 ∧ K>D. K≥80 places the close near the top of this selected range. It does not prove reversal: the range and its high can move upward. Changing K smoothing also changes its comparison with D.
| t | C | HH3 | LL3 | K | D_SMA2 |
|---|---|---|---|---|---|
| 0 | 100 | — | — | — | — |
| 1 | 102 | — | — | — | — |
| 2 | 101 | 103 | 99 | 50 | — |
| 3 | 104 | 105 | 100 | 80 | 65 |
| 4 | 103 | 105 | 100 | 60 | 70 |
| 5 | 106 | 107 | 102 | 80 | 70 |
| 6 | 104 | 107 | 102 | 40 | 60 |
| 7 | 107 | 108 | 103 | 80 | 60 |
| 8 | 105 | 108 | 103 | 40 | 60 |
| 9 | 108 | 109 | 104 | 80 | 60 |
| 10 | 104 | 109 | 103 | 16.666667 | 48.333333 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
80≥80; 80>60. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
Williams %R: the same position on another scale
This uses the same three-bar window and H/L/C as the unsmoothed K above. Formula and worked calculation: %R=−100(HH3−C)/(HH3−LL3). t7: −100(108−107)/(108−103)=−20; %R=K−100.
The first value is at t2; a zero range is undefined. The identity %R=K−100 requires identical windows and inputs and an unsmoothed K.
Local research predicate: t7: %R≥−20. At t7, K=80 and %R=−20 occur together. They are one mathematical observation on two scales, not two independent wave confirmations. Reaching the boundary does not determine the next price extreme.
| t | C | HH3 | LL3 | %R3 |
|---|---|---|---|---|
| 0 | 100 | — | — | — |
| 1 | 102 | — | — | — |
| 2 | 101 | 103 | 99 | -50 |
| 3 | 104 | 105 | 100 | -20 |
| 4 | 103 | 105 | 100 | -40 |
| 5 | 106 | 107 | 102 | -20 |
| 6 | 104 | 107 | 102 | -60 |
| 7 | 107 | 108 | 103 | -20 |
| 8 | 105 | 108 | 103 | -60 |
| 9 | 108 | 109 | 104 | -20 |
| 10 | 104 | 109 | 103 | -83.333333 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
−20≥−20; K−100=80−100=−20. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
CCI: deviation from its own mean
TP is typical price; MD3 is the mean absolute deviation of three TP values from that same window’s mean. Formula and worked calculation: TP=(H+L+C)/3; m=SMA3(TP); MD3=Σ|TP_i−m|/3; CCI3=(TP−m)/(0.015MD3). t7: m=317/3; MD3=10/9; CCI3=(107−317/3)/(0.015×10/9)=80.
Calculation starts at t2. CCI is undefined when MD3=0. Here TP=C only because H and L were deliberately made symmetric; that substitution is invalid for arbitrary bars.
Local research predicate: t7: CCI3>100. At t7 the teaching filter CCI>100 is false even though C rose to 107. Positive CCI and a crossing above 100 are different conditions. Neither determines the number of internal waves.
| t | C | TP | SMA3(TP) | MD3 | CCI3 |
|---|---|---|---|---|---|
| 0 | 100 | 100 | — | — | — |
| 1 | 102 | 102 | — | — | — |
| 2 | 101 | 101 | 101 | 0.666667 | 0 |
| 3 | 104 | 104 | 102.333333 | 1.111111 | 100 |
| 4 | 103 | 103 | 102.666667 | 1.111111 | 20 |
| 5 | 106 | 106 | 104.333333 | 1.111111 | 100 |
| 6 | 104 | 104 | 104.333333 | 1.111111 | -20 |
| 7 | 107 | 107 | 105.666667 | 1.111111 | 80 |
| 8 | 105 | 105 | 105.333333 | 1.111111 | -20 |
| 9 | 108 | 108 | 106.666667 | 1.111111 | 80 |
| 10 | 104 | 104 | 105.666667 | 1.555556 | -71.428571 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
80<100. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
ROC: relative change over three bars
This is percentage ROC relative to C_(t−3), without additional smoothing. Formula and worked calculation: ROC3%=100(C_t−C_(t−3))/C_(t−3). t7: 100(107−103)/103=3.883495%.
The first value is at t3; a zero base price is undefined. A negative base changes the sign interpretation; all prices in this example are positive.
Local research predicate: t7: ROC3%>0. ROC>0 at t7 compares 107 with 103, not with a wave high. With a positive base its sign matches Momentum3: these are dependent transforms of one change, not independent confirmations.
| t | C | C_(t−3) | ROC3% |
|---|---|---|---|
| 0 | 100 | — | — |
| 1 | 102 | — | — |
| 2 | 101 | — | — |
| 3 | 104 | 100 | 4 |
| 4 | 103 | 102 | 0.980392 |
| 5 | 106 | 101 | 4.950495 |
| 6 | 104 | 104 | 0 |
| 7 | 107 | 103 | 3.883495 |
| 8 | 105 | 106 | -0.943396 |
| 9 | 108 | 104 | 3.846154 |
| 10 | 104 | 107 | -2.803738 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
100×4/103=3.883495%>0. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
Momentum: a difference, not a percentage
Here Momentum is the three-bar close difference in price units. Some implementations use a ratio; that is a different version. Formula and worked calculation: Momentum3=C_t−C_(t−3). t7: 107−103=4.
The first value is at t3. There is no division: a zero base price alone is not undefined, but a missing required close is.
Local research predicate: t7: Momentum3>0. The value 4 is not 4%: the percentage change is about 3.883495%. A positive difference does not identify an impulse versus part of a correction; price structure still needs checking.
| t | C | C_(t−3) | Momentum3 |
|---|---|---|---|
| 0 | 100 | — | — |
| 1 | 102 | — | — |
| 2 | 101 | — | — |
| 3 | 104 | 100 | 4 |
| 4 | 103 | 102 | 1 |
| 5 | 106 | 101 | 5 |
| 6 | 104 | 104 | 0 |
| 7 | 107 | 103 | 4 |
| 8 | 105 | 106 | -1 |
| 9 | 108 | 104 | 4 |
| 10 | 104 | 107 | -3 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
107−103=4>0; ROC3%=3.883495%. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
RSI divergence: price, value and availability
Compare H at t5 and t7 with RSI3 at those same bars. Do not select indicator extremes from different timestamps. Formula and worked calculation: H5=107 < H7=108; RSI3_5=84.431138 > RSI3_7=75.130738; τ_avail=8.
The price-pivot rule requires one completed bar on each side, with pivot H strictly above both neighbors. Thus t5 is confirmed at t6, t7 at t8, and the pair is available only at t8. RSI3 uses the formula and seeds declared above.
Local research predicate: t8: H7>H5 ∧ RSI3_7<RSI3_5 ∧ τ_avail(p7)≤8. Price makes a higher high while RSI3 is lower: that is the declared bearish divergence. Yet later H9=109 and C9=108 move higher again. The observation promises no lasting reversal, proves no wave-five completion and permits no backdated entry at t7.
| t | C | H | RSI3 |
|---|---|---|---|
| 0 | 100 | 101 | — |
| 1 | 102 | 103 | — |
| 2 | 101 | 102 | 75 |
| 3 | 104 | 105 | 88.235294 |
| 4 | 103 | 104 | 69.767442 |
| 5 | 106 | 107 | 84.431138 |
| 6 | 104 | 105 | 56.854839 |
| 7 | 107 | 108 | 75.130738 |
| 8 | 105 | 106 | 52.77551 |
| 9 | 108 | 109 | 71.71322 |
| 10 | 104 | 105 | 39.795815 |
Reproduce the highlighted calculation and evaluate the local predicate. Does the result establish the entire wave count?
108>107; 84.431138>75.130738; τ_avail=8≠7; H9=109. No. It is the result of the stated calculation on invented data, not proof of a wave structure or profit.
A testable condition and a wave strategy
For a study, freeze the source, timeframe, parameters, formula, availability time and alternative wave count first. Each section gives a local predicate with a threshold chosen for arithmetic practice. Record both positive and negative outcomes at bar close without selecting settings after seeing the result. Check a structural wave-rule violation from price separately.
RSI, averages, MACD and other price transforms share overlapping inputs. Several agreeing lines are not independent votes and do not supply probabilities that can be multiplied. A strategy test needs a separate sample and a predeclared outcome; simulated trades also need execution and cost assumptions. This lab supplies no trading performance, accuracy rate or product features.
| Value | Local research predicate |
|---|---|
| RSI: smoothed close changes | t7: RSI3>70 |
| Stochastic: the close within its range | t7: K≥80 ∧ K>D |
| Williams %R: the same position on another scale | t7: %R≥−20 |
| CCI: deviation from its own mean | t7: CCI3>100 |
| ROC: relative change over three bars | t7: ROC3%>0 |
| Momentum: a difference, not a percentage | t7: Momentum3>0 |
| RSI divergence: price, value and availability | t8: H7>H5 ∧ RSI3_7<RSI3_5 ∧ τ_avail(p7)≤8 |
Three price transforms agree. Does that provide three independent confirmations and establish the count?
No. Shared inputs create dependence; local filters are checked separately from price rules, and usefulness needs another sample.