PINE LIBRARY
업데이트됨 lib_priceaction

Library "lib_priceaction"
a library for everything related to price action, starting off with displacements
displacement(len, min_strength, o, c)
calculate if there is a displacement and how strong it is
Parameters:
len (int): The amount of candles to consider for the deviation
min_strength (float): The minimum displacement strength to trigger a signal
o (float): The source series on which calculations are based
c (float): The source series on which calculations are based
Returns: a tuple of (bool signal, float displacement_strength)
a library for everything related to price action, starting off with displacements
displacement(len, min_strength, o, c)
calculate if there is a displacement and how strong it is
Parameters:
len (int): The amount of candles to consider for the deviation
min_strength (float): The minimum displacement strength to trigger a signal
o (float): The source series on which calculations are based
c (float): The source series on which calculations are based
Returns: a tuple of (bool signal, float displacement_strength)
릴리즈 노트
v2 tweaked formulaUpdated:
displacement(len, min_strength, o, c)
calculate if there is a displacement and how strong it is
Parameters:
len (int): The amount of candles to consider for the deviation
min_strength (float): The minimum displacement strength to trigger a signal
o (float): The source series on which calculations are based
c (float): The source series on which calculations are based
Returns: a tuple of (bool signal, float displacement_strength)
릴리즈 노트
v3, removed rounding릴리즈 노트
v4릴리즈 노트
v5 added functions to calculate retracement ratio AND target price for given ratioAdded:
retracement_ratio(price_start, price_end, price_retracement)
calculate a ratio how far a price has retraced compared to a move between two reference levels
Parameters:
price_start (float): The start price level of the reference move
price_end (float): The end price level of the reference move
price_retracement (float): The retraced price level
Returns: the retracement ratio (float, always positive) or na if one of the inputs was na
target_ratio_price(price_start, price_end, target_ratio)
calculate a ratio how far a price has retraced compared to a move between two reference levels
Parameters:
price_start (float): The start price level of the reference move
price_end (float): The end price level of the reference move
target_ratio (float): The target retracement ratio (must be positive)
Returns: the retracement target ratio price level (float) or na if one of the inputs was na
릴리즈 노트
v6Added:
in_range(x, a, b)
check if a price is in a certain range, e.g. to check if price reached a target zone
Parameters:
x (float): the price variable
a (float): one range limit (sign agnostic)
b (float): other range limit (sign agnostic)
Returns: true if x is between a and b (inclusive)
range_overlap(a1, b1, a2, b2)
check if two price ranges overlap, e.g. to check if a target is price is possible that fits both target zones
Parameters:
a1 (float): one limit of range 1
b1 (float): other limit of range 1
a2 (float): one limit of range 2
b2 (float): other limit of range 2
Returns: true if x is between a and b (inclusive
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
파인 라이브러리
진정한 트레이딩뷰 정신에 따라 작성자는 이 파인 코드를 오픈 소스 라이브러리로 공개하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 건배! 이 라이브러리는 개인적으로 또는 다른 오픈 소스 출판물에서 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰의 적용을 받습니다.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.