[pshaiCmd] Volume Adjusted Moving Average (VAMA)

2 80 Views 1 Comment 1 month ago
  • Volume Adjusted Moving Average

    “Time-based moving averages make the assumption that all trading days are equal. Important trading days are usually associated with heavier volume. VAMA makes price and volume equal partners when computing the average. Higher volume trading days are more heavily weighted than lower volume days.”

    This command is also optimized, meaning, that after the very first call of this command it only calculates the latest value.
    NOTE: With CC_HighSpeedPrices the results might not be what was expected!

    Usage:

    
    local c = ClosePrices()
    local v = GetVolume()
    
    local vama1 = CC_VAMA(c, v, 14, 0.67)
    local vama2 = CC_VAMA(c, v, 55, 0.67)
    
    Plot(0, 'vama1', vama1, Cyan)
    Plot(0, 'vama2', vama2, {c = Orange, w = 3})
    

    ~pshai

    HaasScript Code
    Sign in or Register to download for free
    • #2773
      Skywalker
      Basic
      Up
      1
      Down
      ::

      Amazing Pshai! Thanks so much for making this happen!

Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free