NexusFi: Find Your Edge


Home Menu

 





EasyLanguage OBV On Balance Volume Indicator


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (18 thanks)
    2. looks_two Supio with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 jfan98 with 1 posts (0 thanks)
    1. trending_up 15,624 views
    2. thumb_up 18 thanks given
    3. group 8 followers
    1. forum 9 posts
    2. attach_file 3 attachments




 
Search this Thread
  #1 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,574

Here is my custom version of the OBV (On Balance Volume) indicator.

Plot 1, 2, 3 and 4 should be invisible and are just used for color reference.

Let me know what you think.

Below is the code, attached is the .pla for MultiCharts.

[img]https://nexusfi.com/v/5prje4.png[/img]

[img]https://nexusfi.com/v/4r5x4n.png[/img]

 
Code
                            
// Big Mike Trading https://nexusfi.com

// April 6 2010
// Indicator
// Plot 1, 2, 3, 4 should be "Invisible" and are used for color place holders only

inputs:
    
Length),
    
Smoothing );

variables:
    
var0) ;

var0 XAverage(XAverage(RSI(OBVLength), Smoothing), Smoothing) - 50;

Plot1var0"AboveRising" );
Plot2var0"AboveFalling" );
Plot3var0"BelowRising" );
Plot4var0"BelowFalling" );
Plot5var0"OBV"iff(var0>0iff(var0>var0[1], GetPlotColor(1), GetPlotColor(2)), iff(var0>var0[1], GetPlotColor(3), GetPlotColor(4))) );
Plot60"Zero" ); 
Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Attached Files
Elite Membership required to download: BMT OBV.pla
Follow me on X Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Prop Firm Tracked Payouts Hit $115M in Q1 but Growth Fla …
Funded Trading Evaluation Firms
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
April Jobs Beat Flips Fed Hike Odds Past 52% for First T …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
6 thanks
30 Sessions
5 thanks
MES Trader Journal & Market Structure Discussion
4 thanks
Mahas First Journal
2 thanks
Extending webinars availability: Flash Webinar Conversio …
2 thanks
  #3 (permalink)
 phyzfer 
Chicago
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-FIre
Trading: GC, ES
Posts: 73 since Mar 2010
Thanks Given: 40
Thanks Received: 33


Nice!! Is there an ninja-version of this?


Reply With Quote
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,574


phyzfer View Post
Nice!! Is there an ninja-version of this?

Yeah I wrote a couple for NT a while back, Elite only:




The first one is pretty similar to what I've written here for EasyLanguage, but it adds a simple calc for divergence. The second one is quite a bit different.

If you have any questions regarding them, please use those threads (not this one). This one is for the EasyLanguage version.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #5 (permalink)
 
vast's Avatar
 vast 
Australia
 
Experience: Intermediate
Platform: Ninja
Posts: 167 since Jun 2009
Thanks Given: 154
Thanks Received: 62

Mike
Are you using a simple EMA for the OBV? The EL is XAverage?
Also, are you using a period of 3 and smooth of 3? I tried this on a NT version and looked quite different.
Thanks for a great video
Regards


Reply With Quote
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,574


vast View Post
Mike
Are you using a simple EMA for the OBV? The EL is XAverage?
Also, are you using a period of 3 and smooth of 3? I tried this on a NT version and looked quite different.
Thanks for a great video
Regards

XAverage = EMA.

Check the OBV code itself, I think that is where the difference lies between MC and NT.

Function: OBV

 
Code
                            
if BarType >= 2 then                              
    begin
    
if Close Close[1then 
        OBV 
OBV[1] + Volume 
    
else if Close Close[1then 
        OBV 
OBV[1] - Volume 
    
else 
        
OBV OBV[1] ;
    
end
else                                                                              
                                                                                 
    
begin
    
if Close Close[1then 
        OBV 
OBV[1] + Ticks 
    
else if Close Close[1then 
        OBV 
OBV[1] - Ticks 
    
else 
        
OBV OBV[1] ;
    
end 
Definition of "BarType":
 
Code
BarType
Returns a numerical value, indicating the resolution units of the data series that the study is applied to. 
 



Usage
BarType 

The following values are returned for each type of resolution units: 

  0 – Ticks (Ticks & Contracts)
  1 – Intra-Day (Seconds, Minutes, & Hours)
  2 – Days
  3 – Weeks
  4 – Months, Quarters, & Years
  5 – Points & Changes 
 



Example
Assign a value, indicating the resolution units of the data series that the study is applied to, to Value1 variable: 

Value1=BarType;
Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #7 (permalink)
jfan98
Monterey Park
 
Posts: 1 since Aug 2010
Thanks Given: 0
Thanks Received: 0

Nice, but can you add an OBV average line on the OBV chart?


Reply With Quote
  #8 (permalink)
 Supio 
vancouver bc canada
 
Experience: Intermediate
Platform: Multicharts
Trading: oil, gold, currency futures
Posts: 8 since Mar 2012
Thanks Given: 0
Thanks Received: 3

This is a slightly modified version of BM_OBV which works with Renko & line break charts.


Attached Files
Elite Membership required to download: BMT_OBV.pla
Reply With Quote
  #9 (permalink)
 Supio 
vancouver bc canada
 
Experience: Intermediate
Platform: Multicharts
Trading: oil, gold, currency futures
Posts: 8 since Mar 2012
Thanks Given: 0
Thanks Received: 3

This is a slightly modified version of BM_OBV which works with Renko & line break charts.

PS: I just realized MC adapted their volume indicators to work with all types of tick charts with MC v8 RC which makes my modification unneccessary if you are using MC v8 RC and above but the mod is still useful for MC v8 beta2 and below.


Attached Files
Elite Membership required to download: BMT_OBV.pla
Reply With Quote
  #10 (permalink)
kabas1
memphis tn usa
 
Posts: 1 since Jun 2012
Thanks Given: 0
Thanks Received: 0


Hello Big Mike
Is there any way to convert or re-right this code for obv indicator for trade station.

thanks
Kelly


Reply With Quote




Last Updated on November 1, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts