編輯精選PINE LIBRARY

HTFCandlesLib

Library "HTFCandlesLib"
Library to get detailed higher timeframe candle information

method tostring(this, delimeter)
  Returns OHLC values, BarIndex of higher and lower timeframe candles in string format
  Namespace types: Candle
  Parameters:
    this (Candle): Current Candle object
    delimeter (string): delimeter to join the string components of the candle
  Returns: String representation of the Candle

method draw(this, bullishColor, bearishColor, printDescription)
  Draws the current candle using boxes and lines for body and wicks
  Namespace types: Candle
  Parameters:
    this (Candle): Current Candle object
    bullishColor (color): color for bullish representation
    bearishColor (color): color for bearish representation
    printDescription (bool): if set to true prints the description
  Returns: Current candle object

getCurrentCandle(ltfCandles)
  Gets the current candle along with reassigned ltf components. To be used with request.security to capture higher timeframe candle data
  Parameters:
    ltfCandles (array<Candle>): Lower timeframe Candles array
  Returns: Candle object with embedded lower timeframe key candles in them

Candle
  Candle represents the data related to a candle
  Fields:
    o (series float): Open price of the candle
    h (series float): High price of the candle
    l (series float): Low price of the candle
    c (series float): Close price of the candle
    lo (Candle): Lower timeframe candle that records the open price of the current candle.
    lh (Candle): Lower timeframe candle that records the high price of the current candle.
    ll (Candle): Lower timeframe candle that records the low price of the current candle.
    lc (Candle): Lower timeframe candle that records the close price of the current candle.
    barindex (series int): Bar Index of the candle
    bartime (series int): Bar time of the candle
    last (Candle): Link to last candle of the series if any
arrays

Pine腳本庫

在真正的TradingView精神中,作者將這段Pine程式碼發佈為開源程式庫,以便我們社群的其他Pine程式設計師可以重複使用它。請向作者致敬!您可以私下使用這個函式庫,或在其他開源出版品中使用,但在出版物中再次使用這段程式碼將受到網站規則的約束。

免責聲明