PINE LIBRARY

Tools

Aggiornato
Library "Tools"
Common tools

movingAverage(maType, maSource, maLength)
  dynamically returns MA
  Parameters:
    maType (string): ma type
    maSource (float): ma source
    maLength (simple int): ma length
  Returns: ta.{sma,rma,ema,wma,vwma,hma}
Note di rilascio
v2

Added:
isFracHighBW(srcHigh)
  Returns bool regarding candle[2] can be marked as BW High Fractal
  Parameters:
    srcHigh (float): float[] Series source for high fractal marking. Default: high
  Returns: boolean

isFracLowBW(srcLow)
  Returns bool regarding candle[2] can be marked as BW Low Fractal
  Parameters:
    srcLow (float): float[] Series source for low fractal marking. Default: low
  Returns: boolean

getFracMarkBW(isHighMark, isLowMark, lastHigh, lastLow, srcHigh, srcLow)
  Returns int between -2 and 2. 2: HH, 1: LH, 0: No condition met, -1: HL, -2: LL
  Parameters:
    isHighMark (bool): bool Is candle[2] marked as high
    isLowMark (bool): bool Is candle[2] marked as low
    lastHigh (float): float Last value of high mark
    lastLow (float): float Last value of low mark
    srcHigh (float): float[] Series source for high fractal marking. Default: high
    srcLow (float): float[] Series source for low fractal marking. Default: low
  Returns: int -2, -1, 0, 1, 2

PosInfo
  PosInfo - Position info object
  Fields:
    isBuy (series bool): bool Is position buy
    entry (series float): float Entry price
    index (series int): int Entry bar index
    lastTP (series float): float Last take profit price
    lastRE (series float): float Last re-entry price

Updated:
movingAverage(maType, maSource, maLength)
  Dynamically returns desired moving average type
  Parameters:
    maType (string): string Moving average type
    maSource (float): float[] Source series for moving average
    maLength (simple int): int Length for moving average
  Returns: float[] ta.{sma,rma,ema,wma,vwma,hma}
Note di rilascio
v3

Updated:
PosInfo
  PosInfo - Position info object
  Fields:
    isBuy (series bool): bool Is position buy
    entry (series float): float Entry price
    index (series int): int Entry bar index. Default: bar_index
    lastTP (series float): float Last take profit price. Default: 0
    lastRE (series float): float Last re-entry price. Default: 0
formattingfunctionslibrarymoving_averagetools

Libreria Pine

In pieno spirito TradingView, l'autore ha pubblicato questo codice Pine come libreria open-source in modo che altri programmatori Pine della nostra comunità possano riutilizzarlo. Un saluto all'autore! È possibile utilizzare questa libreria privatamente o in altre pubblicazioni open-source, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento.


Anche su:

Declinazione di responsabilità