Assista a como baixar robôs de negociação gratuitos
Encontre-nos em Twitter!
Participe de nossa página de fãs
Script interessante?
Coloque um link para ele, e permita que outras pessoas também o avaliem
Você gostou do script?
Avalie seu funcionamento no terminal MetaTrader 5
Indicadores

Elder Force Index (faithful to the book definition) - indicador para MetaTrader 5

Alexander Elder
Publicado por:
Joao Prata Silva Yglesias
Joao Prata Silva Yglesias
Trader e desenvolvedor de robôs com foco em automação e gestão de risco para o mercado Forex. Crio Expert Advisors que priorizam proteção de capital e sobrevivência, em vez de promessas — estratégias reais, resultados transparentes e monitoramento ao vivo.
Visualizações:
24
Publicado:
Freelance MQL5 Precisa de um robô ou indicador baseado nesse código? Solicite-o no Freelance Ir para Freelance

Elder Force Index on WIN$N M15 - the subwindow name states the volume sourceThe subwindow name states which volume source was used - here, real volume on an exchange-traded instrument.

WHAT THIS IS

Force Index is one of the indicators Alexander Elder introduced in Trading for a Living and kept using in the later books. It links price movement to the volume behind it, on the idea that a move backed by heavy volume means something different from the same move on thin trade.

This implementation follows the definition as written in the books. That sounds like a small claim, and it is not: implementations of Force Index in the wild disagree with each other, and the disagreement is not cosmetic.

THE DEFINITION

From The New Trading for a Living:

Force Index = Volume x (Close today - Close yesterday)

and the resulting series is then smoothed by a moving average. Elder uses two lengths, and both are stated in his text: a 2-period EMA for short-term entry timing, and a 13-period EMA for the underlying trend and for divergences.

THE ORDER OF OPERATIONS IS THE POINT

This indicator computes:

MA[ Volume(i) x (Close(i) - Close(i-1)) ]

The raw force is computed bar by bar first, and the average is applied to that series.

There is a different construction that looks similar and is not the same thing: smoothing the price first, and multiplying the smoothed difference by volume afterwards. Written out:

Elder MA[ Volume(i) x (Close(i) - Close(i-1)) ] the other Volume(i) x ( MA(i) - MA(i-1) )

These are different series and they do not converge. The first one measures the force of each individual bar and then averages those forces. The second one measures how fast a moving average is moving and scales it by today's volume - which is a different quantity with a different meaning, and it reacts differently around volume spikes.

Neither is wrong as mathematics. Only the first one is what Elder wrote. If you compare this indicator against another implementation and the values differ, check which order the other one uses before assuming either is broken.

VOLUME: A DECISION THE USER SHOULD BE AWARE OF

Elder wrote for stocks, where volume is genuine: every share traded is reported. On instruments that only publish tick volume - the number of price changes - the same formula measures something related but not identical.

This indicator prefers real volume where the instrument reports it and falls back to tick volume where it does not. The parameter lets you force either one. Two details make the fallback safe:

  - The source actually used is written into the subwindow name, so the
    chart always tells you which one you are looking at.

  - A single bar reporting zero real volume does not switch the whole
    series to tick volume - illiquid bars legitimately trade nothing.
    Availability is decided over a window of bars, not one sample.

  - A bar with no real volume falls back to its own tick volume rather
    than to zero. Using zero there would silently erase a price move
    that actually happened from the series.

HOW ELDER USES IT

From Come Into My Trading Room, the short-term reading:

trend is up and the 2-period EMA drops below zero -> buy signal trend is down and the 2-period EMA rallies above zero -> sell signal

The logic is that in an uptrend, a brief collapse of force marks the moment the sellers spend themselves - a pullback inside a trend rather than a reversal of it.

And the longer reading, from the 13-period EMA: divergences between it and price mark important turning points, while new highs or lows of Force Index say the trend in force is strong and likely to continue.

The trend filter is deliberately not part of this indicator. Every one of those rules is conditional on trend direction, and an oscillator used without that condition is being used against its own definition. Supply the trend from whatever you already trust - Elder himself uses the weekly chart for it.

PARAMETERS

Slow period 13 by default, Elder's trend reading Fast period 2 by default, Elder's entry reading; set 0 to hide it Smoothing EMA by default, as Elder specifies. SMA, SMMA and LWMA are offered because the formula is unchanged and people ask Volume source real with fallback to tick, tick only, or real only

NOTES ON THE IMPLEMENTATION

The raw series is kept in a calculation buffer and the smoothing is applied to it with the standard MovingAverages library, so the indicator recalculates incrementally instead of rebuilding the whole history on every tick.

Both plotted buffers come from the same raw series - the fast and slow readings are two averages of one calculation, not two separate calculations. The zero line is the reference the signals above are defined against.

WHAT IS NOT CLAIMED

No performance claim is made, and no backtest is offered with this indicator. It is a faithful implementation of a published formula, not a trading system.

That distinction matters more than it sounds. Recovering the formula correctly and having reason to believe it makes money are two different things, and only the first one is what this file delivers. Test it on your own data, on your own instrument, with your own costs, before relying on it.

Envelope SAR Envelope SAR

Este indicador é um oscilador de tendência e momentum que acompanha a posição do preço em relação ao seu canal de volatilidade estrutural, utilizando uma relação normalizada entre o SAR Parabólico e os Envelopes.

T5Copier - MT 5 client to client Local trade copier T5Copier - MT 5 client to client Local trade copier

Um copiador de negociações ponto a ponto local com painel personalizado em C# e canal de transporte em Go; o código-fonte completo está disponível no arquivo (versão baseada em soquete), com latência ultrabaixa

Accumulation/Distribution Accumulation/Distribution

O Indicador Accumulation/Distribution (Acumulação/Distribuição ou A/D) é determinado pelas mudanças de preço e volume.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

O Indicador Acceleration/Deceleration (Aceleração/Desaceleração ou AC) mede a aceleração e a desaceleração da força motriz atual do mercado.