API Documentation
Indicators (alphabetically ordered)
OnlineTechnicalIndicators.ADX — TypeADX{Tohlcv}(; di_period = 14, adx_period = 14, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ADX type implements an Average Directional Index indicator.
Output
ADXVal: A value containingadx,plus_di, andminus_divalues
OnlineTechnicalIndicators.ALMA — TypeALMA{T}(; period = ALMA_PERIOD, offset = ALMA_OFFSET, sigma = ALMA_SIGMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The ALMA type implements an Arnaud Legoux Moving Average indicator.
OnlineTechnicalIndicators.AO — TypeAO{Tohlcv}(; fast_period = AO_FAST_PERIOD, slow_period = AO_SLOW_PERIOD, fast_ma = SMA, slow_ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The AO type implements an Awesome Oscillator indicator.
OnlineTechnicalIndicators.ATR — TypeATR{Tohlcv}(; period = ATR_PERIOD, ma = SMMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ATR type implements an Average True Range indicator.
OnlineTechnicalIndicators.AccuDist — TypeAccuDist{Tohlcv}(input_filter = always_true, input_modifier = identity)The AccuDist type implements an Accumulation and Distribution indicator.
OnlineTechnicalIndicators.Aroon — TypeAroon{Tohlcv}(; period = Aroon_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The Aroon type implements an Aroon indicator.
Output
AroonVal: A value containingupanddownvalues
OnlineTechnicalIndicators.BB — TypeBB{T}(; period = BB_PERIOD, std_dev_mult = BB_STD_DEV_MULT, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The BB type implements Bollinger Bands indicator.
Output
BBVal: A value containinglower,central, andupperband values
OnlineTechnicalIndicators.BOP — TypeBOP{Tohlcv}(input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The BOP type implements a Balance Of Power indicator.
OnlineTechnicalIndicators.CCI — TypeCCI{Tohlcv}(; period=CCI_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The CCI type implements a Commodity Channel Index.
OnlineTechnicalIndicators.CHOP — TypeCHOP{Tohlcv}(; period = CHOP_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The CHOP type implements a Choppiness Index indicator.
OnlineTechnicalIndicators.ChaikinOsc — TypeChaikinOsc{Tohlcv}(; fast_period = ChaikinOsc_FAST_PERIOD, slow_period = ChaikinOsc_SLOW_PERIOD, fast_ma = EMA, slow_ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ChaikinOsc type implements a Chaikin Oscillator.
OnlineTechnicalIndicators.ChandeKrollStop — TypeChandeKrollStop{Tohlcv}(; atr_period = ChandeKrollStop_ATR_PERIOD, atr_mult = ChandeKrollStop_ATR_MULT, period = ChandeKrollStop_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ChandeKrollStop type implements a ChandeKrollStop indicator.
Output
ChandeKrollStopVal: A value containingshort_stopandlong_stopvalues
OnlineTechnicalIndicators.CoppockCurve — TypeCoppockCurve{T}(; fast_roc_period = CoppockCurve_FAST_ROC_PERIOD, slow_roc_period = CoppockCurve_SLOW_ROC_PERIOD, wma_period = CoppockCurve_WMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The CoppockCurve type implements a Coppock Curve indicator.
OnlineTechnicalIndicators.DEMA — TypeDEMA{T}(; period = DEMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The DEMA type implements a Double Exponential Moving Average indicator.
OnlineTechnicalIndicators.DPO — TypeDPO{T}(; period = DPO_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The DPO type implements a Detrended Price Oscillator indicator.
OnlineTechnicalIndicators.DonchianChannels — TypeDonchianChannels{Tohlcv}(; period = DonchianChannels_ATR_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The DonchianChannels type implements a Donchian Channels indicator.
Output
DonchianChannelsVal: A value containinglower,central, andupperchannel values
OnlineTechnicalIndicators.EMA — TypeEMA{T}(; period = EMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The EMA type implements an Exponential Moving Average indicator.
OnlineTechnicalIndicators.GannHiloActivator — TypeGannHiloActivator{T}(; period=GANN_HILO_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The GannHiloActivator type implements a Gann HiLo Activator indicator.
OnlineTechnicalIndicators.GannSwingChart — TypeGannSwingChart{T}(; min_bars=GANN_SWING_MIN_BARS, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The GannSwingChart type implements Gann Swing Chart analysis for trend detection.
This indicator identifies:
- Upswings: Two consecutive higher highs
- Downswings: Two consecutive lower lows
- Trend changes: When prices break previous swing peaks/valleys
Parameters
min_bars: Minimum number of bars to confirm a swing (default: 2)
Output
GannSwingChartVal: Contains trend state, swing levels, and change signals
OnlineTechnicalIndicators.EMV — TypeEMV{Tohlcv}(; period = EMV_PERIOD, volume_div = EMV_VOLUME_DIV, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The EMV type implements a Ease of Movement indicator.
OnlineTechnicalIndicators.ForceIndex — TypeForceIndex{Tohlcv}(; period = ForceIndex_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ForceIndex type implements a Force Index indicator.
OnlineTechnicalIndicators.HMA — TypeHMA{T}(; period = HMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The HMA type implements a Hull Moving Average indicator.
OnlineTechnicalIndicators.KAMA — TypeKAMA{T}(; period = KAMA_PERIOD, fast_ema_constant_period = KAMA_FAST_EMA_CONSTANT_PERIOD, slow_ema_constant_period = KAMA_SLOW_EMA_CONSTANT_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The KAMA type implements a Kaufman's Adaptive Moving Average indicator.
OnlineTechnicalIndicators.KST — TypeKST{T}(;
roc1_period = KST_ROC1_PERIOD,
roc1_ma_period = KST_ROC1_MA_PERIOD,
roc2_period = KST_ROC2_PERIOD,
roc2_ma_period = KST_ROC2_MA_PERIOD,
roc3_period = KST_ROC3_PERIOD,
roc3_ma_period = KST_ROC3_MA_PERIOD,
roc4_period = KST_ROC4_PERIOD,
roc4_ma_period = KST_ROC4_MA_PERIOD,
signal_period = KST_SIGNAL_PERIOD,
ma = SMA,
input_filter = always_true,
input_modifier = identity,
input_modifier_return_type = T
)The KST type implements Know Sure Thing indicator.
Output
KSTVal: A value containingkstandsignalvalues
OnlineTechnicalIndicators.KVO — TypeKVO{Tohlcv}(; fast_period = KVO_FAST_PERIOD, slow_period = KVO_SLOW_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The KVO type implements a Klinger Volume Oscillator.
OnlineTechnicalIndicators.KeltnerChannels — TypeKeltnerChannels{Tohlcv}(; ma_period = KeltnerChannels_MA_PERIOD, atr_period = KeltnerChannels_ATR_PERIOD, atr_mult_up = KeltnerChannels_ATR_MULT_UP, atr_mult_down = KeltnerChannels_ATR_MULT_DOWN, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The KeltnerChannels type implements a Keltner Channels indicator.
Output
KeltnerChannelsVal: A value containinglower,central, andupperchannel values
OnlineTechnicalIndicators.MACD — TypeMACD{T}(; fast_period = MACD_FAST_PERIOD, slow_period = MACD_SLOW_PERIOD, signal_period = MACD_SIGNAL_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The MACD type implements Moving Average Convergence Divergence indicator.
Output
MACDVal: A value containingmacd,signal, andhistogramvalues
OnlineTechnicalIndicators.MassIndex — TypeMassIndex{T}(; ma_period = MassIndex_MA_PERIOD, ma_ma_period = MassIndex_MA_MA_PERIOD, ma_ratio_period = MassIndex_MA_RATIO_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The MassIndex type implements a Commodity Channel Index.
OnlineTechnicalIndicators.McGinleyDynamic — TypeMcGinleyDynamic{T}(; period = McGinleyDynamic_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The McGinleyDynamic type implements a McGinley Dynamic indicator.
OnlineTechnicalIndicators.MeanDev — TypeMeanDev{T}(; period = MeanDev_PERIOD, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The MeanDev type implements a Mean Deviation indicator.
OnlineTechnicalIndicators.NATR — TypeNATR{Tohlcv}(; period = ATR_PERIOD, ma = SMMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The NATR type implements a Normalized Average True Range indicator.
OnlineTechnicalIndicators.OBV — TypeOBV{Tohlcv}(input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The OBV type implements On Balance Volume indicator.
OnlineTechnicalIndicators.ParabolicSAR — TypeParabolicSAR{Tohlcv}(; atr_period = ParabolicSAR_ATR_PERIOD, mult = ParabolicSAR_MULT, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The ParabolicSAR type implements a Super Trend indicator.
Output
ParabolicSARVal: A value containingvalue,trend,ep, andaccel_factorvalues
OnlineTechnicalIndicators.PeakValleyDetector — TypePeakValleyDetector{T}(; lookback=PEAK_VALLEY_LOOKBACK, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The PeakValleyDetector type identifies significant peaks and valleys in price data.
This indicator detects:
- Peaks: Local high points where price is higher than surrounding bars
- Valleys: Local low points where price is lower than surrounding bars
- Support/Resistance levels based on these peaks and valleys
Parameters
lookback: Number of bars to look back/forward for peak/valley confirmation (default: 5)
Output
PeakValleyVal: Contains peak/valley levels and detection signals
Implements REQ-003: Identify peaks and valleys of each swing
OnlineTechnicalIndicators.PivotsHL — TypePivotsHL{Tohlcv}(; high_period = PivotsHL_HIGH_PERIOD, low_period = PivotsHL_LOW_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The PivotsHL type implements a High/Low Pivots Indicator.
Output
PivotsHLVal: A value containingohlcv,type, andisnewvalues
OnlineTechnicalIndicators.ROC — TypeROC{T}(; period = ROC_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The ROC type implements a Rate Of Change indicator.
OnlineTechnicalIndicators.RSI — TypeRSI{T}(; period = SMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The RSI type implements a Relative Strength Index indicator.
OnlineTechnicalIndicators.SFX — TypeSFX{Tohlcv}(; atr_period = SFX_ATR_PERIOD, std_dev_period = SFX_STD_DEV_PERIOD, std_dev_smoothing_period = SFX_STD_DEV_SMOOTHING_PERIOD, ma = SMA, , input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The SFX type implements a SFX indicator.
Output
SFXVal: A value containingatr,std_dev, andma_std_devvalues
OnlineTechnicalIndicators.SMA — TypeSMA{T1}(; period = SMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T2)The SMA type implements a Simple Moving Average indicator.
fit!(o, val) with o of type SMA will catch val of type T1
input val will be filtered using input_filter function (true means that val will be provided to o)
input val will be modified/transformed using input_modifier function (default is identity function which means that val won't be modified)
input_modifier_return_type is the type T2 of return of the input_modifier function it's also type of indicator value
by default T2 = T1
IN = false means that indicator is of "single input" type IN = true means that indicator is of "multiple input" (candle) type
OnlineTechnicalIndicators.SMMA — TypeSMMA{T}(; period = SMMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The SMMA type implements a SMoothed Moving Average indicator.
SMMA can also in american technical analysis litterature be named Wilder's moving average.
OnlineTechnicalIndicators.SOBV — TypeSOBV{Tohlcv}(; period = SOBV_PERIOD, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The SOBV type implements a Smoothed On Balance Volume indicator.
OnlineTechnicalIndicators.SupportResistanceLevel — TypeSupportResistanceLevel{T}(; input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The SupportResistanceLevel type calculates and monitors support and resistance levels.
This indicator tracks:
- Support levels from previous swing valleys
- Resistance levels from previous swing peaks
- Break signals when price penetrates these levels
Output
SupportResistanceLevelVal: Contains S/R levels and break signals
Implements REQ-040 to REQ-043: Support/Resistance level calculation and monitoring
OnlineTechnicalIndicators.RetracementCalculator — TypeRetracementCalculator{T}(; retracement_pct=0.38, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The RetracementCalculator type calculates retracement levels for swing trading.
This indicator calculates:
- 38% retracement levels for both long and short positions
- Current retracement percentage from swing peaks/valleys
- Signals when specific retracement levels are hit
Parameters
retracement_pct: Retracement percentage to calculate (default: 0.38 for 38%)
Output
RetracementVal: Contains retracement levels and hit signals
Implements REQ-310 to REQ-313: Calculate and monitor 38% retracement levels
OnlineTechnicalIndicators.STC — TypeSTC{T}(; fast_macd_period = STC_FAST_MACD_PERIOD, slow_macd_period = STC_SLOW_MACD_PERIOD, stoch_period = STC_STOCH_PERIOD, stoch_smoothing_period = STC_STOCH_SMOOTHING_PERIOD, ma = SMA, , input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The STC type implements a Schaff Trend Cycle indicator.
OnlineTechnicalIndicators.StdDev — TypeStdDev{T}(; period = StdDev_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The StdDev type implements a Standard Deviation indicator.
OnlineTechnicalIndicators.Stoch — TypeStoch{Tohlcv}(; period = STOCH_PERIOD, smoothing_period = STOCH_SMOOTHING_PERIOD, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The Stoch type implements the Stochastic indicator.
Output
StochVal: A value containingkanddvalues
OnlineTechnicalIndicators.StochRSI — TypeStochRSI{T}(; rsi_period = StochRSI_RSI_PERIOD, stoch_period = StochRSI_STOCH_PERIOD, k_smoothing_period = StochRSI_K_SMOOTHING_PERIOD, d_smoothing_period = StochRSI_D_SMOOTHING_PERIOD, ma = SMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tval)The StochRSI type implements Stochastic RSI indicator.
Output
StochRSIVal: A value containingkanddvalues
OnlineTechnicalIndicators.SuperTrend — TypeSuperTrend{Tohlcv}(; atr_period = SuperTrend_ATR_PERIOD, mult = SuperTrend_MULT, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The SuperTrend type implements a Super Trend indicator.
Output
SuperTrendVal: A value containingvalueandtrendvalues
OnlineTechnicalIndicators.T3 — TypeT3{T}(; period = T3_PERIOD, factor = T3_FACTOR, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The T3 type implements a T3 Moving Average indicator.
OnlineTechnicalIndicators.TEMA — TypeTEMA{T}(; period = TEMA_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The TEMA type implements a Triple Exponential Moving Average indicator.
OnlineTechnicalIndicators.TRIX — TypeTRIX{T}(; period = TRIX_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The TRIX type implements a TRIX Moving Average indicator.
OnlineTechnicalIndicators.TrueRange — TypeTrueRange{Tohlcv}(; input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The TrueRange type implements a True Range indicator.
OnlineTechnicalIndicators.TSI — TypeTSI{T}(; fast_period = TSI_FAST_PERIOD, slow_period = TSI_SLOW_PERIOD, ma = EMA, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The TSI type implements a True Strength Index indicator.
OnlineTechnicalIndicators.TTM — TypeTTM{Tohlcv}(; atr_period = TTM_ATR_PERIOD, std_dev_period = TTM_STD_DEV_PERIOD, std_dev_smoothing_period = TTM_STD_DEV_SMOOTHING_PERIOD, ma = SMA)The TTM type implements a TTM indicator.
Output
TTMVal: A value containingsqueezeandhistogramvalues
OnlineTechnicalIndicators.UO — TypeUO{Tohlcv}(; fast_period = UO_FAST_PERIOD, mid_period = UO_MID_PERIOD, slow_period = UO_SLOW_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The UO type implements an Ultimate Oscillator.
OnlineTechnicalIndicators.VTX — TypeVTX{Tohlcv}(; period = VTX_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The VTX type implements a Vortex Indicator.
Output
VTXVal: A value containingplus_vtxandminus_vtxvalues
OnlineTechnicalIndicators.VWAP — TypeVWAP{Tohlcv}(input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The VWAP type implements a Volume Weighted Moving Average indicator.
OnlineTechnicalIndicators.VWMA — TypeVWMA{Tohlcv}(; period = VWMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = Tohlcv)The VWMA type implements a Volume Weighted Moving Average indicator.
OnlineTechnicalIndicators.WMA — TypeWMA{T}(; period = WMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The WMA type implements a Weighted Moving Average indicator.
OnlineTechnicalIndicators.ZLEMA — TypeZLEMA{T}(; period=ZLEMA_PERIOD, input_filter = always_true, input_modifier = identity, input_modifier_return_type = T)The ZLEMA type implements a Zero Lag Exponential Moving Average indicator.
Indicator Value Types (alphabetically ordered)
OnlineTechnicalIndicators.ADXVal — TypeADXVal{Tval}Return value type for Average Directional Index indicator.
Fields
adx::Union{Missing,Tval}: Average Directional Index value (trend strength)plus_di::Tval: Plus Directional Indicator (+DI)minus_di::Tval: Minus Directional Indicator (-DI)
See also: ADX
OnlineTechnicalIndicators.AroonVal — TypeAroonVal{Tval}Return value type for Aroon indicator.
Fields
up::Tval: Aroon Up (time since highest high)down::Tval: Aroon Down (time since lowest low)
See also: Aroon
OnlineTechnicalIndicators.BBVal — TypeBBVal{Tval}Return value type for Bollinger Bands indicator containing three bands.
Fields
lower::Tval: Lower band (central - stddevmult * standard deviation)central::Tval: Central band (moving average)upper::Tval: Upper band (central + stddevmult * standard deviation)
See also: BB
OnlineTechnicalIndicators.ChandeKrollStopVal — TypeChandeKrollStopVal{Tval}Return value type for Chande Kroll Stop indicator.
Fields
short_stop::Tval: Short stop level (for short positions)long_stop::Tval: Long stop level (for long positions)
See also: ChandeKrollStop
OnlineTechnicalIndicators.DonchianChannelsVal — TypeDonchianChannelsVal{Tval}Return value type for Donchian Channels indicator.
Fields
lower::Tval: Lower channel (lowest low over period)central::Tval: Central line (midpoint between upper and lower)upper::Tval: Upper channel (highest high over period)
See also: DonchianChannels
OnlineTechnicalIndicators.GannHiloActivatorVal — TypeGannHiloActivatorVal{T}A struct representing the result of the Gann HiLo Activator calculation.
high: The calculated high value ormissingif not enough data.low: The calculated low value ormissingif not enough data.
OnlineTechnicalIndicators.GannSwingChartVal — TypeGannSwingChartVal{T}A struct representing the result of the Gann Swing Chart calculation.
trend: Current trend state (:uptrend or :downtrend)swing_high: Current swing high value or missingswing_low: Current swing low value or missingtrend_changed: Boolean indicating if trend changed in this period
OnlineTechnicalIndicators.KSTVal — TypeKSTVal{Tval}Return value type for Know Sure Thing (KST) indicator.
Fields
kst::Tval: KST line (weighted sum of smoothed ROC values)signal::Union{Missing,Tval}: Signal line (moving average of KST)
See also: KST
OnlineTechnicalIndicators.KeltnerChannelsVal — TypeKeltnerChannelsVal{Tval}Return value type for Keltner Channels indicator.
Fields
lower::Tval: Lower channel (central - ATR * multiplier)central::Tval: Central line (moving average)upper::Tval: Upper channel (central + ATR * multiplier)
See also: KeltnerChannels
OnlineTechnicalIndicators.MACDVal — TypeMACDVal{Tval}Return value type for Moving Average Convergence Divergence indicator.
Fields
macd::Union{Missing,Tval}: MACD line (fast MA - slow MA)signal::Union{Missing,Tval}: Signal line (MA of MACD line)histogram::Union{Missing,Tval}: MACD histogram (MACD - signal)
See also: MACD
OnlineTechnicalIndicators.ParabolicSARVal — TypeParabolicSARVal{Tval}Return value type for Parabolic SAR indicator.
Fields
value::Tval: SAR value (stop and reverse price level)trend::SARTrend.TrendEnum: Current trend direction (UP or DOWN)ep::Tval: Extreme point (highest high or lowest low)accel_factor::Tval: Current acceleration factor
See also: ParabolicSAR
OnlineTechnicalIndicators.PeakValleyVal — TypePeakValleyVal{T}A struct representing detected peaks and valleys.
peak: Current peak value or missingvalley: Current valley value or missingpeak_bar_index: Index of peak bar or missingvalley_bar_index: Index of valley bar or missingis_new_peak: Boolean indicating if this is a newly detected peakis_new_valley: Boolean indicating if this is a newly detected valley
OnlineTechnicalIndicators.PivotsHLVal — TypePivotsHLVal{Tohlcv}Return value type for High/Low Pivots indicator.
Fields
ohlcv::Tohlcv: OHLCV data at the pivot pointtype::HLType.HLTypeEnum: Type of pivot (HIGH or LOW)isnew::Bool: Whether this is a new pivot point
See also: PivotsHL
OnlineTechnicalIndicators.RetracementVal — TypeRetracementVal{T}A struct representing retracement calculation results.
retracement_38_long: 38% retracement level for long positions (B - (B-A) × 0.38)retracement_38_short: 38% retracement level for short positions (B + (A-B) × 0.38)swing_start: Point A of the swingswing_end: Point B of the swingcurrent_retracement_pct: Current retracement percentage from swing_endis_38_retracement_hit: Boolean indicating if 38% retracement was hit
OnlineTechnicalIndicators.SFXVal — TypeSFXVal{Tval}Return value type for SFX indicator.
Fields
atr::Union{Missing,Tval}: Average True Rangestd_dev::Tval: Standard deviation of pricema_std_dev::Union{Missing,Tval}: Moving average of standard deviation
See also: SFX
OnlineTechnicalIndicators.SupportResistanceLevelVal — TypeSupportResistanceLevelVal{T}A struct representing support and resistance levels.
support_level: Current support level (previous valley)resistance_level: Current resistance level (previous peak)support_active: Boolean indicating if support is holdingresistance_active: Boolean indicating if resistance is holdingsupport_broken: Boolean indicating if support was broken this periodresistance_broken: Boolean indicating if resistance was broken this period
OnlineTechnicalIndicators.StochVal — TypeStochVal{Tprice}Return value type for Stochastic oscillator indicator.
Fields
k::Tprice: %K line (fast stochastic)d::Union{Missing,Tprice}: %D line (slow stochastic, smoothed %K)
See also: Stoch
OnlineTechnicalIndicators.StochRSIVal — TypeStochRSIVal{Tval}Return value type for Stochastic RSI indicator.
Fields
k::Tval: %K line (stochastic of RSI)d::Union{Missing,Tval}: %D line (smoothed %K)
See also: StochRSI
OnlineTechnicalIndicators.SuperTrendVal — TypeSuperTrendVal{Tval}Return value type for Super Trend indicator.
Fields
value::Tval: Super Trend value (support/resistance level)trend::Trend.TrendEnum: Current trend direction (UP or DOWN)
See also: SuperTrend
OnlineTechnicalIndicators.TTMVal — TypeTTMVal{Tval}Return value type for TTM Squeeze indicator.
Fields
squeeze::Bool: Squeeze status (true = squeeze on, false = squeeze off)histogram::Tval: Momentum histogram value
See also: TTM
OnlineTechnicalIndicators.VTXVal — TypeVTXVal{Tval}Return value type for Vortex Indicator.
Fields
plus_vtx::Tval: Plus Vortex Indicator (+VI)minus_vtx::Tval: Minus Vortex Indicator (-VI)
See also: VTX
Core Types
OnlineTechnicalIndicators.OHLCV — TypeOHLCV{Ttime,Tprice,Tvol}Represents OHLCV (Open, High, Low, Close, Volume) candlestick data with optional timestamp.
Fields
open::Tprice: Opening price of the periodhigh::Tprice: Highest price during the periodlow::Tprice: Lowest price during the periodclose::Tprice: Closing price of the periodvolume::Tvol: Trading volume during the period (optional, defaults tomissing)time::Ttime: Timestamp of the candlestick (optional, defaults tomissing)
OnlineTechnicalIndicators.OHLCVFactory — TypeOHLCVFactory{Ttime,Tprice,Tvol}Factory for creating multiple OHLCV candlesticks from vectors of price data.
Fields
open::Vector{Tprice}: Vector of opening priceshigh::Vector{Tprice}: Vector of high priceslow::Vector{Tprice}: Vector of low pricesclose::Vector{Tprice}: Vector of closing pricesvolume::Vector{Tvol}: Vector of volumes (optional)time::Vector{Ttime}: Vector of timestamps (optional)
Use Base.collect(factory) to generate a vector of OHLCV instances.
OnlineTechnicalIndicators.MAFactory — TypeMAFactoryFactory for creating moving average indicators with a specific type parameter.
Fields
T::Type: The type parameter to use when constructing the moving average indicator
Usage
factory = MAFactory(Float64)
ma = factory(SMA, period = 10) # Creates SMA{Float64}(period = 10)OnlineTechnicalIndicators.SampleData.TabOHLCV — TypeTabOHLCVSample OHLCV data table implementing the Tables.jl interface.
Contains template financial data with Date indices and Float64 price/volume values.
Fields
Index::Vector{Date}: Vector of datesOpen::Vector{Float64}: Opening pricesHigh::Vector{Float64}: High pricesLow::Vector{Float64}: Low pricesClose::Vector{Float64}: Closing pricesVolume::Vector{Float64}: Trading volumes
OnlineTechnicalIndicators.TechnicalIndicatorWrapper — TypeTechnicalIndicatorWrapper{T}Wraps a technical indicator type with its constructor arguments for deferred instantiation.
Fields
indicator_type::T: The type of technical indicator to constructargs::Tuple: Positional arguments for the indicator constructorkwargs::Base.Pairs: Keyword arguments for the indicator constructor
OnlineTechnicalIndicators.TechnicalIndicatorResults — TypeTechnicalIndicatorResults{Ttime,Tout}Container for technical indicator results implementing the Tables.jl interface.
Fields
name::Symbol: Name of the indicatorfieldnames::Tuple: Names of the output fieldsfieldtypes::Tuple: Types of the output fieldsindex::Vector{Ttime}: Vector of timestamps/indicesoutput::Vector{Tout}: Vector of indicator output values
OnlineTechnicalIndicators.Resample.SamplingPeriod — TypeSamplingPeriodDefines a time period for resampling data.
Fields
type::TimeUnitType.TimeUnitTypeEnum: Type of time unit (SEC, MIN, HOUR, DAY)length::Integer: Length of the period in the specified time units
OnlineTechnicalIndicators.Resample.Resampler — TypeResamplerResamples time-series data according to a specified sampling period.
Fields
sampling_period::SamplingPeriod: The sampling period to use for resampling
OnlineTechnicalIndicators.Resample.TimedEvent — TypeTimedEventRepresents a data point with an associated timestamp.
Fields
time: Timestamp of the eventdata: The data value at this time
OnlineTechnicalIndicators.Resample.AgregatedStat — TypeAgregatedStatHolds aggregated statistical data for a time period.
Fields
time: Timestamp of the aggregated perioddata: The aggregated statistical value
OnlineTechnicalIndicators.Resample.StatBuilder — TypeStatBuilderBuilder for creating new statistical aggregation instances.
Fields
agg: A callable that creates new aggregation instances when invoked
OnlineTechnicalIndicators.Resample.OHLC — TypeOHLC{Tprice}Mutable OHLC (Open, High, Low, Close) data structure for resampling price data.
Fields
status::OHLCStatus.OHLCStatusEnum: Status of the OHLC data (INIT, NEW, USED)open::Tprice: Opening pricehigh::Tprice: Highest pricelow::Tprice: Lowest priceclose::Tprice: Closing price
OnlineTechnicalIndicators.Resample.OHLCStat — TypeOHLCStat{T} <: OnlineStat{T}Online statistic for computing OHLC values from streaming price data.
Fields
ohlc::OHLC: The current OHLC valuesn::Int: Number of observations processed
OnlineTechnicalIndicators.Resample.ResamplerBy — TypeResamplerBy <: OnlineStat{TimedEvent}Online statistic that resamples timed events into aggregated periods.
Fields
agg::AgregatedStat: Current aggregated statisticn::Int: Number of observations processedsampling_period::SamplingPeriod: The sampling period to usestat_builder::StatBuilder: Builder for creating new aggregation instancesinput_modifier::Function: Function to modify input data before processinginput_filter::Function: Function to filter input data
Other
OnlineTechnicalIndicators.StatLag — TypeStatLag(ind, b)Track a moving window (previous b copies) of ind.
Example
ind = SMA{Float64}(period = 3)
prices = [10.81, 10.58, 10.07, 10.58, 10.56, 10.4, 10.74, 10.16, 10.29, 9.4, 9.62]
ind = StatLag(ind, 4)
fit!(ind, prices)
ind.lag[end-1]OnlineTechnicalIndicators.TechnicalIndicatorIterator — TypeTechnicalIndicatorIterator(indicator_type, iterable_input, args...; kwargs...)Returns an iterator.
Example
using OnlineTechnicalIndicators
using OnlineTechnicalIndicators.SampleData: CLOSE_TMPLSISO indicator
itr = TechnicalIndicatorIterator(SMA, CLOSE_TMPL; period = 3)
println("First iteration")
for val in itr
println(val)
end
println("")
println("Second iteration")
Iterators.reset!(itr)
for val in itr
println(val)
end
println("")
println("Third iteration with collect")
# itr = TechnicalIndicatorIterator(SMA, CLOSE_TMPL; period = 3)
# or
Iterators.reset!(itr)
println(eltype(itr))
println(collect(itr))
println("")SIMO indicator
itr = TechnicalIndicatorIterator(BB, CLOSE_TMPL)
println(collect(itr))OnlineTechnicalIndicators.update_levels! — Functionupdate_levels!(sr::SupportResistanceLevel, peak_valley_val)Update support and resistance levels from external peak/valley detection. This method allows integration with PeakValleyDetector results.