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 13,783 views
    2. thumb_up 18 thanks given
    3. group 8 followers
    1. forum 9 posts
    2. attach_file 3 attachments




 
Search this Thread

EasyLanguage OBV On Balance Volume Indicator

(login for full post details)
  #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
Posts: 50,232 since Jun 2009
Thanks Given: 33,103
Thanks Received: 101,344

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


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Attached Files
Register to download File Type: pla BMT OBV.pla (3.9 KB, 202 views)
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following 15 users say Thank You to Big Mike for this post:

Can you help answer these questions
from other members on NexusFi?
ISO Equity Curve Indicator
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
SPY ETF Question
Stocks and ETFs
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
IQFeed MBO data experience
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
GFIs1 1 DAX trade per day journal
28 thanks
Supertradersams Thread Journal on NQ/MNQ
27 thanks
Diary of a simple price action trader
17 thanks
Daytrading ES & NQ
14 thanks
Tao te Trade: way of the WLD
13 thanks

(login for full post details)
  #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
(login for full post details)
  #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
Posts: 50,232 since Jun 2009
Thanks Given: 33,103
Thanks Received: 101,344


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


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
(login for full post details)
  #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
(login for full post details)
  #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
Posts: 50,232 since Jun 2009
Thanks Given: 33,103
Thanks Received: 101,344


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


For the best trading education, watch our webinars
Searching for trading reviews? Review this list


Lifetime Elite Membership: Sign-up for only $149 USD
Receive exclusive offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following 3 users say Thank You to Big Mike for this post:
(login for full post details)
  #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
(login for full post details)
  #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
Register to download File Type: pla BMT_OBV.pla (6.3 KB, 31 views)
Reply With Quote
(login for full post details)
  #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
Register to download File Type: pla BMT_OBV.pla (6.6 KB, 39 views)
Reply With Quote
(login for full post details)
  #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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts