PINE LIBRARY
업데이트됨 TurntLibrary

Library "TurntLibrary"
Collection of functions created for simplification/easy referencing. Includes variations of moving averages, length value oscillators, and a few other simple functions based upon HH/LL values.
ma(source, length, type)
Apply a moving average to a float value
Parameters:
source: Value to be used
length: Number of bars to include in calculation
type: Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Smoothed value of initial float value
curve(src, len, lb1, lb2)
Exaggerates curves of a float value designed for use as an exit signal.
Parameters:
src: Initial value to curve
len: Number of bars to include in calculation
lb1: (Default = 1) First lookback length
lb2: (Default = 2) Second lookback length
Returns: Curved Average
fragma(src, len, space, str)
Average of a moving average and the previous value of the moving average
Parameters:
src: Initial float value to use
len: Number of bars to include in calculation
space: Lookback integer for second half of average
str: Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Fragmented Average
maxmin(x, y)
Difference of 2 float values, subtracting the lowest from the highest
Parameters:
x: Value 1
y: Value 2
Returns: The +Difference between 2 float values
oscLen(val, type)
Variable Length using a oscillator value and a corresponding slope shape ("Incline",Decline","Peak","Trough")
Parameters:
val: Oscillator Value to use
type: Slope of length curve ("Incline",Decline","Peak","Trough")
Returns: Variable Length Integer
hlAverage(val, smooth, max, min, type, include)
Average of HH,LL with variable lengths based on the slope shape ("Incline","Decline","Trough") value relative to highest and lowest
Parameters:
val: Source Value to use
smooth
max
min
type
include: Add "val" to the averaging process, instead of more weight to highest or lowest value
Returns: Variable Length Average of Highest Lowest "val"
pct(val)
Convert a positive float / price to a percentage of it's highest value on record
Parameters:
val: Value To convert to a percentage of it's highest value ever
Returns: Percentage
hlrange(x, len)
Difference between Highest High and Lowest Low of float value
Parameters:
x: Value to use in calculation
len: Number of bars to include in calculation
Returns: Difference
midpoint(x, len, smooth)
The average value of the float's Highest High and Lowest Low in a number of bars
Parameters:
x: Value to use in calculation
len
smooth: (Default=na) Optional smoothing type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Midpoint
Collection of functions created for simplification/easy referencing. Includes variations of moving averages, length value oscillators, and a few other simple functions based upon HH/LL values.
ma(source, length, type)
Apply a moving average to a float value
Parameters:
source: Value to be used
length: Number of bars to include in calculation
type: Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Smoothed value of initial float value
curve(src, len, lb1, lb2)
Exaggerates curves of a float value designed for use as an exit signal.
Parameters:
src: Initial value to curve
len: Number of bars to include in calculation
lb1: (Default = 1) First lookback length
lb2: (Default = 2) Second lookback length
Returns: Curved Average
fragma(src, len, space, str)
Average of a moving average and the previous value of the moving average
Parameters:
src: Initial float value to use
len: Number of bars to include in calculation
space: Lookback integer for second half of average
str: Moving average type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Fragmented Average
maxmin(x, y)
Difference of 2 float values, subtracting the lowest from the highest
Parameters:
x: Value 1
y: Value 2
Returns: The +Difference between 2 float values
oscLen(val, type)
Variable Length using a oscillator value and a corresponding slope shape ("Incline",Decline","Peak","Trough")
Parameters:
val: Oscillator Value to use
type: Slope of length curve ("Incline",Decline","Peak","Trough")
Returns: Variable Length Integer
hlAverage(val, smooth, max, min, type, include)
Average of HH,LL with variable lengths based on the slope shape ("Incline","Decline","Trough") value relative to highest and lowest
Parameters:
val: Source Value to use
smooth
max
min
type
include: Add "val" to the averaging process, instead of more weight to highest or lowest value
Returns: Variable Length Average of Highest Lowest "val"
pct(val)
Convert a positive float / price to a percentage of it's highest value on record
Parameters:
val: Value To convert to a percentage of it's highest value ever
Returns: Percentage
hlrange(x, len)
Difference between Highest High and Lowest Low of float value
Parameters:
x: Value to use in calculation
len: Number of bars to include in calculation
Returns: Difference
midpoint(x, len, smooth)
The average value of the float's Highest High and Lowest Low in a number of bars
Parameters:
x: Value to use in calculation
len
smooth: (Default=na) Optional smoothing type to use ("SMA","EMA","RMA","WMA","VWAP","SWMA","LRC")
Returns: Midpoint
릴리즈 노트
Fixed formatting, export 릴리즈 노트
v3Added:
geoma(src, length, offset, atr)
Geometric average of midpoint and value with an additional modifier
Parameters:
src: = Value to use in calculation
length: # of bars to include in calculation
offset: LRC offset
atr: ATR length to use
Returns: a Geometric Average of a modified Geometric Average
rsma(src, length, offset, up, dn)
Midpoint between Highest and Lowest using variable lookback
Parameters:
src: = Value to use in calculation
length: # of bars to include in calculation
offset: LRC offset
up: Slope of length curve to use ("Incline","Decline","Peak","Trough")
dn: Slope of length curve to use ("Incline","Decline","Peak","Trough")
Returns: Dynamic Relative Strength Average
yma(src, length, offset)
Midpoint using dynamic lengths with Incline/Decline Slopes
Parameters:
src: = Value to use in calculation
length: # of bars to include in calculation
offset: LRC offset
Returns: Incline Decline MA
xma(src, length, offset)
Midpoint using dynamic lengths with Peak Trough Slopes
Parameters:
src: = Value to use in calculation
length: # of bars to include in calculation
offset: LRC offset
Returns: Peak Trough MA
gma(src, length, mult, type)
Gravitational Moving Average, Adds weight to lowest highest or center point based upon the current value in relation to the highest/lowest values.
Parameters:
src: = Value to use in calculation
length: # of bars to include in calculation
mult
type
Returns: Gravitational MA
릴리즈 노트
v4 Fix Chart Image파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.