PINE LIBRARY
TrendDetectorLib

Library "TrendDetector_Lib"
method formatTF(timeframe)
Namespace types: series string, simple string, input string, const string
Parameters:
timeframe (string): (string) The timeframe to convert (e.g., "15", "60", "240").
Returns: (string) The formatted timeframe (e.g., "15M", "1H", "4H").
f_ma(type, src, len)
Computes a Moving Average value based on type and length.
Parameters:
type (simple string): (string) One of: "SMA", "EMA", "RMA", "WMA", "VWMA".
src (float): (series float) Source series for MA (e.g., close).
len (simple int): (simple int) Length of the MA.
Returns: (float) The computed MA series.
render(tbl, trendDetectorSwitch, frameColor, frameWidth, borderColor, borderWidth, textColor, ma1ShowTrendData, ma1Timeframe, ma1Value, ma2ShowTrendData, ma2Timeframe, ma2Value, ma3ShowTrendData, ma3Timeframe, ma3Value)
Fills the provided table with Trend Detector contents.
DesC This renderer does NOT plot and does NOT create tables; call from indicator after your table exists.
Parameters:
tbl (table): (table) Existing table to render into.
trendDetectorSwitch (bool): (bool) Master toggle to draw the table content.
frameColor (color): (color) Table frame color.
frameWidth (int): (int) Table frame width (0–5).
borderColor (color): (color) Table border color.
borderWidth (int): (int) Table border width (0–5).
textColor (color): (color) Table text color.
ma1ShowTrendData (bool): (bool) Show MA #1 in table.
ma1Timeframe (simple string): (string) MA #1 timeframe.
ma1Value (float)
ma2ShowTrendData (bool): (bool) Show MA #2 in table.
ma2Timeframe (simple string): (string) MA #2 timeframe.
ma2Value (float)
ma3ShowTrendData (bool): (bool) Show MA #3 in table.
ma3Timeframe (simple string): (string) MA #3 timeframe.
ma3Value (float)
method formatTF(timeframe)
Namespace types: series string, simple string, input string, const string
Parameters:
timeframe (string): (string) The timeframe to convert (e.g., "15", "60", "240").
Returns: (string) The formatted timeframe (e.g., "15M", "1H", "4H").
f_ma(type, src, len)
Computes a Moving Average value based on type and length.
Parameters:
type (simple string): (string) One of: "SMA", "EMA", "RMA", "WMA", "VWMA".
src (float): (series float) Source series for MA (e.g., close).
len (simple int): (simple int) Length of the MA.
Returns: (float) The computed MA series.
render(tbl, trendDetectorSwitch, frameColor, frameWidth, borderColor, borderWidth, textColor, ma1ShowTrendData, ma1Timeframe, ma1Value, ma2ShowTrendData, ma2Timeframe, ma2Value, ma3ShowTrendData, ma3Timeframe, ma3Value)
Fills the provided table with Trend Detector contents.
DesC This renderer does NOT plot and does NOT create tables; call from indicator after your table exists.
Parameters:
tbl (table): (table) Existing table to render into.
trendDetectorSwitch (bool): (bool) Master toggle to draw the table content.
frameColor (color): (color) Table frame color.
frameWidth (int): (int) Table frame width (0–5).
borderColor (color): (color) Table border color.
borderWidth (int): (int) Table border width (0–5).
textColor (color): (color) Table text color.
ma1ShowTrendData (bool): (bool) Show MA #1 in table.
ma1Timeframe (simple string): (string) MA #1 timeframe.
ma1Value (float)
ma2ShowTrendData (bool): (bool) Show MA #2 in table.
ma2Timeframe (simple string): (string) MA #2 timeframe.
ma2Value (float)
ma3ShowTrendData (bool): (bool) Show MA #3 in table.
ma3Timeframe (simple string): (string) MA #3 timeframe.
ma3Value (float)
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
파인 라이브러리
트레이딩뷰의 진정한 정신에 따라, 작성자는 이 파인 코드를 오픈소스 라이브러리로 게시하여 커뮤니티의 다른 파인 프로그래머들이 재사용할 수 있도록 했습니다. 작성자에게 경의를 표합니다! 이 라이브러리는 개인적으로 사용하거나 다른 오픈소스 게시물에서 사용할 수 있지만, 이 코드의 게시물 내 재사용은 하우스 룰에 따라 규제됩니다.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.