log in     sign up for free
 
I turned from a loser to a winner when I was able to separate my ego needs from making money. When I was able to accept being wrong. Before that, admitting I was wrong was more upsetting than losing the money.
Marty Schwartz
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

OBVDI w/ Avg

Formula for: TradeStation

indicator


 

 

Views:  1457

Added: July 17, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 
Your Ad Here
Phillip Holt's technique for testing the on-balance volume disparity indicator (OBVDI) and the negative volume disparity indicator (NVDI) against the NYSE Composite Index also seems to show promise for commodities. Looking at currencies, I found that with a little manipulation of the parameters and using a decent money management stop, the performance results were well above average. Following are both the OBVDI and the NVDI as user functions. A word of caution: Be sure to set the properties of the user functions to "series."


Type: User-Function, Name: OBVDI

Inputs: Length(Numeric);
Vars: BollTop(0), BollBot(0), PerB(0), OBVBollTop(0), OBVBollBot(0), OBVPerB(0);

BollTop=BollingerBand(Close,Length,2);
BollBot=BollingerBand(Close,Length,-2);
If (BollTop-BollBot)<>0 then PerB=(Close-BollBot)/(BollTop-BollBot);

OBVBollTop=BollingerBand(OBV,Length,2);
OBVBollBot=BollingerBand(OBV,Length,-2);
If (OBVBollTop-OBVBollBot)<>0 then OBVPerB=(OBV-OBVBollBot)/(OBVBollTop-OBVBollBot);
OBVDI=(1+PerB)/(1+OBVPerB);





Type: User-Function, Name: NVDI

Inputs: Length(Numeric);
Vars: BollTop(0), BollBot(0), PerB(0), NegVBollTop(0), NegVBollBot(0), NegVPerB(0), NegV(0);

If Currentbar=1 then NegV=100;
BollTop=BollingerBand(Close,Length,2);
BollBot=BollingerBand(Close,Length,-2);
If (BollTop-BollBot)<>0 then
PerB=(Close-BollBot)/(BollTop-BollBot);
NegV=IFF(Volume
NegVBollTop=BollingerBand(NegV,Length,2);
NegVBollBot=BollingerBand(NegV,Length,-2);
If (NegVBollTop-NegVBollBot)<>0 then
NegVPerB=(NegV-NegVBollBot)/(NegVBollTop-NegVBollBot);

NVDI=(1+PerB)/(1+NegVPerB);




To duplicate the OBVDI used in Holt's article, use the Plot function to plot the indicator and then the average of that indicator:



Type: Indicator, Name: OBVDI w/ Avg

Plot1( OBVDI(33),"OBVDI");
Plot2( Average(OBVDI(33),4),"AvgOBVDI");






All of this code will be made available on both the Omega Research area of America OnLine and at our Web site at http: //www.omegaresearch.com.
-- Miles Dunbar, Easy Language Specialist, Omega Research

 

 



Code:

Type: User-Function, Name: OBVDI

Inputs: Length(Numeric);
Vars: BollTop(0), BollBot(0), PerB(0), OBVBollTop(0), OBVBollBot(0), OBVPerB(0);

BollTop=BollingerBand(Close,Length,2);
BollBot=BollingerBand(Close,Length,-2);
If (BollTop-BollBot)<>0 then PerB=(Close-BollBot)/(BollTop-BollBot);

OBVBollTop=BollingerBand(OBV,Length,2);
OBVBollBot=BollingerBand(OBV,Length,-2);
If (OBVBollTop-OBVBollBot)<>0 then OBVPerB=(OBV-OBVBollBot)/(OBVBollTop-OBVBollBot);
OBVDI=(1+PerB)/(1+OBVPerB);





Type: User-Function, Name: NVDI

Inputs: Length(Numeric);
Vars: BollTop(0), BollBot(0), PerB(0), NegVBollTop(0), NegVBollBot(0), NegVPerB(0), NegV(0);

If Currentbar=1 then NegV=100;
BollTop=BollingerBand(Close,Length,2);
BollBot=BollingerBand(Close,Length,-2);
If (BollTop-BollBot)<>0 then
PerB=(Close-BollBot)/(BollTop-BollBot);
NegV=IFF(Volume
NegVBollTop=BollingerBand(NegV,Length,2);
NegVBollBot=BollingerBand(NegV,Length,-2);
If (NegVBollTop-NegVBollBot)<>0 then
NegVPerB=(NegV-NegVBollBot)/(NegVBollTop-NegVBollBot);

NVDI=(1+PerB)/(1+NegVPerB);





Type: Indicator, Name: OBVDI w/ Avg

Plot1( OBVDI(33),"OBVDI");
Plot2( Average(OBVDI(33),4),"AvgOBVDI");



 






Author: Phillip Holt
Source: http://www.traders.com

 

View similar (indicator for TradeStation):

Distance Coefficient Ehlers Filter
DBS-Where
Rainbow Charts
Close From One Day To The Next
## Top & Bottom Indicator
Recursive Moving Trendline Indicator
Optimal Tracking Filter
Dunn's Density Indicator II
Tether Line
Moving Average of Volume
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012