Professional Documents
Culture Documents
# Weis Wave
#
#Note: The Weis Wave indicator shows price waves associated with the Weis Wave
Volume lower indicator.
#Note: The reversalAmount: Indicate the minimum amount price must reverse before an
inflection point can be formed. This value should be set the same on the lower Weis
Wave Volume indicator.
declare upper;
rec upWaveVolume = if inflection == 1 and trend == 1 and close > open then volume
else if inflection == 1 and trend == 1 and close <= open then 0 else if trend == 1
or (inflection == 1 and trend == -1 and close >= open) then upWaveVolume[1] +
volume else 0;
rec downWaveVolume = if inflection == 1 and trend == -1 and close < open then
volume else if inflection == 1 and trend == -1 and close >= open then 0 else if
trend == -1 or (inflection == 1 and trend == 1 and close <= open) then
downWaveVolume[1] + volume else 0;
rec barsUp = if inflection == 1 and trend == 1 and close > open then 1 else if
inflection == 1 and trend == 1 and close <= open then 0 else if trend == 1 or
(inflection == 1 and trend == -1 and close >= open) then barsUp[1] + 1 else 0;
rec barsDown = if inflection == 1 and trend == -1 and close < open then 1 else if
inflection == 1 and trend == -1 and close >= open then 0 else if trend == -1 or
(inflection == 1 and trend == 1 and close <= open) then barsDown[1] + 1 else 0;