Free lesson · Technical analysis
Dynamic support, trend lines and Gann angles
Open interactive lessonPractice calculationsExplore labs
Start with the idea
A moving reference changes with time. State its numerical rule before drawing it on a chart.
Symbols, units & horizon
- E_t: current EMA in price units
- C_t: current completed close
- α: smoothing coefficient in (0,1]
- E_(t−1): prior EMA
- P₁,P₂: confirmed anchor prices
- t₁,t₂: distinct anchor times in bars or stated time units
- m: price units per time unit
- K(t): projected line level
When and why to use this
Use distances to causal moving references and trend lines as features or explicit trigger boundaries.
- A moving average can act as a candidate dynamic support/resistance reference. A touch or bounce remains a hypothesis, not a property of the average.
- An EMA updates the previous average toward the latest completed value. Its smoothing coefficient controls response speed.
- A trend line joins two previously confirmed anchors. It becomes available when the second anchor is confirmed; projecting it earlier is hindsight.
- A Gann 1×1 line means one chosen price unit per chosen time unit. It is not an invariant 45-degree angle when the chart is resized.
- Specify linear versus logarithmic price axes. A straight line on a log-price axis represents a different price path.
- Normalize distances by prior volatility and test against a constant-level or simple trend baseline. Reject an interpretation that depends only on visual aspect ratio.
Dynamic support, trend lines and Gann angles
- EMA with prior 100, new close 104 and α=.25 gives .25×104+.75×100=101.
- Anchors (0,100) and (4,108) give slope (108−100)/(4−0)=2 price units/bar.
- At bar 6, the line projects to 100+2×6=112. A 1×1 line in these units would instead have slope 1.
The same 2-price-units/bar slope looks steeper or flatter when the screen axes are resized, but its numerical rule does not change.
Use the rule
- Fix the definition, units and information timestamp.
- Compute the example and inspect the graph.
- Compare with a simple baseline on untouched periods after costs.
Before moving on
Write the exact rule, its availability time, an invalidation condition and a fair out-of-sample test.
- Research context: review the related evidence checkpoint. The numerical convention here defines a candidate feature; that related research does not validate this exact rule.
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
def ema_step(close,previous,alpha):
if not 0<alpha<=1: raise ValueError("alpha in (0,1] required")
return alpha*close+(1-alpha)*previous
def projected_line(t,t1,p1,t2,p2):
if t1==t2: raise ValueError("Distinct anchor times required")
slope=(p2-p1)/(t2-t1)
return p1+slope*(t-t1)
print(ema_step(104,100,.25),projected_line(6,0,100,4,108))Continue learning
Technical Analysis: Geometry, Structure & Evidence — all lessons- Support, resistance and reversal: start with a price zone
- Breakout detection, false breaks and retests
- Fibonacci retracements: anchors before ratios
- Harmonic patterns: ratio constraints and competing candidates
- Elliott Wave: count hypotheses, rules and invalidation
- Fair value gaps (FVG): three-bar geometry and fill measurement
- Heikin-Ashi: smoothed candles are synthetic prices
- Renko: price-driven bricks and the missing time axis
- Dynamic support, trend lines and Gann angles
- Momentum indicators, oscillators and divergence
- Volume, supply/demand zones and what OHLCV cannot reveal
- Market structure, BOS and CHOCH as a state machine
- Moon phases: encode a calendar hypothesis and try to falsify it
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations