Fontiramisu

fontilab

Fontiramisu 업데이트됨   
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.
릴리즈 노트:
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.
릴리즈 노트:
v2 chart.
릴리즈 노트:
v4 : Resistance Script update & bug fix.
릴리즈 노트:
  • Bug Fix
릴리즈 노트:
v6 :
  • Fix bug
  • Change line style
릴리즈 노트:
v7

Added:
plotDivergences()
  Plot divergences.

getOscPivots()
  Used to get pivots and potential pivots.
릴리즈 노트:
v8

Added:
getHighLowFromNbCandles()
  to get last high/low (handle multiple rsiOver in a row)
릴리즈 노트:
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.
릴리즈 노트:
v10

Added:
tema()
  Tripple exponential moving average.

zlDema()
  Zero-lag Dema.

zlTema()
  Zero-lag Tema.

mcginley()
  McGinley Dynamic

Updated:
dema()
  Double Exponential Average.
릴리즈 노트:
v11

Added:
getTrendBands()
  get trend bands.
릴리즈 노트:
v12

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

파인 라이브러리

트레이딩뷰 정신에 따라 오써는 이 파인 코드를 오픈 소스 라이브러리로 퍼블리쉬하여 당사 커뮤니티의 다른 파인 프로그래머들이 쓸 수 있도록 하였습니다. 오써에게 찬사를! 여러분은 이 라이브러리를 프라이빗 또는 오픈 소스 퍼블리케이션에 쓸 수 있지만 퍼블리케이션에 재사용은 하우스룰을 따릅니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

이 라이브러리를 쓰시겠습니까?

텍스트를 클립보드에 카피한 뒤 님의 스크립트에 붙여 넣기.