Library "Pivots"
This Library focuses in functions related to pivot highs and lows and some of their applications (i.e. divergences, zigzag, harmonics, support and resistance...)

pivots(srcH, srcL, length) Delivers series of pivot highs, lows and zigzag.
  Parameters:
    srcH: Source series to look for pivot highs. Stricter applications might source from 'close' prices. Oscillators are also another possible source to look for pivot highs and lows. By default 'high'
    srcL: Source series to look for pivot lows. By default 'low'
    length: This value represents the minimum number of candles between pivots. The lower the number, the more detailed the pivot profile. The higher the number, the more relevant the pivots. By default 10
  Returns:

zigzagArray(pivotHigh, pivotLow) Delivers a Zigzag series based on alternating pivots. Ocasionally this line could paint a few consecutive lows or highs without alternating. That happens because it's finding a few consecutive Higher Highs or Lower Lows. If to use lines entities instead of series, that could be easily avoided. But in this one, I'm more interested outputting series rather than painting/deleting line entities.
  Parameters:
    pivotHigh: Pivot high series
    pivotLow: Pivot low series
  Returns:

zigzagLine(srcH, srcL, colorLine, widthLine) Delivers a Zigzag based on line entities.
  Parameters:
    srcH: Source series to look for pivot highs. Stricter applications might source from 'close' prices. Oscillators are also another possible source to look for pivot highs and lows. By default 'high'
    srcL: Source series to look for pivot lows. By default 'low'
    colorLine: Color of the Zigzag Line. By default Fuchsia
    widthLine: Width of the Zigzag Line. By default 4
  Returns: Zigzag printed on screen

divergence(h2, l2, h1, l1, length) Calculates divergences between 2 series
  Parameters:
    h2: Series in which to locate divs: Highs
    l2: Series in which to locate divs: Lows
    h1: Series in which to locate pivots: Highs. By default high
    l1: Series in which to locate pivots: Lows. By default low
    length: Length used to calculate Pivots: By default 10
  Returns:

I develop indicators meant to be useful, profitable and good looking.

Please send me a Private Message if you intend to subscribe to an Invite-Only indicator or to hire me to develop some custom work.
파인 라이브러리

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

면책사항

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

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

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