Fontiramisu

fontilab

Fontiramisu Telah dikemas kini   
Library "fontilab"
Provides function's indicators for pivot - trend - resistance.

pivots(src, lenght, isHigh) Detecting pivot points (and returning price + bar index.
  Parameters:
    src: The chart we analyse.
    lenght: Used for the calcul.
    isHigh: lookging for high if true, low otherwise.
  Returns: The bar index and the price of the pivot.

calcDevThreshold(tresholdMultiplier, closePrice) Calculate deviation threshold for identifying major swings.
  Parameters:
    tresholdMultiplier: Usefull to equilibrate the calculate.
    closePrice: Close price of the chart wanted.
  Returns: The deviation threshold.

calcDev(basePrice, price) Custom function for calculating price deviation for validating large moves.
  Parameters:
    basePrice: The reference price.
    price: The price tested.
  Returns: The deviation.

pivotFoundWithLines(dev, isHigh, index, price, dev_threshold, isHighLast, pLast, iLast, lineLast) Detecting pivots that meet our deviation criteria.
  Parameters:
    dev: The deviation wanted.
    isHigh: The type of pivot tested (high or low).
    index: The Index of the pivot tested.
    price: The chart price wanted.
    dev_threshold: The deviation treshold.
    isHighLast: The type of last pivot.
    pLast: The pivot price last.
    iLast: Index of the last pivot.
    lineLast: The lst line.
  Returns: The Line and bool is pivot High.

getDeviationPivots(thresholdMultiplier, depth, lineLast, isHighLast, iLast, pLast, deleteLines, closePrice, highPrice, lowPrice) Get pivot that meet our deviation criteria.
  Parameters:
    thresholdMultiplier: The treshold multiplier.
    depth: The depth to calculate pivot.
    lineLast: The last line.
    isHighLast: The type of last pivot
    iLast: Index of the last pivot.
    pLast: The pivot price last.
    deleteLines: If the line are draw or not.
    closePrice: The chart close price.
    highPrice: The chart high price.
    lowPrice: The chart low price.
  Returns: All pivot the informations.

getElIntArrayFromEnd() Get the last element of an int array.

getElFloatArrayFromEnd() Get the last element of an float array.

getElBoolArrayFromEnd() Get the last element of a bool array.

isTrendContinuation(isTrendUp, arrayBounds, lastPrice, precision) Check if last price is between bounds array.
  Parameters:
    isTrendUp: Is actual trend up.
    arrayBounds: The trend array.
    lastPrice: The pivot Price that just be found.
    precision: The percent we add to actual bounds to validate a move.
  Returns: na if price is between bounds, true if continuation, false if not.

getTrendPivots(trendBarIndexes, trendPrices, trendPricesIsHigh, interBarIndexes, interPrices, interPricesIsHigh, isTrendHesitate, isTrendUp, trendPrecision, pLast, iLast, isHighLast) Function to update array and trend related to pivot trend interpretation.
  Parameters:
    trendBarIndexes: The array trend bar index.
    trendPrices: The array trend price.
    trendPricesIsHigh: The array trend is high.
    interBarIndexes: The array inter bar index.
    interPrices: The array inter price.
    interPricesIsHigh: The array inter ishigh.
    isTrendHesitate: The actual status of is trend hesitate.
    isTrendUp: The actual status of is trend up.
    trendPrecision: The var precision to add in "iscontinuation" function.
    pLast: The last pivot price.
    iLast: The last pivot bar index.
    isHighLast: The last pivot "isHigh".
  Returns: trend & inter arrays, is trend hesitate, is trend up.

drawBoundLines(startIndex, startPrice, endIndex, endPrice, breakingPivotIndex, breakingPivotPrice, isTrendUp) Draw bounds and breaking line of the trend.
  Parameters:
    startIndex: Index of the first bound line.
    startPrice: Price of first bound line.
    endIndex: Index of second bound line.
    endPrice: price of second bound line.
    breakingPivotIndex: The breaking line index.
    breakingPivotPrice: The breaking line price.
    isTrendUp: The actual status of the trend.
  Returns: The lines bounds and breaking line.
Nota Keluaran:
v2

Added:
getResistances(resPrices, resBarIndexes, resWeights, resNbLows, resNbHighs, maxResis, rangePercentResis, pLast, iLast, isHighLast) Function to update array and trend related to pivot trend interpretation.
  Parameters:
    resPrices: Array that save resis prices.
    resBarIndexes: Array that save resis bar index.
    resWeights: Array that save resis weight (how much time a pivot got into a resis).
    resNbLows: Array that save nb low pivot in resis.
    resNbHighs: Array that save nb high pivot in resis.
    maxResis: Max number of resis in resis arrays.
    rangePercentResis: Percentage vertical range to be taken when finding res.
    pLast: The last pivot price.
    iLast: The last pivot bar index.
    isHighLast: The last pivot "isHigh".
  Returns: trend & inter arrays, is trend hesitate, is trend up.

getTopRes(nbShowRes, minTopWeight, resWeights, resPrices, resBarIndexes) Get top weighted resistance from multiple res found.
  Parameters:
    nbShowRes: Nb res we want to return .
    minTopWeight: Minimum res weight we want to return.
    resWeights: Res weight array.
    resPrices: Res prices array.
    resBarIndexes: Res bar index array.
@return The top arrays.

drawResLines(resPrices, resIndexes) Draw resistance lines for resistance indicator.
  Parameters:
    resPrices: Array of res prices.
    resIndexes: Array of res bar indexes.
Nota Keluaran:
v2 chart.
Nota Keluaran:
v4 : Resistance Script update & bug fix.
Nota Keluaran:
  • Bug Fix
Nota Keluaran:
v6 :
  • Fix bug
  • Change line style
Nota Keluaran:
v7

Added:
plotDivergences()
  Plot divergences.

getOscPivots()
  Used to get pivots and potential pivots.
Nota Keluaran:
v8

Added:
getHighLowFromNbCandles()
  to get last high/low (handle multiple rsiOver in a row)
Nota Keluaran:
v9

Added:
zlSma()
  calculate zero lag sma.

dema()
  to get dema.

multiMa()
  Select between multiple ma type.

getSlope()
  Get source slope.

getMZL()

demaSupertrend()
  to get Dema supertrend.

getRSI()
  get RSI.

getMACD()
  get MACD.
Nota Keluaran:
v10

Added:
tema()
  Tripple exponential moving average.

zlDema()
  Zero-lag Dema.

zlTema()
  Zero-lag Tema.

mcginley()
  McGinley Dynamic

Updated:
dema()
  Double Exponential Average.
Nota Keluaran:
v11

Added:
getTrendBands()
  get trend bands.
Nota Keluaran:
v12

Added:
getInterTrend()
  get trend brand from pivot/highs lows interpretation.

Perpustakaan Pine

Di dalam semangat sebenar TradingView, pengarang telah menerbitkan kod Pine ini sebagai perpustakaan sumber terbuka, jadi pengaturcara-pengaturcara Pine yang lain dari komuniti kami boleh menggunakannya semula. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara peribadi atau pada penerbitan-penerbitan sumber terbuka lain, tetapi penggunaan semula kod ini di dalam penerbitan adalah ditadbir oleh Peraturan Dalaman.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Mahu gunakan perpustakaan ini?

Salin garisan ini dan tampalkan ia di dalam skrip anda.