# Force Index

1125 2
Hi,
This Indicator plots the Force Index as described by Dr             . Alexander
Elder in "Trading For a Living." The ForceIndex indicator relates
price to volume by multiplying net change and volume . ForceIndex is
calculated using the following equation:
ForceIndex = Volume (today) * (Close(this period) - Close(last period))
ForceIndex is typically presented as two smoothed averages (slow and fast)
to avoid false signals.
```////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 28/04/2014
// This Indicator plots the Force Index as described by Dr. Alexander
// Elder in "Trading For a Living." The ForceIndex indicator relates
// price to volume by multiplying net change and volume. ForceIndex is
// calculated using the following equation:
// ForceIndex = Volume(today) * (Close(this period) - Close(last period))
// ForceIndex is typically presented as two smoothed averages (slow and fast)
// to avoid false signals.
////////////////////////////////////////////////////////////
study(title="Force Index", shorttitle="Force Index")
XLen1 = input(3, minval=1)
XLen2 = input(13, minval=1)
hline(0, color=green, linestyle=line)
xValue = volume * (close - close[1])
xSMA1 = ema(xValue, XLen1)
xSMA2 = ema(xValue, XLen2)
plot(xSMA1, style = histogram, color=blue, title="SlowAvg")
plot(xSMA2, color=red, title="FastAvg")
```
DONATE/TIP

BTC: 1Lo1GoTNsPbrjGAgPgF4MYZPhBFdoVHaTm
Great indicator, thanks!!

One issue that I have if you can help....the 13 EMA is normally really close to the 0 line, then it is complicated to see if it is positive or negative sometime and if it is far or not from 0.

I have the same indicator in ProRealTime, there you have the possibility of apply a "vertical displacement" to the EMA, I use 350% for example, then it is really easy to see if it is near 0 or not.

Do you know a way to do the same in this Script?

Thanks a lot!!!
Great stuff. I was thinking to write something similar, but that in a cumulative way, more like a mix between this and the OBV. Unfortunately my Pine knowledge is not developed enough yet to do this. If anybody knows if such a thing already exists, please let me know. And thanks for all the great indicators Harry :)
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter