tartigradia

f_maSelect

tartigradia 업데이트됨   
Library "f_maSelect"
Easy to use drop-in facade function to lots of different moving average calculations, including some that are not natively available in PineScript v5 such as Zero-Lag EMA. Simply call f_maSelect(series float serie, simple string ma_type="sma", ma_length=14) instead of a ta.*ma() call and you get access to all MAs offered by PineScript and more.

zema(src, len)
  Zero-lag EMA (ZLMA)
  Parameters:
    src: Input series
    len: Lookback period
  Returns: Series smoothed with ZLMA

approximate_sma(x, ma_length)
  Approximate Standard Moving Average, which substracts the average instead of popping the oldest element, hence losing the base frequency and is why it is approximative. For some reason, this appears to give the same results as a standard RMA
  Parameters:
    x: Input series.
    ma_length: Lookback period.
  Returns: Approximate SMA series.

f_maSelect(serie, ma_type, ma_length)
  Generalized moving average selector
  Parameters:
    serie: Input series
    ma_type: String describing which moving average to use
    ma_length: Lookback period
  Returns: Serie smoothed with the selected moving average.

generalized_dev(src, length, avg, lmode)
  Generalized deviation calculation: Whereas other Bollinger Bands often just change the basis but not the stdev calculation, the correct way to change the basis is to also change it inside the stdev calculation.
  Parameters:
    src: Series to use (default: close)
    length: Lookback period
    avg: Average basis to use to calculate the standard deviation
    lmode: L1 or L2 regularization? (ie, lmode=1 uses abs() to cutoff negative values hence it calculates the Mean Absolute Deviation as does the ta.dev(), lmode=2 uses sum of squares hence it calculates the true Standard Deviation as the ta.stdev() function does). See also the research works of everget:   Returns: stdev Standard deviation series

generalized_dev_discount(src, length, avg, lmode, temporal_discount)
  Standard deviation calculation but with different probabilities assigned to each bar, with newer bars having more weights en.wikipedia.org/wik...i/Standard_deviation
  Parameters:
    src: Series to use (default: close)
    length: Lookback period
    avg: Average basis to use to calculate the standard deviation
    lmode: L1 or L2 regularization? (ie, lmode=1 uses abs() to cutoff negative values hence it calculates the Mean Absolute Deviation as does the ta.dev(), lmode=2 uses sum of squares hence it calculates the true Standard Deviation as the ta.stdev() function does). See also the research works of everget:     temporal_discount: Probabilistic gamma factor to discount old values in favor of new ones, higher value = more weight to newer bars
  Returns: stdev Standard deviation series

median_absdev(src, length, median)
  Median Absolute Deviation
  Parameters:
    src: Input series
    length: Lookback period
    median: Median already calculated on the input series
  Returns: mad, the median absolute deviation value
릴리즈 노트:
* Minor changes in text (remove unnecessary references to Bollinger Bands)
파인 라이브러리

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

면책사항

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

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

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