PINE LIBRARY
Zaktualizowano

DivergenceDetector

190
Library "DivergenceDetector"

f_detect_divergence_high(price, osc, pivotLeft, pivotRight)
  Detects bearish and hidden bearish divergences from pivot highs.
  Parameters:
    price (float): Price series.
    osc (float): Oscillator series.
    pivotLeft (int): Left bars for pivot detection.
    pivotRight (int): Right bars for pivot detection.
  Returns: Tuple [divType, currentBar, currentPrice, prevBar, prevPrice].

f_detect_divergence_low(price, osc, pivotLeft, pivotRight)
  Detects bullish and hidden bullish divergences from pivot lows.
  Parameters:
    price (float): Price series.
    osc (float): Oscillator series.
    pivotLeft (int): Left bars for pivot detection.
    pivotRight (int): Right bars for pivot detection.
  Returns: Tuple [divType, currentBar, currentPrice, prevBar, prevPrice].
Informacje o Wersji
v2

更新:
f_detect_divergence_high(price, osc, pivotLeft, pivotRight)
  価格のピボットハイを基準に、ベアリッシュ・ダイバージェンスを検出します。
  Parameters:
    price (float): 価格シリーズ。
    osc (float): オシレーターシリーズ(MACD, QQE, RCIなど)。
    pivotLeft (int): 左側のバー数。
    pivotRight (int): 右側のバー数。
  Returns: タプル [divType, currentBar, currentPrice, prevBar, prevPrice]

f_detect_divergence_low(price, osc, pivotLeft, pivotRight)
  価格のピボットローを基準に、ブル・ダイバージェンスを検出します。
  Parameters:
    price (float)
    osc (float)
    pivotLeft (int)
    pivotRight (int)
Informacje o Wersji
v3

更新:
f_detect_divergence_low(price, osc, pivotLeft, pivotRight)
  価格のピボットローを基準に、ブル・ダイバージェンスを検出します。
  Parameters:
    price (float): 価格シリーズ。
    osc (float): オシレーターシリーズ(MACD, QQE, RCIなど)。
    pivotLeft (int): 左側のバー数。
    pivotRight (int): 右側のバー数。
  Returns: タプル [divType, currentBar, currentPrice, prevBar, prevPrice]
Informacje o Wersji
v4

追加:
f_rci(src, length)
  ソースと期間を指定してRCI(順位相関指数)を計算します。
  Parameters:
    src (float): 計算対象のソースシリーズ(close, high, hl2など)。
    length (int): 計算期間(バー数)。
  Returns: 計算されたRCIの値。期間が0以下の場合はnaを返します。

更新:
f_detect_divergence_high(price, osc, pivotLeft, pivotRight)
  価格のピボットハイを基準に、ベアリッシュ・ダイバージェンスを検出します。
  Parameters:
    price (float)
    osc (float)
    pivotLeft (int)
    pivotRight (int)

f_detect_divergence_low(price, osc, pivotLeft, pivotRight)
  価格のピボットローを基準に、ブル・ダイバージェンスを検出します。
  Parameters:
    price (float)
    osc (float)
    pivotLeft (int)
    pivotRight (int)
Informacje o Wersji
v5

追加:
f_ma(source, length, maType)
  移動平均線(MA)を指定された種類で計算します。
  Parameters:
    source (float): 計算対象のソース
    length (simple int): 計算期間
    maType (simple string): MAの種類 ('SMA', 'EMA', 'SMMA (RMA)', 'WMA', 'VWMA')
  Returns: 計算された移動平均値

f_draw_poly(pts, val, p_ref, col, w, sty, max_drawings)
  Polyline(連続線)の座標追加、古い履歴の削除、再描画を一括で行います。
  Parameters:
    pts (array<chart.point>): 座標を格納するchart.point配列
    val (float): 追加するY座標(価格・オシレーター値など)
    p_ref (polyline): 削除対象となる直前のpolylineオブジェクト
    col (color): 線の色
    w (int): 線の太さ
    sty (string): 線のスタイル
    max_drawings (int): 配列に保持する最大ポイント数
  Returns: 新しく描画されたpolylineオブジェクト

f_clean_labels(lbl_arr, max_drawings)
  X座標を基準に、指定期間より古いラベル(Label)を一斉削除します。
  Parameters:
    lbl_arr (array<label>): 管理しているlabel配列
    max_drawings (int): 保持する過去の期間(足数)

f_clean_lines(line_arr, max_drawings)
  X座標(終了点)を基準に、指定期間より古いライン(Line)を一斉削除します。
  Parameters:
    line_arr (array<line>): 管理しているline配列
    max_drawings (int): 保持する過去の期間(足数)

f_clean_boxes(box_arr, max_drawings)
  X座標(左端)を基準に、指定期間より古いボックス(Box)を一斉削除します。
  Parameters:
    box_arr (array<box>): 管理しているbox配列
    max_drawings (int): 保持する過去の期間(足数)

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.