traileriana

Price/OBV divergence

Shows agreement or disagreement between the direction of the the price and the on-balance volume. When they disagree, the price is supposed to follow the OBV (or so they say.)
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//@version=2
study("Price/OBV divergence", "Price/OBV")
period = input(30, "Period")

// tanh(v) => (exp(v) - exp(-v))/(exp(v) + exp(-v))
// dema(x, p) => 2*ema(x, p) - ema(ema(x, p), p)

obv = cum(change(close) > 0 ? volume : change(close) < 0 ? -volume : 0*volume)

c = sign(change(ema(close, period)))
o = sign(change(ema(obv  , period)))

cc = c == o ? c : c/3*2
oo = o == c ? o : o/3*2

plot(cc, style=columns, transp = 50, color = red )
plot(oo, style=columns, transp = 50, color = blue)