Divergent Bars by Bill Williams, is a overlay displaying up and down arrows on certain price bars. Divergent Bars (Bullish-green; the current bar must have lower low than previous bar AND current bar must close in the upper half) (Bearish-red; The current bar must have a higher high than previous bar AND current bar must close in the lower half). This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using Divergent Bars
Buy signals are generated if the current low is less than the pervious low and the close is more than the midpoint price. Sell signals are generated if the current high is more than the pervious high and the close is less than the midpoint price.
How To Access in MotiveWave
Go to the top menu, choose Study>Bill Williams>Divergent Bars
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
//currentAverage = midpoint = (high+low)/2previous
//prev = previous
//LT = lessThan, index = current bar number
//MT = moreThan
prevLow = Low[index-1]); prevHigh = High[index-1]; currentAverage = (High + Low) / 2; //Signals buy = (Low LT prevLow AND Close MT currentAverage); sell = (High MT prevHigh AND Close LT currentAverage);