PINE LIBRARY

VolumeProfile

Library "VolumeProfile"
Analyzes volume and price and calculates a volume profile, in particular the Point Of Control and Value Area values.

new(rowSizeInTicks, valueAreaCoverage, startTime)
  Constructor method that creates a new Volume Profile
  Parameters:
    rowSizeInTicks (float): Internal row size (aka resolution) of the volume profile. Useful for most futures contracts would be '1 / syminfo.mintick'. Default '4'.
    valueAreaCoverage (int): Percentage of total volume that is considered the Value Area. Default '70'
    startTime (int): Start time (unix timestamp in milliseconds) of the Volume Profile. Default 'time'.
  Returns: VolumeProfile object

method calculatePOC(vp)
  Calculates current Point Of Control of the VP
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
  Returns: void

method calculateVA(vp)
  Calculates current Value Area High and Low of the VP
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
  Returns: void

method update(vp, h, l, v, t)
  Processes new chart data and sorts volume into rows. Then calls calculatePOC() and calculateVA() to update the VP. Parameters are usually the output of request.security_lower_tf.
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
    h (array<float>): Array of highs
    l (array<float>): Array of lows
    v (array<float>): Array of volumes
    t (array<int>): Array of candle times
  Returns: void

method setSessionHigh(vp, h)
  Sets the high of the session the VP is tracking
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
    h (float)
  Returns: void

method setSessionLow(vp, l)
  Sets the low of the session the VP is tracking
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
    l (float)
  Returns: void

method getPOC(vp)
  Gets the current Point Of Control
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
  Returns: Point Of Control (float)

method getVAH(vp)
  Gets the current Value Area High
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
  Returns: Value Area High (float)

method getVAL(vp)
  Gets the current Value Area Low
  Namespace types: VolumeProfile
  Parameters:
    vp (VolumeProfile)
  Returns: Value Area Low (float)

VolumeProfile
  Fields:
    rowSizeInTicks (series float)
    valueAreaCoverage (series int)
    startTime (series int)
    valueAreaHigh (series float)
    pointOfControl (series float)
    valueAreaLow (series float)
    sessionHigh (series float)
    sessionLow (series float)
    volumeByRow (map<float, float>)
    totalVolume (series float)
    pocRow (series float)
    pocVol (series float)

Clause de non-responsabilité