Fontiramisu

fontilab

Fontiramisu Zaktualizowano   
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.
Informacje o Wersji:
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.
Informacje o Wersji:
v2 chart.
Informacje o Wersji:
v4 : Resistance Script update & bug fix.
Informacje o Wersji:
  • Bug Fix
Informacje o Wersji:
v6 :
  • Fix bug
  • Change line style
Informacje o Wersji:
v7

Added:
plotDivergences()
  Plot divergences.

getOscPivots()
  Used to get pivots and potential pivots.
Informacje o Wersji:
v8

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

Added:
tema()
  Tripple exponential moving average.

zlDema()
  Zero-lag Dema.

zlTema()
  Zero-lag Tema.

mcginley()
  McGinley Dynamic

Updated:
dema()
  Double Exponential Average.
Informacje o Wersji:
v11

Added:
getTrendBands()
  get trend bands.
Informacje o Wersji:
v12

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

Biblioteka Pine

Działając zgodnie z prawdziwym duchem TradingView, autor opublikował ten kod Pine jako bibliotekę o otwartym kodzie źródłowym, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Brawa dla niego! Możesz korzystać z tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne wykorzystanie tego kodu w publikacji podlega Regulaminowi.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz skorzystać z tej biblioteki?

Skopiuj poniższy wiersz i wklej go w swoim skrypcie.