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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    24 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    20 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    14 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    11 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    41 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X