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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    75 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    39 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    101 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X