MetaStock™ Zone Tworzenie Sytemów Trader Shop Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 

OBVDI w/ Avg by Phillip Holt
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<Volume[1],NegV+((Close-Close[1])/Close[1])*100,NegV);

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");

 

t-i-OBVDI_w_Avg.gif
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

Source / From: TOP
http://www.traders.com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie niesie ze sob± ryzyko poważnych strat finansowych!