Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Converting OBV indicator on tradingview to ninjatrader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Converting OBV indicator on tradingview to ninjatrader

    If anyone is interested in helping me convert the Tradingview OBV version to be used on Ninja trader I would greatly appreciate it. This particular OBV indicator is superior to any other one I've found. The source code is public. The code is pretty small so maybe it's just a quick conversion. Thank you in advance! I will put the code 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)

    #2
    Hello Tim00,

    Welcome to the NinjaTrader forums!

    This thread will remain open for any community members that would like to build this script as a convenience to you.

    You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our NinjaTrader Ecosystem team follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request or provide one on one educational services.

    Should you decide you want to create this yourself, I am happy to answer any questions I am able about NinjaScript and C#.
    I am including a link below to forum post with helpful resources on getting started with NinjaScript and C#.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    68 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    55 views
    0 likes
    Last Post CarlTrading  
    Working...
    X