PINE LIBRARY
업데이트됨

VolumeProfile

339
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)
릴리즈 노트
v2:
- update session high/low while reading new data

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.