Trade Archer - On balance Volume Moving Averages - v1

This indicator improves upon the normal OBV indicator by including Moving Averages of OBV. Additionally clouds have been created between the MAs if desired as well as a selection of MAs and the choice of MA lengths for personal preference. Lastly it can also plot the lowest and highest values of OBV for x bars back so one can clearly see the movement of volume increasing or decreasing. For timing both price and volume , it is good to use the same MA lengths and type for both price and volume . This helps keep timing in sync and show a strong correlation between price and volume . Volume from Market Makers are the catalysts that drive the price up and down. Patience and timing are crucial for joining the volume created by the Market Makers.

If you are new to charting and technical indicators, pick up my Trade Archer - Moving Averages - v1 script as well. The defaults for both scripts have the same moving average type and lengths so timing is the same between Price and OBV moving averages.
Remover dos scripts favoritos Adicionar aos scripts favoritos
//Created By User Trade Archer (Kevin Johnson)
//Last Update 1/31/2015
//Added support for SMA, WMA, RMA, and VWMA.  Defaults to EMA
//Added plots of Highest and Lowest OBV x bars back
//Note: If you make some neat additions, let me know via PM.  Thanks & Enjoy
study(title="Trade Archer - On Balance Volume Moving Averages - v1", shorttitle="TA-OBVMAs-v1", overlay=false, precision=2)

//Collect input
source = input(3, type=integer, defval=3, minval=0, maxval=6, title="OBV Source: open=0 high=1 low=2 close=3 hl2=4 hlc3=5 ohlc4=6")
fast = input(9, minval=1, title="Fast MA")
medfast = input(19, minval=1, title="Medfast MA")
medslow = input(50, minval=1, title="Medslow MA")
slow = input(200, minval=1, title="Slow MA")
lo = input(10, title="lowest length")

usesma = input(false, title="SMA", defval=false, type=bool, defval=false)
useema = input(true, title="EMA (default)", defval=true, type=bool, defval=true)
usewma = input(false, title="WMA", defval=false, type=bool, defval=false)
userma = input(false, title="RMA", defval=false, type=bool, defval=false)
usevwma = input(false, title="VWMA", defval=false, type=bool, defval=false)

//Translate source
src = source == 0 ? open :
      source == 1 ? high :
      source == 2 ? low :
      source == 3 ? close :
      source == 4 ? hl2 :
      source == 5 ? hlc3 :
      source == 6 ? ohlc4 :

//Get OBV
obv = cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)

//Selects check MA type.  Defaults to EMA
fema = usesma ? sma( obv, fast) : useema ? ema( obv, fast) : usewma ? wma( obv, fast) : userma ? rma( obv, fast) :
       usevwma ? vwma( obv, fast) : ema( obv, fast)
mfema = usesma ? sma( obv, medfast) : useema ? ema( obv, medfast) : usewma ? wma( obv, medfast) : userma ? rma( obv, medfast) :
        usevwma ? vwma( obv, medfast) : ema( src, medfast)
msema = usesma ? sma( obv, medslow) : useema ? ema( obv, medslow) : usewma ? wma( obv, medslow) : userma ? rma( obv, medslow) :
        usevwma ? vwma( obv, medslow) : ema( obv, medslow)
sema = usesma ? sma( obv, slow) : useema ? ema( obv, slow) : usewma ? wma( obv, slow) : userma ? rma( obv, slow) :
       usevwma ? vwma( obv, slow) : ema( obv, slow)

//Plot Original OBV, Highest OBV and Lowest OBV x bars back
hp = plot( ceil(highest(obv,lo)), color=gray, linewidth=2, title="highest x bars")
lp = plot( floor(lowest(obv,lo)), color=gray, linewidth=2, title="lowest x bars")
pobv = plot(obv, color=black, linewidth=2, title="obv")

//Plot the MAs of OBV
pf = plot(fema, color=green, linewidth=1, title="fast avg")
pmf = plot(mfema, color=orange, linewidth=1, title="med fast avg")
pms = plot(msema, color=red, linewidth=2, title="med slow avg")
ps = plot(sema, color=maroon, linewidth=1, title="slow avg")

//fill between two emas
fill(pf, pmf, color=green, transp=45, title="short")
fill(pmf, pms, color=orange, transp=45, title="medium")
fill(pms, ps, color=red, transp=45, title="slow")


Nice addition. I especially like the ALMA element, quite useful !
+1 Resposta
This is awesome! I can't believe this hidden treasure actually exists! Thank you sooo much for sharing. Quick question - what is the purpose of medium slow and medium fast MA? Are you using these for some sort of trade confirmation? Thank you again for sharing this
tradearcher dhman2012

Thanks! Glad you like it!

What do you mean it actually exists?

In my opinion, you need two quick/short MA lengths (bearish movement) and two slow/long MA lengths (bullish movement) to capture the range of the market. MAs with lengths 50 and 200 are common knowledge and used as references in TA. So they get medslow and slow lengths. But you can change it to fit your analysis.

For fast and medfast, 8 and 21 are common values and sometimes 9 and 19. Tweak to your style.

I haven't used them for trade confirmation. Been too busy the last few years. :|

Good luck! Obey your rules.
+1 Resposta
dhman2012 tradearcher
@tradearcher, Thank you for the additional information and sharing this great work. I have been looking for this kind of volume based indicator for a while and couldn't find it. So when I found it I got too excited and couldn't believe it actually exists haha.
+1 Resposta
tradearcher dhman2012

No worries. Nice.
dhman2012 tradearcher
@tradearcher, If you don't mind me asking what indicator/ system do you use for trading?
tradearcher dhman2012

Custom code. Hardly different than the free ones that I have. The usual difference is just more options to visualize it.
+1 Resposta
Man.. thank you so much for this. Can't believe this is free. Learning a lot from your code as well. Biiiig thank you dude.

tradearcher tgallenbeck

You're welcome! Glad you like it!
tradearcher tradearcher

Charts look good too!
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Como Funciona Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter
Perfil Configurações de perfil Conta e Cobrança Referred friends Coins Meus Tíquetes de Suporte Central de Ajuda Ideias Publicadas Seguidores Seguindo Mensagens Privadas Conversa Deslogar