Fontiramisu

fontilab

Fontiramisu Aggiornato   
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.
Note di rilascio:
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.
Note di rilascio:
v2 chart.
Note di rilascio:
v4 : Resistance Script update & bug fix.
Note di rilascio:
  • Bug Fix
Note di rilascio:
v6 :
  • Fix bug
  • Change line style
Note di rilascio:
v7

Added:
plotDivergences()
  Plot divergences.

getOscPivots()
  Used to get pivots and potential pivots.
Note di rilascio:
v8

Added:
getHighLowFromNbCandles()
  to get last high/low (handle multiple rsiOver in a row)
Note di rilascio:
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.
Note di rilascio:
v10

Added:
tema()
  Tripple exponential moving average.

zlDema()
  Zero-lag Dema.

zlTema()
  Zero-lag Tema.

mcginley()
  McGinley Dynamic

Updated:
dema()
  Double Exponential Average.
Note di rilascio:
v11

Added:
getTrendBands()
  get trend bands.
Note di rilascio:
v12

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

Libreria Pine

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzare questa libreria in privato o all'interno di altre pubblicazioni open-source, ma il riutilizzo del codice è subordinato al rispetto del Regolamento.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questa libreria?

Copia il testo ed incollalo nel tuo script.