PINE LIBRARY
업데이트됨 SessionVolumeProfile

Library "SessionVolumeProfile"
Analyzes price & volume during regular trading hours to provide a session volume profile analysis. The primary goal of this library is to provide the developer with three values: the value area high, low and the point of control. The library also provides methods for rendering the value areas and histograms. To learn more about this library and how you can use it, click on the website link in my profile where you will find a blog post with detailed information.
debug(vp, position)
Helper function to write some information about the supplied SVP object to the screen in a table.
Parameters:
vp (Object): The SVP object to debug
position (string): The position.* to place the table. Defaults to position.bottom_center
getLowerTimeframe()
Depending on the timeframe of the chart, determines a lower timeframe to grab volume data from for the analysis
Returns: The timeframe string to fetch volume for
get(volumeProfile, lowerTimeframeHigh, lowerTimeframeLow, lowerTimeframeVolume)
Populated the provided SessionVolumeProfile object with vp data on the session.
Parameters:
volumeProfile (Object): The SessionVolumeProfile object to populate
lowerTimeframeHigh (float[]): The lower timeframe high values
lowerTimeframeLow (float[]): The lower timeframe low values
lowerTimeframeVolume (float[]): The lower timeframe volume values
drawPriorValueAreas(todaySessionVolumeProfile, extendYesterdayOverToday, showLabels, labelSize, pocColor, pocStyle, pocWidth, vahlColor, vahlStyle, vahlWidth, vaColor)
Given a SessionVolumeProfile Object, will render the historical value areas for that object.
Parameters:
todaySessionVolumeProfile (Object): The SessionVolumeProfile Object to draw
extendYesterdayOverToday (bool): Defaults to true
showLabels (bool): Defaults to true
labelSize (string): Defaults to size.small
pocColor (color): Defaults to #e500a4
pocStyle (string): Defaults to line.style_solid
pocWidth (int): Defaults to 1
vahlColor (color): The color of the value area high/low lines. Defaults to #1592e6
vahlStyle (string): The style of the value area high/low lines. Defaults to line.style_solid
vahlWidth (int): The width of the value area high/low lines. Defaults to 1
vaColor (color): The color of the value area background. Defaults to #00bbf911)
drawHistogram(volumeProfile, bgColor, showVolumeOnHistogram)
Given a SessionVolumeProfile object, will render the histogram for that object.
Parameters:
volumeProfile (Object): The SessionVolumeProfile object to draw
bgColor (color): The baseline color to use for the histogram. Defaults to #00bbf9
showVolumeOnHistogram (bool): Show the volume amount on the histogram bars. Defaults to false.
Object
Fields:
numberOfRows (series__integer)
valueAreaCoverage (series__integer)
trackDevelopingVa (series__bool)
valueAreaHigh (series__float)
pointOfControl (series__float)
valueAreaLow (series__float)
startTime (series__integer)
endTime (series__integer)
dayHigh (series__float)
dayLow (series__float)
step (series__float)
pointOfControlLevel (series__integer)
valueAreaHighLevel (series__integer)
valueAreaLowLevel (series__integer)
volumeRows (array__float)
priceLevelRows (array__float)
ltfSessionHighs (array__float)
ltfSessionLows (array__float)
ltfSessionVols (array__float)
Analyzes price & volume during regular trading hours to provide a session volume profile analysis. The primary goal of this library is to provide the developer with three values: the value area high, low and the point of control. The library also provides methods for rendering the value areas and histograms. To learn more about this library and how you can use it, click on the website link in my profile where you will find a blog post with detailed information.
debug(vp, position)
Helper function to write some information about the supplied SVP object to the screen in a table.
Parameters:
vp (Object): The SVP object to debug
position (string): The position.* to place the table. Defaults to position.bottom_center
getLowerTimeframe()
Depending on the timeframe of the chart, determines a lower timeframe to grab volume data from for the analysis
Returns: The timeframe string to fetch volume for
get(volumeProfile, lowerTimeframeHigh, lowerTimeframeLow, lowerTimeframeVolume)
Populated the provided SessionVolumeProfile object with vp data on the session.
Parameters:
volumeProfile (Object): The SessionVolumeProfile object to populate
lowerTimeframeHigh (float[]): The lower timeframe high values
lowerTimeframeLow (float[]): The lower timeframe low values
lowerTimeframeVolume (float[]): The lower timeframe volume values
drawPriorValueAreas(todaySessionVolumeProfile, extendYesterdayOverToday, showLabels, labelSize, pocColor, pocStyle, pocWidth, vahlColor, vahlStyle, vahlWidth, vaColor)
Given a SessionVolumeProfile Object, will render the historical value areas for that object.
Parameters:
todaySessionVolumeProfile (Object): The SessionVolumeProfile Object to draw
extendYesterdayOverToday (bool): Defaults to true
showLabels (bool): Defaults to true
labelSize (string): Defaults to size.small
pocColor (color): Defaults to #e500a4
pocStyle (string): Defaults to line.style_solid
pocWidth (int): Defaults to 1
vahlColor (color): The color of the value area high/low lines. Defaults to #1592e6
vahlStyle (string): The style of the value area high/low lines. Defaults to line.style_solid
vahlWidth (int): The width of the value area high/low lines. Defaults to 1
vaColor (color): The color of the value area background. Defaults to #00bbf911)
drawHistogram(volumeProfile, bgColor, showVolumeOnHistogram)
Given a SessionVolumeProfile object, will render the histogram for that object.
Parameters:
volumeProfile (Object): The SessionVolumeProfile object to draw
bgColor (color): The baseline color to use for the histogram. Defaults to #00bbf9
showVolumeOnHistogram (bool): Show the volume amount on the histogram bars. Defaults to false.
Object
Fields:
numberOfRows (series__integer)
valueAreaCoverage (series__integer)
trackDevelopingVa (series__bool)
valueAreaHigh (series__float)
pointOfControl (series__float)
valueAreaLow (series__float)
startTime (series__integer)
endTime (series__integer)
dayHigh (series__float)
dayLow (series__float)
step (series__float)
pointOfControlLevel (series__integer)
valueAreaHighLevel (series__integer)
valueAreaLowLevel (series__integer)
volumeRows (array__float)
priceLevelRows (array__float)
ltfSessionHighs (array__float)
ltfSessionLows (array__float)
ltfSessionVols (array__float)
릴리즈 노트
v2 Removed incorrect comments.릴리즈 노트
v3 Updated library to use the lower timeframe bars to determine the session. This makes the code work for futures.Updated:
get(volumeProfile, lowerTimeframeHigh, lowerTimeframeLow, lowerTimeframeVolume, lowerTimeframeTime, lowerTimeframeSessionIsMarket)
Populated the provided SessionVolumeProfile object with vp data on the session.
Parameters:
volumeProfile (Object): The SessionVolumeProfile object to populate
lowerTimeframeHigh (array<float>): The lower timeframe high values
lowerTimeframeLow (array<float>): The lower timeframe low values
lowerTimeframeVolume (array<float>): The lower timeframe volume values
lowerTimeframeTime (array<int>): The lower timeframe time values
lowerTimeframeSessionIsMarket (array<bool>): The lower timeframe session.ismarket values (that are futures-friendly)
릴리즈 노트
v4 Fixed a bug that wiped out the first bars on the session릴리즈 노트
v5 Small optimization moving away from arrays to maps.Updated:
Object
Fields:
numberOfRows (series int)
valueAreaCoverage (series int)
trackDevelopingVa (series bool)
valueAreaHigh (series float)
pointOfControl (series float)
valueAreaLow (series float)
startTime (series int)
endTime (series int)
dayHigh (series float)
dayLow (series float)
step (series float)
pointOfControlLevel (series int)
valueAreaHighLevel (series int)
valueAreaLowLevel (series int)
volumeRows (map<int, float>)
ltfSessionHighs (array<float>)
ltfSessionLows (array<float>)
ltfSessionVols (array<float>)
릴리즈 노트
v6 Fixed a bug that caused value areas to compute incorrectly when lower timeframes were missing data (ie. symbols moving on lower volume, missing candles)릴리즈 노트
v7 Fixed a bug where the hourly charts were missing data between market open and the first round hour. 릴리즈 노트
v8 Previous release introduced a bug where the library failed to return values with extended hours turned off on the chart. This release fixes that bug.릴리즈 노트
v9 Updated library to use updated Session library, which includes a fix for TradingView's bug where session.ismarket returns true when in replay mode in non-market hours.릴리즈 노트
v10 Removed debugging code릴리즈 노트
v11 Fixed bugs related to crypto sessions in an underlying library.릴리즈 노트
v12 Upgraded library to get the latest fixes in the underlying Session library파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
I release TradingView indicators and libraries designed to make you a better trader. For detailed info about them, head over to improve.trading
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
I release TradingView indicators and libraries designed to make you a better trader. For detailed info about them, head over to improve.trading
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.