PINE LIBRARY

DeepSignalFilterHelpers

Diupdate
Library "DeepSignalFilterHelpers"

filter_intraday_intensity(useIiiFilter)
  Parameters:
    useIiiFilter (bool)

filter_vwma(src, length, useVwmaFilter)
  Parameters:
    src (float)
    length (int)
    useVwmaFilter (bool)

filter_nvi(useNviFilter)
  Parameters:
    useNviFilter (bool)

filter_emv(length, emvThreshold, useEmvFilter, useMovingAvg)
  EMV filter for filtering signals based on Ease of Movement
  Parameters:
    length (int): <int> The length of the EMV calculation
    emvThreshold (float): <float> The EMV threshold
    useEmvFilter (bool): <bool> Whether to apply the EMV filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_adi(length, threshold, useAdiFilter, useMovingAvg)
  ADI filter for filtering signals based on Accumulation/Distribution Index
  Parameters:
    length (int): <int> The length of the ADI moving average calculation
    threshold (float): <float> The ADI threshold
    useAdiFilter (bool): <bool> Whether to apply the ADI filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_mfi(length, mfiThreshold, useMfiFilter, useMovingAvg)
  MFI filter for filtering signals based on Money Flow Index
  Parameters:
    length (int): <int> The length of the MFI calculation
    mfiThreshold (float): <float> The MFI threshold
    useMfiFilter (bool): <bool> Whether to apply the MFI filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

detect_obv_states(obvThresholdStrong, obvThresholdModerate, lookbackPeriod, obvMode)
  detect_obv_states: Identify OBV states with three levels (Strong, Moderate, Weak) over a configurable period
  Parameters:
    obvThresholdStrong (float): <float> Threshold for strong OBV movements
    obvThresholdModerate (float): <float> Threshold for moderate OBV movements
    lookbackPeriod (int): <int> Number of periods to analyze OBV trends
    obvMode (string): <string> OBV mode to filter ("Strong", "Moderate", "Weak")
  Returns: <string> OBV state ("Strong Up", "Moderate Up", "Weak Up", "Positive Divergence", "Negative Divergence", "Consolidation", "Weak Down", "Moderate Down", "Strong Down")

filter_obv(src, length, obvMode, threshold, useObvFilter, useMovingAvg)
  filter_obv: Filter signals based on OBV states
  Parameters:
    src (float): <series float> The source series (default: close)
    length (int): <int> The length of the OBV moving average calculation
    obvMode (string): <string> OBV mode to filter ("Strong", "Moderate", "Weak")
    threshold (float): <float> Optional threshold for additional filtering
    useObvFilter (bool): <bool> Whether to apply the OBV filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_cmf(length, cmfThreshold, useCmfFilter, useMovingAvg)
  CMF filter for filtering signals based on Chaikin Money Flow
  Parameters:
    length (int): <int> The length of the CMF calculation
    cmfThreshold (float): <float> The CMF threshold
    useCmfFilter (bool): <bool> Whether to apply the CMF filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_vwap(useVwapFilter)
  VWAP filter for filtering signals based on Volume-Weighted Average Price
  Parameters:
    useVwapFilter (bool): <bool> Whether to apply the VWAP filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_pvt(length, pvtThreshold, usePvtFilter, useMovingAvg)
  PVT filter for filtering signals based on Price Volume Trend
  Parameters:
    length (int): <int> The length of the PVT moving average calculation
    pvtThreshold (float): <float> The PVT threshold
    usePvtFilter (bool): <bool> Whether to apply the PVT filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_vo(shortLength, longLength, voThreshold, useVoFilter, useMovingAvg)
  VO filter for filtering signals based on Volume Oscillator
  Parameters:
    shortLength (int): <int> The length of the short-term volume moving average
    longLength (int): <int> The length of the long-term volume moving average
    voThreshold (float): <float> The Volume Oscillator threshold
    useVoFilter (bool): <bool> Whether to apply the VO filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_cho(shortLength, longLength, choThreshold, useChoFilter, useMovingAvg)
  CHO filter for filtering signals based on Chaikin Oscillator
  Parameters:
    shortLength (int): <int> The length of the short-term ADI moving average
    longLength (int): <int> The length of the long-term ADI moving average
    choThreshold (float): <float> The Chaikin Oscillator threshold
    useChoFilter (bool): <bool> Whether to apply the CHO filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_fi(length, fiThreshold, useFiFilter, useMovingAvg)
  FI filter for filtering signals based on Force Index
  Parameters:
    length (int): <int> The length of the FI calculation
    fiThreshold (float): <float> The Force Index threshold
    useFiFilter (bool): <bool> Whether to apply the FI filter
    useMovingAvg (bool): <bool> Whether to use moving average as threshold
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_garman_klass_volatility(length, useGkFilter)
  Parameters:
    length (int)
    useGkFilter (bool)

filter_frama(src, length, useFramaFilter)
  Parameters:
    src (float)
    length (int)
    useFramaFilter (bool)

filter_bollinger_bands(src, length, stdDev, useBollingerFilter)
  Parameters:
    src (float)
    length (int)
    stdDev (float)
    useBollingerFilter (bool)

filter_keltner_channel(src, length, atrMult, useKeltnerFilter)
  Parameters:
    src (float)
    length (simple int)
    atrMult (float)
    useKeltnerFilter (bool)

regime_filter(src, threshold, useRegimeFilter)
  Regime filter for filtering signals based on trend strength
  Parameters:
    src (float): <series float> The source series
    threshold (float): <float> The threshold for the filter
    useRegimeFilter (bool): <bool> Whether to apply the regime filter
  Returns: <bool> Filtered result indicating whether the signal should be used

regime_filter_v2(src, threshold, useRegimeFilter)
  Regime filter for filtering signals based on trend strength
  Parameters:
    src (float): <series float> The source series
    threshold (float): <float> The threshold for the filter
    useRegimeFilter (bool): <bool> Whether to apply the regime filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_adx(src, length, adxThreshold, useAdxFilter)
  ADX filter for filtering signals based on ADX strength
  Parameters:
    src (float): <series float> The source series
    length (simple int): <int> The length of the ADX calculation
    adxThreshold (int): <int> The ADX threshold
    useAdxFilter (bool): <bool> Whether to apply the ADX filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_volatility(minLength, maxLength, useVolatilityFilter)
  Volatility filter for filtering signals based on volatility
  Parameters:
    minLength (simple int): <int> The minimum length for ATR calculation
    maxLength (simple int): <int> The maximum length for ATR calculation
    useVolatilityFilter (bool): <bool> Whether to apply the volatility filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_ulcer(src, length, ulcerThreshold, useUlcerFilter)
  Ulcer Index filter for filtering signals based on Ulcer Index
  Parameters:
    src (float): <series float> The source series
    length (int): <int> The length of the Ulcer Index calculation
    ulcerThreshold (float): <float> The Ulcer Index threshold (default: average Ulcer Index)
    useUlcerFilter (bool): <bool> Whether to apply the Ulcer Index filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_stddev(src, length, stdDevThreshold, useStdDevFilter)
  Standard Deviation filter for filtering signals based on Standard Deviation
  Parameters:
    src (float): <series float> The source series
    length (int): <int> The length of the Standard Deviation calculation
    stdDevThreshold (float): <float> The Standard Deviation threshold (default: average Standard Deviation)
    useStdDevFilter (bool): <bool> Whether to apply the Standard Deviation filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_macdv(src, shortLength, longLength, signalSmoothing, macdVThreshold, useMacdVFilter)
  MACD-V filter for filtering signals based on MACD-V
  Parameters:
    src (float): <series float> The source series
    shortLength (simple int): <int> The short length for MACD calculation
    longLength (simple int): <int> The long length for MACD calculation
    signalSmoothing (simple int): <int> The signal smoothing length for MACD
    macdVThreshold (float): <float> The MACD-V threshold (default: average MACD-V)
    useMacdVFilter (bool): <bool> Whether to apply the MACD-V filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_atr(length, atrThreshold, useAtrFilter)
  ATR filter for filtering signals based on Average True Range (ATR)
  Parameters:
    length (simple int): <int> The length of the ATR calculation
    atrThreshold (float): <float> The ATR threshold (default: average ATR)
    useAtrFilter (bool): <bool> Whether to apply the ATR filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_candle_body_and_atr(length, bodyThreshold, atrThreshold, useFilter)
  Candle Body and ATR filter for filtering signals
  Parameters:
    length (simple int): <int> The length of the ATR calculation
    bodyThreshold (float): <float> The threshold for candle body size (relative to ATR)
    atrThreshold (float): <float> The ATR threshold (default: average ATR)
    useFilter (bool): <bool> Whether to apply the candle body and ATR filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_atrp(length, atrpThreshold, useAtrpFilter)
  ATRP filter for filtering signals based on ATR Percentage (ATRP)
  Parameters:
    length (simple int): <int> The length of the ATR calculation
    atrpThreshold (float): <float> The ATRP threshold (default: average ATRP)
    useAtrpFilter (bool): <bool> Whether to apply the ATRP filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_jma(src, length, phase, useJmaFilter)
  Parameters:
    src (float)
    length (simple int)
    phase (float)
    useJmaFilter (bool)

filter_cidi(src, rsiLength, shortMaLength, longMaLength, useCidiFilter)
  Parameters:
    src (float)
    rsiLength (simple int)
    shortMaLength (int)
    longMaLength (int)
    useCidiFilter (bool)

filter_rsi(src, length, rsiThreshold, useRsiFilter)
  Parameters:
    src (float)
    length (simple int)
    rsiThreshold (float)
    useRsiFilter (bool)

filter_ichimoku_oscillator(length, threshold, useFilter)
  Ichimoku Oscillator filter for filtering signals based on Ichimoku Oscillator
  Parameters:
    length (int): <int> The length of the Ichimoku Oscillator calculation
    threshold (float): <float> The threshold for the filter (default: average Ichimoku Oscillator)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_cmb_composite_index(src, shortLength, longLength, threshold, useFilter)
  CMB Composite Index filter for filtering signals based on CMB Composite Index
  Parameters:
    src (float): <series float> The source series
    shortLength (simple int): <int> The short length for CMB calculation
    longLength (simple int): <int> The long length for CMB calculation
    threshold (float): <float> The threshold for the filter (default: average CMB Composite Index)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_connors_rsi(src, rsiLength, rocLength, streakLength, threshold, useFilter)
  Connors RSI filter for filtering signals based on Connors RSI
  Parameters:
    src (float): <series float> The source series
    rsiLength (simple int): <int> The length for RSI calculation
    rocLength (int): <int> The length for ROC calculation
    streakLength (simple int): <int> The length for streak calculation
    threshold (float): <float> The threshold for the filter (default: average Connors RSI)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_coppock_curve(src, roc1Length, roc2Length, wmaLength, threshold, useFilter)
  Coppock Curve filter for filtering signals based on Coppock Curve
  Parameters:
    src (float): <series float> The source series
    roc1Length (int): <int> The length for the first ROC calculation
    roc2Length (int): <int> The length for the second ROC calculation
    wmaLength (int): <int> The length for the WMA calculation
    threshold (float): <float> The threshold for the filter (default: average Coppock Curve)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_pmo(src, pmoLength, smoothingLength, threshold, useFilter)
  DecisionPoint Price Momentum Oscillator filter for filtering signals based on PMO
  Parameters:
    src (float): <series float> The source series
    pmoLength (simple int): <int> The length for PMO calculation
    smoothingLength (simple int): <int> The smoothing length for PMO
    threshold (float): <float> The threshold for the filter (default: average PMO Oscillator)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_macd(src, shortLength, longLength, signalSmoothing, threshold, useFilter)
  MACD filter for filtering signals based on MACD
  Parameters:
    src (float): <series float> The source series
    shortLength (simple int): <int> The short length for MACD calculation
    longLength (simple int): <int> The long length for MACD calculation
    signalSmoothing (simple int): <int> The signal smoothing length for MACD
    threshold (float): <float> The threshold for the filter (default: average MACD)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_macd_histogram(src, shortLength, longLength, signalSmoothing, threshold, useFilter)
  MACD-Histogram filter for filtering signals based on MACD-Histogram
  Parameters:
    src (float): <series float> The source series
    shortLength (simple int): <int> The short length for MACD calculation
    longLength (simple int): <int> The long length for MACD calculation
    signalSmoothing (simple int): <int> The signal smoothing length for MACD
    threshold (float): <float> The threshold for the filter (default: average MACD-Histogram)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_kst(src, r1, r2, r3, r4, sm1, sm2, sm3, sm4, signalLength, threshold, useFilter)
  Pring's Know Sure Thing filter for filtering signals based on KST
  Parameters:
    src (float): <series float> The source series
    r1 (int): <int> The first ROC length
    r2 (int): <int> The second ROC length
    r3 (int): <int> The third ROC length
    r4 (int): <int> The fourth ROC length
    sm1 (int): <int> The first smoothing length
    sm2 (int): <int> The second smoothing length
    sm3 (int): <int> The third smoothing length
    sm4 (int): <int> The fourth smoothing length
    signalLength (int): <int> The signal line smoothing length
    threshold (float): <float> The threshold for the filter (default: average KST Oscillator)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_special_k(src, r1, r2, r3, r4, sm1, sm2, sm3, sm4, threshold, useFilter)
  Pring's Special K filter for filtering signals based on Special K
  Parameters:
    src (float): <series float> The source series
    r1 (int): <int> The first ROC length
    r2 (int): <int> The second ROC length
    r3 (int): <int> The third ROC length
    r4 (int): <int> The fourth ROC length
    sm1 (int): <int> The first smoothing length
    sm2 (int): <int> The second smoothing length
    sm3 (int): <int> The third smoothing length
    sm4 (int): <int> The fourth smoothing length
    threshold (float): <float> The threshold for the filter (default: average Special K)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_roc_momentum(src, rocLength, momentumLength, threshold, useFilter)
  ROC and Momentum filter for filtering signals based on ROC and Momentum
  Parameters:
    src (float): <series float> The source series
    rocLength (int): <int> The length for ROC calculation
    momentumLength (int): <int> The length for Momentum calculation
    threshold (float): <float> The threshold for the filter (default: average ROC and Momentum)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_rrg_relative_strength(src, length, threshold, useFilter)
  RRG Relative Strength filter for filtering signals based on RRG Relative Strength
  Parameters:
    src (float): <series float> The source series
    length (int): <int> The length for RRG Relative Strength calculation
    threshold (float): <float> The threshold for the filter (default: average RRG Relative Strength)
    useFilter (bool): <bool> Whether to apply the filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_alligator(useFilter)
  Parameters:
    useFilter (bool)

filter_wyckoff(useFilter)
  Parameters:
    useFilter (bool)

filter_squeeze_momentum(bbLength, bbStdDev, kcLength, kcMult, useFilter)
  Parameters:
    bbLength (int)
    bbStdDev (float)
    kcLength (simple int)
    kcMult (float)
    useFilter (bool)

filter_atr_compression(length, atrThreshold, useFilter)
  Parameters:
    length (simple int)
    atrThreshold (float)
    useFilter (bool)

filter_low_volume(length, useFilter)
  Parameters:
    length (int)
    useFilter (bool)

filter_nvi_accumulation(useFilter)
  Parameters:
    useFilter (bool)

filter_ma_slope(src, length, slopeThreshold, useFilter)
  Parameters:
    src (float)
    length (int)
    slopeThreshold (float)
    useFilter (bool)

filter_adx_low(len, lensig, adxThreshold, useFilter)
  Parameters:
    len (simple int)
    lensig (simple int)
    adxThreshold (int)
    useFilter (bool)

filter_choppiness_index(length, chopThreshold, useFilter)
  Parameters:
    length (int)
    chopThreshold (float)
    useFilter (bool)

filter_range_detection(length, useFilter)
  Parameters:
    length (int)
    useFilter (bool)
Catatan Rilis
v2

Added:
filter_price_action(lookback, minDistance, useFilter)
  Price Action Filter for filtering signals based on price position relative to local high/low
  Parameters:
    lookback (simple int): <int> Number of candles to check for local high/low
    minDistance (float): <float> Minimum distance percentage from local high/low (default: SMA of the percentage distance)
    useFilter (bool): <bool> Whether to apply the Price Action filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_momentum(lookback, momentumThreshold, useFilter)
  Momentum Filter for filtering signals based on momentum over a specified lookback period
  Parameters:
    lookback (simple int): <int> Number of candles to check for momentum
    momentumThreshold (float): <float> Minimum momentum percentage (default: SMA of recent momentum)
    useFilter (bool): <bool> Whether to apply the Momentum filter
  Returns: <bool> Filtered result indicating whether the signal should be used

filter_candle_structure(bodyThreshold, lookback, useFilter)
  Candle Structure Filter for filtering signals based on the body size of previous candles
  Parameters:
    bodyThreshold (simple float): <float> Minimum body percentage of the previous candle (default: SMA of recent body percentages)
    lookback (simple int): <int> Number of candles for SMA calculation of body size (default: 5)
    useFilter (bool): <bool> Whether to apply the Candle Structure filter
  Returns: <bool> Filtered result indicating whether the signal should be used
Catatan Rilis
Code clean
debugging

Perpustakaan pine

Dengan semangat TradingView yang sesungguhnya, penulis telah menerbitkan Kode Pine ini sebagai pustaka sumber terbuka sehingga programmer Pine lain dari komunitas kami dapat menggunakannya kembali. Hormat untuk penulis! Anda dapat menggunakan pustaka ini secara pribadi atau dalam publikasi sumber terbuka lainnya, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib.


Juga di:

Pernyataan Penyangkalan