Conditional Accumulator
Conditional Accumulator, by Omega Research 1996, accumulates a valve based on a condition. The user may change the condition, increment and start value. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using Conditional Accumulator
No trading signals are given.
How To Access in MotiveWave
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.
Calculation
//condition = default is (low moreThan prevHigh)
//increment = user defined, default is 1
//startValue = user defined, default is 0
//index = current bar number, LOE = less or equal
endIndex = getEndIndex() -1; value = startValue; for (i = 1; i LOE endIndex; i++) if (trendUp) prevHigh = high[i - 1]; low = low[i]; if (low moreOr= prevHigh) value = value + increment; else prevLow = low[i - 1]; high= high[i]; if (high lessOr= prevLow) value = value - increment; endIf Plot: value; endFor