Logo
OFFLINEPIXEL
/ pinescript-strategies / pine-script-ease-of-movement

$ Pinescript Ease of Movement (EOM)

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

500+ Clients Helped
100% Satisfaction
Live Trading Ready
⚠️
Trading financial markets carries risk. All content (PineScript code, indicators, strategies) on this website is for educational purposes only. Past performance is not indicative of future results. By using any code or information from this site, you agree that you are solely responsible for your trading decisions. The author disclaims all liability for any losses incurred. To gain from experts experiences, You can always try our Invite Only Scripts
01

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:

  • Identify effortless trends: Spotting when price is trending strongly with low volume, indicating a lack of significant resistance or support.
  • Confirm trend strength: Positive EOM confirms uptrends, negative EOM confirms downtrends.
  • Detect divergence: When price and EOM move in opposite directions, it can signal a weakening trend and potential reversal.
  • Gauge market efficiency: Higher EOM values imply more efficient price movement.
02

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)`
03

Basic Ease of Movement (EOM) Implementation in Pinescript

pine-script@terminal
//@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)
$ ✓ Compiled successfully
04

Effortless Movement

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.

05

Practical EOM Trading Strategies

06

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

pine-script@terminal
//@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)
$ ✓ Compiled successfully
07

2. EOM Divergence (Key Reversal Signal)

pine-script@terminal
//@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)
$ ✓ Compiled successfully
08

3. Identifying Volatility Contraction / Consolidation

pine-script@terminal
//@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.")
$ ✓ Compiled successfully
09

Optimizing Ease of Movement (EOM) Performance

To get the most from Ease of Movement in Pinescript:

  • Focus on Divergence: EOM's most powerful signals often come from divergences with price, indicating a weakening trend and potential reversal.
  • Parameter Tuning:
    • `Length`: The smoothing length (commonly 14). Shorter lengths make EOM more sensitive to recent price/volume interactions, while longer lengths provide a smoother, less volatile reading.
    • `Scaling Factor`: This is primarily for visual scaling. Adjust it so the EOM values are readable on your chart (e.g., between -0.1 and +0.1 or -100 and +100, depending on the asset's price range and volume).
  • Combine with Price Action: Always confirm EOM signals with price action. An EOM signal is more reliable if supported by candlestick patterns, breaks of support/resistance, or other price-based confirmations.
  • Trend Context: Use EOM in the context of the larger trend. In an uptrend, look for positive EOM and bullish divergences for long entries. In a downtrend, look for negative EOM and bearish divergences for short entries.
  • Volume Context: While EOM incorporates volume, also consider the raw volume itself. Very low volume might make EOM volatile or produce misleading signals.
10

Beyond Raw Volume

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.

11

Common EOM Pitfalls

  • Lag: As a smoothed indicator, EOM can still lag price action, especially during sharp reversals. Divergence helps to address this.
  • False Signals: In very choppy or low-volume markets, EOM can fluctuate wildly or stay near zero, generating ambiguous or false signals.
  • Scaling Factor Dependency: The visual appearance and absolute values of EOM are heavily dependent on the `scalingFactor` which can be confusing if not understood. Its interpretation is based on its direction, zero line crossovers, and divergence.
  • Not for All Assets: EOM is most effective on assets with reliable and significant volume data. Illiquid assets or those with inconsistent volume might yield unreliable EOM readings.
  • Not a Standalone Indicator: EOM provides valuable insights but should never be used in isolation. It works best as a confirming indicator within a broader trading strategy.
12

Conclusion

Conclusion

Ease of Movement (EOM) is a distinctive and insightful volume-based technical indicator available in Pinescript 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 Pinescript 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.

Get Pinescript Strategy