Pine Script Ease of Movement (EOM)

Master this unique volume-based indicator in TradingView's Pine Script that reveals how effortlessly price is moving through the market, indicating efficiency and underlying strength.

Subscribe now @ $99/month

What is Ease of Movement (EOM)?

Ease of Movement (EOM) is a volume-based oscillator that attempts to measure the relationship between price movement and volume. Developed by Richard Arms Jr. (also known for the Arms Index or TRIN), EOM essentially tells you how "easily" price is moving up or down on a given amount of volume. A high positive value indicates that the price is moving up with relatively little volume, implying ease of upward movement. Conversely, a low negative value suggests that the price is moving down with relatively little volume, implying ease of downward movement.

EOM is primarily used to:

In Pine Script, EOM provides a unique perspective on market dynamics, combining price action with volume to assess the underlying ease of movement.

Components and Calculation

The calculation of Ease of Movement involves several steps for each period:

  1. Midpoint Move: Calculate the distance the midpoint of the bar moved from the previous bar's midpoint.
    `Midpoint Move = ((High + Low) / 2) - ((High[1] + Low[1]) / 2)`
  2. Box Ratio: This normalizes volume by the price range. It estimates the volume required to move the price by one unit.
    `Box Ratio = (Volume / (High - Low))`
    * A small scaling factor (e.g., 1,000,000 or 100,000,000) is often applied to `Volume` in the denominator to keep the EOM value within a manageable range for plotting. This means `Box Ratio = (Volume / Scaling Factor) / (High - Low)`. * Handle `High - Low == 0` (zero-range bar) to avoid division by zero.
  3. Ease of Movement (EOM): Divide the Midpoint Move by the Box Ratio.
    `EOM = Midpoint Move / Box Ratio`
  4. Smoothed EOM: Typically, a Simple Moving Average (SMA) of the raw EOM values is used to smooth out noise and make the indicator easier to read.
    `Smoothed EOM = SMA(EOM, length)`

A common `length` for smoothing is 14 periods, and a typical `scalingFactor` is 1,000,000.

Basic Ease of Movement (EOM) Implementation in Pine Script

Pine Script v5 provides a convenient built-in function `ta.eom()` for calculating Ease of Movement.

//@version=5
indicator("My Ease of Movement (EOM)", overlay=false) // overlay=false to plot in a separate pane

// Input for EOM smoothing length
length = input.int(14, title="EOM Length", minval=1)

// Input for scaling factor (adjusts the magnitude of EOM values for readability)
// Common values are 1000000 (1 million) or 100000 (100 thousand)
scalingFactor = input.float(1000000, title="Scaling Factor", minval=1)

// Calculate Ease of Movement using the built-in function
// ta.eom() takes the source (hlc3 by default), length, and scaling factor
// It automatically handles division by zero for (High-Low)
eomValue = ta.eom(length, scalingFactor) // Uses hlc3 by default if no source provided

// Plot the EOM line
plot(eomValue, title="EOM", color=color.blue, linewidth=2)

// Plot the Zero Line as a key reference point
hline(0, "Zero Line", color.gray, linestyle=hline.style_dotted)

// Optional: Add reference levels for visual clarity
// These are subjective and depend on the asset and typical EOM values.
// Higher positive values indicate strong upward movement with low volume.
// Lower negative values indicate strong downward movement with low volume.
hline(0.0000001, "Upper Ref (Positive Ease)", color.green, linestyle=hline.style_dashed)
hline(-0.0000001, "Lower Ref (Negative Ease)", color.red, linestyle=hline.style_dashed)

Effortless Movement: High positive EOM means prices are easily rising. High negative EOM means prices are easily falling. Values near zero mean price movement is difficult or requiring significant volume.

Practical EOM Trading Strategies

1. Zero-Line Crossovers (Trend Confirmation / Reversal)

Crossovers of the zero line can provide signals about the underlying trend direction and strength based on the ease of money flow.

//@version=5
strategy("EOM Zero Line Crossover Strategy", overlay=true)

length = input.int(14, title="EOM Length", minval=1)
scalingFactor = input.float(1000000, title="Scaling Factor", minval=1)
eomValue = ta.eom(length, scalingFactor)

plot(eomValue, "EOM", color.blue, display=display.pane_only)
hline(0, "Zero Line", color.gray, linestyle=hline.style_dotted, display=display.pane_only)

// Long entry: EOM crosses above zero
longCondition = ta.crossover(eomValue, 0)

// Short entry: EOM crosses below zero
shortCondition = ta.crossunder(eomValue, 0)

if (longCondition)
    strategy.entry("Long EOM", strategy.long)

if (shortCondition)
    strategy.entry("Short EOM", strategy.short)

// Basic exit: opposite signal
strategy.close("Long EOM", when=shortCondition)
strategy.close("Short EOM", when=longCondition)

2. EOM Divergence (Key Reversal Signal)

Divergence between price and EOM is often considered a powerful signal, suggesting a weakening trend and potential reversal, as the ease of movement is not confirming price action.

//@version=5
strategy("EOM Divergence Strategy", overlay=true)

length = input.int(14, title="EOM Length", minval=1)
scalingFactor = input.float(1000000, title="Scaling Factor", minval=1)
eomValue = ta.eom(length, scalingFactor)

plot(eomValue, "EOM", color.blue, display=display.pane_only)
hline(0, "Zero Line", color.gray, linestyle=hline.style_dotted, display=display.pane_only)

// Simple divergence detection (conceptual, robust detection requires advanced pivot logic)
// This example looks for recent higher/lower swings in price and EOM.

// Bullish Divergence: Price lower low, EOM higher low
bullishDiv = close < close[1] and close[1] < close[2] and eomValue > eomValue[1] and eomValue[1] > eomValue[2]

// Bearish Divergence: Price higher high, EOM lower high
bearishDiv = close > close[1] and close[1] > close[2] and eomValue < eomValue[1] and eomValue[1] < eomValue[2]

// Plot shapes on the chart to indicate divergence
plotshape(bullishDiv, title="Bullish EOM Divergence", location=location.belowbar, color=color.new(color.green, 0), style=shape.triangleup, size=size.small)
plotshape(bearishDiv, title="Bearish EOM Divergence", location=location.abovebar, color=color.new(color.red, 0), style=shape.triangledown, size=size.small)

if (bullishDiv)
    strategy.entry("Long Divergence", strategy.long)
if (bearishDiv)
    strategy.entry("Short Divergence", strategy.short)

// Basic exit after a few bars or on opposite signal
strategy.exit("Long Divergence Exit", from_entry="Long Divergence", profit=close*0.02, loss=close*0.01)
strategy.exit("Short Divergence Exit", from_entry="Short Divergence", profit=close*0.02, loss=close*0.01)

3. Identifying Volatility Contraction / Consolidation

When EOM values hover very close to the zero line for an extended period, it indicates that price movement is requiring a lot of effort (high volume for little price change) or that the price is not moving much at all. This often signals a period of consolidation or low volatility.

//@version=5
indicator("EOM Consolidation Detector", overlay=true)

length = input.int(14, title="EOM Length", minval=1)
scalingFactor = input.float(1000000, title="Scaling Factor", minval=1)
eomValue = ta.eom(length, scalingFactor)

plot(eomValue, "EOM", color.blue, display=display.pane_only)
hline(0, "Zero Line", color.gray, linestyle=hline.style_dotted, display=display.pane_only)

// Define a threshold around zero for "consolidation"
consolidationThreshold = input.float(0.00000005, title="Consolidation Zone Threshold", minval=0.000000001, step=0.000000001)

// Condition for consolidation: EOM is very close to zero
isConsolidating = math.abs(eomValue) < consolidationThreshold

bgcolor(isConsolidating ? color.new(color.yellow, 90) : na, title="Consolidation Zone")

alertcondition(isConsolidating, "EOM Consolidation", "Ease of Movement is near zero, indicating consolidation.")

Optimizing Ease of Movement (EOM) Performance

To get the most from Ease of Movement in Pine Script:

Beyond Raw Volume: EOM doesn't just show if volume is high or low; it shows how much price *effort* is required for that volume, giving insight into underlying market friction.

Common EOM Pitfalls

Conclusion

Ease of Movement (EOM) is a distinctive and insightful volume-based technical indicator available in Pine Script for TradingView. By quantifying how "easy" price is moving given the underlying volume, it offers traders a unique perspective on market efficiency, trend conviction, and potential reversals. While its greatest strength lies in identifying powerful divergences with price, it also excels at confirming existing trends and highlighting periods of consolidation. By understanding its calculation, thoughtfully tuning its parameters, and integrating it strategically with price action and other technical analysis tools, you can leverage EOM to enhance your trading decisions and gain a clearer understanding of the hidden dynamics of market movement.

Enhance Your Trading

Get a high-performance Pine Script analysis tool for actionable market insights, designed for traders on the move.

This strategy runs in live mode on TradingView, helping you identify potential opportunities.

Subscribe now @ $99/month