I don’t think that the (rather helpful) OBV oscillator has been included yet in the PRT library.
Anyone happy to translate the tradingview code? It is freely available but please give credit to its creator. See below:
// @author LazyBear
//
// Appreciate a note if you use this code anywhere.
study(title=”On Balance Volume Oscillator [LazyBear]”, shorttitle=”OBVOSC_LB”)
src = close
length=input(20)
obv(src) => cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)
os=obv(src)
obv_osc = (os – ema(os,length))
obc_color=obv_osc > 0 ? green : red
plot(obv_osc, color=obc_color, style=line,title=”OBV-Points”, linewidth=2)
plot(obv_osc, color=silver, transp=70, title=”OBV”, style=area)
hline(0)
Just search the forum for OBV and you will get it.
Use the search box that opens when your mouse hovers your avatar on the upper right corner of the blue toolbar.
Thank you for the quick response Robert. Unfortunately the search as described above does not provide me with the “OBV cycle indicator” or similar, as coded above (just screeners, divergences, PPO on OBV etc.) The standard OBV in PRT is not helpful either, as it does not allow for down-adjustment of the (20) standard period unfortunately. Above indicator allows adjustment of a short and long OBV period. (See tradingview settings of the indicator above).
Any way above can be transcribed?
Probably it can be converted, but I can’t.
Nicolas knows several languages and takes care of that, he will tell you asap.
Bonjour à vous à partir de l’indicateur
On-Balance-Volume-Oscillator2.itf
je souhaite intégrer à un screener la condition “Différence est supérieure à Ma3” or le screener ne me retourne aucune valeur.
myDifference, myma3 = CALL “On Balance Volume Oscillator2″[20, 14]
c1 = (myDifference > myma3)
SCREENER[c1] (Variation AS “% Barre prec”)
Avez vous une idée?
Bien cordialement
Régis
hello to you from flag
- On-Balance-Volume-Oscillator2.itf
I want to integrate the condition “Difference is greater than Ma3” into a screener, but the screener does not return any value to me.
myDifference, myma3 = CALL “On Balance Volume Oscillator2″[20, 14]
c1 = (myDifference > myma3)
SCREENER[c1] (Variation AS “% Bar prev”)
Any idea? Sincerely Regis
@Regisnew
Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂
It’s better to embed custom indicators into your screener, rather than CALLing it:
Periods = 20
Periods2 = 14
MyOBV = OBV(close)
ma1 = 0
IF BarIndex > max(Periods,Periods2) THEN
Sma = Average[Periods,0](MyOBV)
Diff = MyOBV - Sma
ONCE wmaPERC = 1 / Periods2
//ONCE maP = max(1,round(exp(0.5*log(Periods2))))
ma1 = (Diff * wmaPERC) + (ma1[1] * (1 - wmaPERC)) //Wilder Average 1
//ma2 = average[maP,0](ma1)
ma3 = ma1 * exp(0.15*log(Periods2))
ENDIF
//myDifference, myma3 = CALL "On Balance Volume Oscillator2"[20, 14]
//c1 = (myDifference > myma3)
c1 = Diff > ma3
SCREENER[c1] (Variation AS "% Bar prev")
merci beaucoup, c’est parfait
thank you very much, it’s perfect
@Regisnew
Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.
Thank you 🙂