Skip to main content

wickra_core/indicators/
mod.rs

1//! Built-in indicators. Every indicator implements [`crate::Indicator`].
2//!
3//! Modules are listed alphabetically; the canonical family taxonomy lives in
4//! [`FAMILIES`]. Every public name is re-exported flat from this module and
5//! from the crate root for convenience.
6
7// Internal shared building block for the chart- and harmonic-pattern detectors.
8// Declared `pub(crate)` (not `mod`) so it is excluded from the public-catalogue
9// counter (`grep -c '^mod '`) and re-exported nowhere.
10pub(crate) mod pattern_swing;
11
12mod abandoned_baby;
13mod abcd;
14mod absolute_breadth_index;
15mod acceleration_bands;
16mod accelerator_oscillator;
17mod ad_oscillator;
18mod ad_volume_line;
19mod adaptive_cycle;
20mod adl;
21mod advance_block;
22mod advance_decline;
23mod advance_decline_ratio;
24mod adx;
25mod adxr;
26mod alligator;
27mod alma;
28mod alpha;
29mod anchored_rsi;
30mod anchored_vwap;
31mod apo;
32mod aroon;
33mod aroon_oscillator;
34mod atr;
35mod atr_bands;
36mod atr_trailing_stop;
37mod autocorrelation;
38mod average_daily_range;
39mod average_drawdown;
40mod avg_price;
41mod awesome_oscillator;
42mod awesome_oscillator_histogram;
43mod balance_of_power;
44mod bat;
45mod belt_hold;
46mod beta;
47mod beta_neutral_spread;
48mod bollinger;
49mod bollinger_bandwidth;
50mod breadth_thrust;
51mod breakaway;
52mod bullish_percent_index;
53mod butterfly;
54mod calendar_spread;
55mod calmar_ratio;
56mod camarilla_pivots;
57mod cci;
58mod center_of_gravity;
59mod cfo;
60mod chaikin_oscillator;
61mod chaikin_volatility;
62mod chande_kroll_stop;
63mod chandelier_exit;
64mod choppiness_index;
65mod classic_pivots;
66mod closing_marubozu;
67mod cmf;
68mod cmo;
69mod coefficient_of_variation;
70mod cointegration;
71mod concealing_baby_swallow;
72mod conditional_value_at_risk;
73mod connors_rsi;
74mod coppock;
75mod counterattack;
76mod crab;
77mod cumulative_volume_index;
78mod cup_and_handle;
79mod cvd;
80mod cybernetic_cycle;
81mod cypher;
82mod day_of_week_profile;
83mod decycler;
84mod decycler_oscillator;
85mod dema;
86mod demand_index;
87mod demark_pivots;
88mod depth_slope;
89mod detrended_std_dev;
90mod distance_ssd;
91mod doji;
92mod doji_star;
93mod donchian;
94mod donchian_stop;
95mod double_bollinger;
96mod double_top_bottom;
97mod downside_gap_three_methods;
98mod dpo;
99mod dragonfly_doji;
100mod drawdown_duration;
101mod dx;
102mod ease_of_movement;
103mod effective_spread;
104mod ehlers_stochastic;
105mod elder_impulse;
106mod ema;
107mod empirical_mode_decomposition;
108mod engulfing;
109mod evening_doji_star;
110mod evwma;
111mod falling_three_methods;
112mod fama;
113mod fibonacci_pivots;
114mod fisher_transform;
115mod flag_pennant;
116mod footprint;
117mod force_index;
118mod fractal_chaos_bands;
119mod frama;
120mod funding_basis;
121mod funding_rate;
122mod funding_rate_mean;
123mod funding_rate_zscore;
124mod gain_loss_ratio;
125mod gap_side_by_side_white;
126mod garman_klass;
127mod gartley;
128mod granger_causality;
129mod gravestone_doji;
130mod hammer;
131mod hanging_man;
132mod harami;
133mod head_and_shoulders;
134mod heikin_ashi;
135mod high_low_index;
136mod high_wave;
137mod hikkake;
138mod hikkake_modified;
139mod hilbert_dominant_cycle;
140mod hilo_activator;
141mod historical_volatility;
142mod hma;
143mod homing_pigeon;
144mod ht_dcphase;
145mod ht_phasor;
146mod ht_trendmode;
147mod hurst_channel;
148mod hurst_exponent;
149mod ichimoku;
150mod identical_three_crows;
151mod in_neck;
152mod inertia;
153mod information_ratio;
154mod initial_balance;
155mod instantaneous_trendline;
156mod intraday_volatility_profile;
157mod inverse_fisher_transform;
158mod inverted_hammer;
159mod jma;
160mod kagi_bars;
161mod kalman_hedge_ratio;
162mod kama;
163mod kelly_criterion;
164mod keltner;
165mod kicking;
166mod kicking_by_length;
167mod kst;
168mod kurtosis;
169mod kvo;
170mod kyles_lambda;
171mod ladder_bottom;
172mod laguerre_rsi;
173mod lead_lag_cross_correlation;
174mod linreg;
175mod linreg_angle;
176mod linreg_channel;
177mod linreg_intercept;
178mod linreg_slope;
179mod liquidation_features;
180mod long_legged_doji;
181mod long_line;
182mod long_short_ratio;
183mod ma_envelope;
184mod macd;
185mod macd_ext;
186mod macd_fix;
187mod mama;
188mod market_facilitation_index;
189mod marubozu;
190mod mass_index;
191mod mat_hold;
192mod matching_low;
193mod max_drawdown;
194mod mcclellan_oscillator;
195mod mcclellan_summation_index;
196mod mcginley_dynamic;
197mod median_absolute_deviation;
198mod median_price;
199mod mfi;
200mod microprice;
201mod mid_point;
202mod mid_price;
203mod minus_di;
204mod minus_dm;
205mod mom;
206mod morning_doji_star;
207mod morning_evening_star;
208mod natr;
209mod new_highs_new_lows;
210mod nvi;
211mod ob_imbalance_full;
212mod ob_imbalance_top1;
213mod ob_imbalance_topn;
214mod obv;
215mod oi_delta;
216mod oi_price_divergence;
217mod oi_weighted;
218mod omega_ratio;
219mod on_neck;
220mod opening_marubozu;
221mod opening_range;
222mod ou_half_life;
223mod overnight_gap;
224mod overnight_intraday_return;
225mod pain_index;
226mod pair_spread_zscore;
227mod pairwise_beta;
228mod parkinson;
229mod pearson_correlation;
230mod percent_above_ma;
231mod percent_b;
232mod percentage_trailing_stop;
233mod pgo;
234mod piercing_dark_cloud;
235mod plus_di;
236mod plus_dm;
237mod pmo;
238mod point_and_figure_bars;
239mod ppo;
240mod profit_factor;
241mod psar;
242mod pvi;
243mod quoted_spread;
244mod r_squared;
245mod realized_spread;
246mod recovery_factor;
247mod rectangle_range;
248mod relative_strength_ab;
249mod renko_bars;
250mod renko_trailing_stop;
251mod rickshaw_man;
252mod rising_three_methods;
253mod roc;
254mod rocp;
255mod rocr;
256mod rocr100;
257mod rogers_satchell;
258mod rolling_correlation;
259mod rolling_covariance;
260mod roofing_filter;
261mod rsi;
262mod rvi;
263mod rvi_volatility;
264mod rwi;
265mod sar_ext;
266mod seasonal_z_score;
267mod separating_lines;
268mod session_high_low;
269mod session_range;
270mod session_vwap;
271mod shark;
272mod sharpe_ratio;
273mod shooting_star;
274mod short_line;
275mod signed_volume;
276mod sine_wave;
277mod skewness;
278mod sma;
279mod smi;
280mod smma;
281mod sortino_ratio;
282mod spearman_correlation;
283mod spinning_top;
284mod spread_bollinger_bands;
285mod spread_hurst;
286mod stalled_pattern;
287mod standard_error;
288mod standard_error_bands;
289mod starc_bands;
290mod stc;
291mod std_dev;
292mod step_trailing_stop;
293mod stick_sandwich;
294mod stoch_rsi;
295mod stochastic;
296mod super_smoother;
297mod super_trend;
298mod t3;
299mod taker_buy_sell_ratio;
300mod takuri;
301mod tasuki_gap;
302mod td_combo;
303mod td_countdown;
304mod td_demarker;
305mod td_differential;
306mod td_lines;
307mod td_open;
308mod td_pressure;
309mod td_range_projection;
310mod td_rei;
311mod td_risk_level;
312mod td_sequential;
313mod td_setup;
314mod tema;
315mod term_structure_basis;
316mod three_drives;
317mod three_inside;
318mod three_line_strike;
319mod three_outside;
320mod three_soldiers_or_crows;
321mod three_stars_in_south;
322mod thrusting;
323mod tick_index;
324mod tii;
325mod time_of_day_return_profile;
326mod tpo_profile;
327mod trade_imbalance;
328mod treynor_ratio;
329mod triangle;
330mod trima;
331mod trin;
332mod triple_top_bottom;
333mod trix;
334mod true_range;
335mod tsf;
336mod tsi;
337mod tsv;
338mod ttm_squeeze;
339mod turn_of_month;
340mod tweezer;
341mod two_crows;
342mod typical_price;
343mod ulcer_index;
344mod ultimate_oscillator;
345mod unique_three_river;
346mod up_down_volume_ratio;
347mod upside_gap_three_methods;
348mod upside_gap_two_crows;
349mod value_area;
350mod value_at_risk;
351mod variance;
352mod variance_ratio;
353mod vertical_horizontal_filter;
354mod vidya;
355mod volty_stop;
356mod volume_by_time_profile;
357mod volume_oscillator;
358mod volume_profile;
359mod vortex;
360mod vpt;
361mod vwap;
362mod vwap_stddev_bands;
363mod vwma;
364mod vzo;
365mod wave_trend;
366mod wedge;
367mod weighted_close;
368mod williams_fractals;
369mod williams_r;
370mod wma;
371mod woodie_pivots;
372mod yang_zhang;
373mod yoyo_exit;
374mod z_score;
375mod zero_lag_macd;
376mod zig_zag;
377mod zlema;
378
379pub use abandoned_baby::AbandonedBaby;
380pub use abcd::Abcd;
381pub use absolute_breadth_index::AbsoluteBreadthIndex;
382pub use acceleration_bands::{AccelerationBands, AccelerationBandsOutput};
383pub use accelerator_oscillator::AcceleratorOscillator;
384pub use ad_oscillator::AdOscillator;
385pub use ad_volume_line::AdVolumeLine;
386pub use adaptive_cycle::AdaptiveCycle;
387pub use adl::Adl;
388pub use advance_block::AdvanceBlock;
389pub use advance_decline::AdvanceDecline;
390pub use advance_decline_ratio::AdvanceDeclineRatio;
391pub use adx::{Adx, AdxOutput};
392pub use adxr::Adxr;
393pub use alligator::{Alligator, AlligatorOutput};
394pub use alma::Alma;
395pub use alpha::Alpha;
396pub use anchored_rsi::AnchoredRsi;
397pub use anchored_vwap::AnchoredVwap;
398pub use apo::Apo;
399pub use aroon::{Aroon, AroonOutput};
400pub use aroon_oscillator::AroonOscillator;
401pub use atr::Atr;
402pub use atr_bands::{AtrBands, AtrBandsOutput};
403pub use atr_trailing_stop::AtrTrailingStop;
404pub use autocorrelation::Autocorrelation;
405pub use average_daily_range::AverageDailyRange;
406pub use average_drawdown::AverageDrawdown;
407pub use avg_price::AvgPrice;
408pub use awesome_oscillator::AwesomeOscillator;
409pub use awesome_oscillator_histogram::AwesomeOscillatorHistogram;
410pub use balance_of_power::BalanceOfPower;
411pub use bat::Bat;
412pub use belt_hold::BeltHold;
413pub use beta::Beta;
414pub use beta_neutral_spread::BetaNeutralSpread;
415pub use bollinger::{BollingerBands, BollingerOutput};
416pub use bollinger_bandwidth::BollingerBandwidth;
417pub use breadth_thrust::BreadthThrust;
418pub use breakaway::Breakaway;
419pub use bullish_percent_index::BullishPercentIndex;
420pub use butterfly::Butterfly;
421pub use calendar_spread::CalendarSpread;
422pub use calmar_ratio::CalmarRatio;
423pub use camarilla_pivots::{Camarilla, CamarillaPivotsOutput};
424pub use cci::Cci;
425pub use center_of_gravity::CenterOfGravity;
426pub use cfo::Cfo;
427pub use chaikin_oscillator::ChaikinOscillator;
428pub use chaikin_volatility::ChaikinVolatility;
429pub use chande_kroll_stop::{ChandeKrollStop, ChandeKrollStopOutput};
430pub use chandelier_exit::{ChandelierExit, ChandelierExitOutput};
431pub use choppiness_index::ChoppinessIndex;
432pub use classic_pivots::{ClassicPivots, ClassicPivotsOutput};
433pub use closing_marubozu::ClosingMarubozu;
434pub use cmf::ChaikinMoneyFlow;
435pub use cmo::Cmo;
436pub use coefficient_of_variation::CoefficientOfVariation;
437pub use cointegration::{Cointegration, CointegrationOutput};
438pub use concealing_baby_swallow::ConcealingBabySwallow;
439pub use conditional_value_at_risk::ConditionalValueAtRisk;
440pub use connors_rsi::ConnorsRsi;
441pub use coppock::Coppock;
442pub use counterattack::Counterattack;
443pub use crab::Crab;
444pub use cumulative_volume_index::CumulativeVolumeIndex;
445pub use cup_and_handle::CupAndHandle;
446pub use cvd::CumulativeVolumeDelta;
447pub use cybernetic_cycle::CyberneticCycle;
448pub use cypher::Cypher;
449pub use day_of_week_profile::{DayOfWeekProfile, DayOfWeekProfileOutput};
450pub use decycler::Decycler;
451pub use decycler_oscillator::DecyclerOscillator;
452pub use dema::Dema;
453pub use demand_index::DemandIndex;
454pub use demark_pivots::{DemarkPivots, DemarkPivotsOutput};
455pub use depth_slope::DepthSlope;
456pub use detrended_std_dev::DetrendedStdDev;
457pub use distance_ssd::DistanceSsd;
458pub use doji::Doji;
459pub use doji_star::DojiStar;
460pub use donchian::{Donchian, DonchianOutput};
461pub use donchian_stop::{DonchianStop, DonchianStopOutput};
462pub use double_bollinger::{DoubleBollinger, DoubleBollingerOutput};
463pub use double_top_bottom::DoubleTopBottom;
464pub use downside_gap_three_methods::DownsideGapThreeMethods;
465pub use dpo::Dpo;
466pub use dragonfly_doji::DragonflyDoji;
467pub use drawdown_duration::DrawdownDuration;
468pub use dx::Dx;
469pub use ease_of_movement::EaseOfMovement;
470pub use effective_spread::EffectiveSpread;
471pub use ehlers_stochastic::EhlersStochastic;
472pub use elder_impulse::ElderImpulse;
473pub use ema::Ema;
474pub use empirical_mode_decomposition::EmpiricalModeDecomposition;
475pub use engulfing::Engulfing;
476pub use evening_doji_star::EveningDojiStar;
477pub use evwma::Evwma;
478pub use falling_three_methods::FallingThreeMethods;
479pub use fama::Fama;
480pub use fibonacci_pivots::{FibonacciPivots, FibonacciPivotsOutput};
481pub use fisher_transform::FisherTransform;
482pub use flag_pennant::FlagPennant;
483pub use footprint::{Footprint, FootprintLevel, FootprintOutput};
484pub use force_index::ForceIndex;
485pub use fractal_chaos_bands::{FractalChaosBands, FractalChaosBandsOutput};
486pub use frama::Frama;
487pub use funding_basis::FundingBasis;
488pub use funding_rate::FundingRate;
489pub use funding_rate_mean::FundingRateMean;
490pub use funding_rate_zscore::FundingRateZScore;
491pub use gain_loss_ratio::GainLossRatio;
492pub use gap_side_by_side_white::GapSideBySideWhite;
493pub use garman_klass::GarmanKlassVolatility;
494pub use gartley::Gartley;
495pub use granger_causality::GrangerCausality;
496pub use gravestone_doji::GravestoneDoji;
497pub use hammer::Hammer;
498pub use hanging_man::HangingMan;
499pub use harami::Harami;
500pub use head_and_shoulders::HeadAndShoulders;
501pub use heikin_ashi::{HeikinAshi, HeikinAshiOutput};
502pub use high_low_index::HighLowIndex;
503pub use high_wave::HighWave;
504pub use hikkake::Hikkake;
505pub use hikkake_modified::HikkakeModified;
506pub use hilbert_dominant_cycle::HilbertDominantCycle;
507pub use hilo_activator::HiLoActivator;
508pub use historical_volatility::HistoricalVolatility;
509pub use hma::Hma;
510pub use homing_pigeon::HomingPigeon;
511pub use ht_dcphase::HtDcPhase;
512pub use ht_phasor::{HtPhasor, HtPhasorOutput};
513pub use ht_trendmode::HtTrendMode;
514pub use hurst_channel::{HurstChannel, HurstChannelOutput};
515pub use hurst_exponent::HurstExponent;
516pub use ichimoku::{Ichimoku, IchimokuOutput};
517pub use identical_three_crows::IdenticalThreeCrows;
518pub use in_neck::InNeck;
519pub use inertia::Inertia;
520pub use information_ratio::InformationRatio;
521pub use initial_balance::{InitialBalance, InitialBalanceOutput};
522pub use instantaneous_trendline::InstantaneousTrendline;
523pub use intraday_volatility_profile::{IntradayVolatilityProfile, IntradayVolatilityProfileOutput};
524pub use inverse_fisher_transform::InverseFisherTransform;
525pub use inverted_hammer::InvertedHammer;
526pub use jma::Jma;
527pub use kagi_bars::{KagiBar, KagiBars};
528pub use kalman_hedge_ratio::{KalmanHedgeRatio, KalmanHedgeRatioOutput};
529pub use kama::Kama;
530pub use kelly_criterion::KellyCriterion;
531pub use keltner::{Keltner, KeltnerOutput};
532pub use kicking::Kicking;
533pub use kicking_by_length::KickingByLength;
534pub use kst::{Kst, KstOutput};
535pub use kurtosis::Kurtosis;
536pub use kvo::Kvo;
537pub use kyles_lambda::KylesLambda;
538pub use ladder_bottom::LadderBottom;
539pub use laguerre_rsi::LaguerreRsi;
540pub use lead_lag_cross_correlation::{LeadLagCrossCorrelation, LeadLagCrossCorrelationOutput};
541pub use linreg::LinearRegression;
542pub use linreg_angle::LinRegAngle;
543pub use linreg_channel::{LinRegChannel, LinRegChannelOutput};
544pub use linreg_intercept::LinRegIntercept;
545pub use linreg_slope::LinRegSlope;
546pub use liquidation_features::{LiquidationFeatures, LiquidationFeaturesOutput};
547pub use long_legged_doji::LongLeggedDoji;
548pub use long_line::LongLine;
549pub use long_short_ratio::LongShortRatio;
550pub use ma_envelope::{MaEnvelope, MaEnvelopeOutput};
551pub use macd::{MacdIndicator, MacdOutput};
552pub use macd_ext::{MaType, MacdExt};
553pub use macd_fix::MacdFix;
554pub use mama::{Mama, MamaOutput};
555pub use market_facilitation_index::MarketFacilitationIndex;
556pub use marubozu::Marubozu;
557pub use mass_index::MassIndex;
558pub use mat_hold::MatHold;
559pub use matching_low::MatchingLow;
560pub use max_drawdown::MaxDrawdown;
561pub use mcclellan_oscillator::McClellanOscillator;
562pub use mcclellan_summation_index::McClellanSummationIndex;
563pub use mcginley_dynamic::McGinleyDynamic;
564pub use median_absolute_deviation::MedianAbsoluteDeviation;
565pub use median_price::MedianPrice;
566pub use mfi::Mfi;
567pub use microprice::Microprice;
568pub use mid_point::MidPoint;
569pub use mid_price::MidPrice;
570pub use minus_di::MinusDi;
571pub use minus_dm::MinusDm;
572pub use mom::Mom;
573pub use morning_doji_star::MorningDojiStar;
574pub use morning_evening_star::MorningEveningStar;
575pub use natr::Natr;
576pub use new_highs_new_lows::NewHighsNewLows;
577pub use nvi::Nvi;
578pub use ob_imbalance_full::OrderBookImbalanceFull;
579pub use ob_imbalance_top1::OrderBookImbalanceTop1;
580pub use ob_imbalance_topn::OrderBookImbalanceTopN;
581pub use obv::Obv;
582pub use oi_delta::OpenInterestDelta;
583pub use oi_price_divergence::OIPriceDivergence;
584pub use oi_weighted::OIWeighted;
585pub use omega_ratio::OmegaRatio;
586pub use on_neck::OnNeck;
587pub use opening_marubozu::OpeningMarubozu;
588pub use opening_range::{OpeningRange, OpeningRangeOutput};
589pub use ou_half_life::OuHalfLife;
590pub use overnight_gap::OvernightGap;
591pub use overnight_intraday_return::{OvernightIntradayReturn, OvernightIntradayReturnOutput};
592pub use pain_index::PainIndex;
593pub use pair_spread_zscore::PairSpreadZScore;
594pub use pairwise_beta::PairwiseBeta;
595pub use parkinson::ParkinsonVolatility;
596pub use pearson_correlation::PearsonCorrelation;
597pub use percent_above_ma::PercentAboveMa;
598pub use percent_b::PercentB;
599pub use percentage_trailing_stop::PercentageTrailingStop;
600pub use pgo::Pgo;
601pub use piercing_dark_cloud::PiercingDarkCloud;
602pub use plus_di::PlusDi;
603pub use plus_dm::PlusDm;
604pub use pmo::Pmo;
605pub use point_and_figure_bars::{PnfColumn, PointAndFigureBars};
606pub use ppo::Ppo;
607pub use profit_factor::ProfitFactor;
608pub use psar::Psar;
609pub use pvi::Pvi;
610pub use quoted_spread::QuotedSpread;
611pub use r_squared::RSquared;
612pub use realized_spread::RealizedSpread;
613pub use recovery_factor::RecoveryFactor;
614pub use rectangle_range::RectangleRange;
615pub use relative_strength_ab::{RelativeStrengthAB, RelativeStrengthOutput};
616pub use renko_bars::{RenkoBars, RenkoBrick};
617pub use renko_trailing_stop::RenkoTrailingStop;
618pub use rickshaw_man::RickshawMan;
619pub use rising_three_methods::RisingThreeMethods;
620pub use roc::Roc;
621pub use rocp::Rocp;
622pub use rocr::Rocr;
623pub use rocr100::Rocr100;
624pub use rogers_satchell::RogersSatchellVolatility;
625pub use rolling_correlation::RollingCorrelation;
626pub use rolling_covariance::RollingCovariance;
627pub use roofing_filter::RoofingFilter;
628pub use rsi::Rsi;
629pub use rvi::Rvi;
630pub use rvi_volatility::RviVolatility;
631pub use rwi::{Rwi, RwiOutput};
632pub use sar_ext::SarExt;
633pub use seasonal_z_score::SeasonalZScore;
634pub use separating_lines::SeparatingLines;
635pub use session_high_low::{SessionHighLow, SessionHighLowOutput};
636pub use session_range::{SessionRange, SessionRangeOutput};
637pub use session_vwap::SessionVwap;
638pub use shark::Shark;
639pub use sharpe_ratio::SharpeRatio;
640pub use shooting_star::ShootingStar;
641pub use short_line::ShortLine;
642pub use signed_volume::SignedVolume;
643pub use sine_wave::SineWave;
644pub use skewness::Skewness;
645pub use sma::Sma;
646pub use smi::Smi;
647pub use smma::Smma;
648pub use sortino_ratio::SortinoRatio;
649pub use spearman_correlation::SpearmanCorrelation;
650pub use spinning_top::SpinningTop;
651pub use spread_bollinger_bands::{SpreadBollingerBands, SpreadBollingerBandsOutput};
652pub use spread_hurst::SpreadHurst;
653pub use stalled_pattern::StalledPattern;
654pub use standard_error::StandardError;
655pub use standard_error_bands::{StandardErrorBands, StandardErrorBandsOutput};
656pub use starc_bands::{StarcBands, StarcBandsOutput};
657pub use stc::Stc;
658pub use std_dev::StdDev;
659pub use step_trailing_stop::StepTrailingStop;
660pub use stick_sandwich::StickSandwich;
661pub use stoch_rsi::StochRsi;
662pub use stochastic::{Stochastic, StochasticOutput};
663pub use super_smoother::SuperSmoother;
664pub use super_trend::{SuperTrend, SuperTrendOutput};
665pub use t3::T3;
666pub use taker_buy_sell_ratio::TakerBuySellRatio;
667pub use takuri::Takuri;
668pub use tasuki_gap::TasukiGap;
669pub use td_combo::TdCombo;
670pub use td_countdown::TdCountdown;
671pub use td_demarker::TdDeMarker;
672pub use td_differential::TdDifferential;
673pub use td_lines::{TdLines, TdLinesOutput};
674pub use td_open::TdOpen;
675pub use td_pressure::TdPressure;
676pub use td_range_projection::{TdRangeProjection, TdRangeProjectionOutput};
677pub use td_rei::TdRei;
678pub use td_risk_level::{TdRiskLevel, TdRiskLevelOutput};
679pub use td_sequential::{TdSequential, TdSequentialOutput};
680pub use td_setup::TdSetup;
681pub use tema::Tema;
682pub use term_structure_basis::TermStructureBasis;
683pub use three_drives::ThreeDrives;
684pub use three_inside::ThreeInside;
685pub use three_line_strike::ThreeLineStrike;
686pub use three_outside::ThreeOutside;
687pub use three_soldiers_or_crows::ThreeSoldiersOrCrows;
688pub use three_stars_in_south::ThreeStarsInSouth;
689pub use thrusting::Thrusting;
690pub use tick_index::TickIndex;
691pub use tii::Tii;
692pub use time_of_day_return_profile::{TimeOfDayReturnProfile, TimeOfDayReturnProfileOutput};
693pub use tpo_profile::{TpoProfile, TpoProfileOutput};
694pub use trade_imbalance::TradeImbalance;
695pub use treynor_ratio::TreynorRatio;
696pub use triangle::Triangle;
697pub use trima::Trima;
698pub use trin::Trin;
699pub use triple_top_bottom::TripleTopBottom;
700pub use trix::Trix;
701pub use true_range::TrueRange;
702pub use tsf::Tsf;
703pub use tsi::Tsi;
704pub use tsv::Tsv;
705pub use ttm_squeeze::{TtmSqueeze, TtmSqueezeOutput};
706pub use turn_of_month::TurnOfMonth;
707pub use tweezer::Tweezer;
708pub use two_crows::TwoCrows;
709pub use typical_price::TypicalPrice;
710pub use ulcer_index::UlcerIndex;
711pub use ultimate_oscillator::UltimateOscillator;
712pub use unique_three_river::UniqueThreeRiver;
713pub use up_down_volume_ratio::UpDownVolumeRatio;
714pub use upside_gap_three_methods::UpsideGapThreeMethods;
715pub use upside_gap_two_crows::UpsideGapTwoCrows;
716pub use value_area::{ValueArea, ValueAreaOutput};
717pub use value_at_risk::ValueAtRisk;
718pub use variance::Variance;
719pub use variance_ratio::VarianceRatio;
720pub use vertical_horizontal_filter::VerticalHorizontalFilter;
721pub use vidya::Vidya;
722pub use volty_stop::VoltyStop;
723pub use volume_by_time_profile::{VolumeByTimeProfile, VolumeByTimeProfileOutput};
724pub use volume_oscillator::VolumeOscillator;
725pub use volume_profile::{VolumeProfile, VolumeProfileOutput};
726pub use vortex::{Vortex, VortexOutput};
727pub use vpt::VolumePriceTrend;
728pub use vwap::{RollingVwap, Vwap};
729pub use vwap_stddev_bands::{VwapStdDevBands, VwapStdDevBandsOutput};
730pub use vwma::Vwma;
731pub use vzo::Vzo;
732pub use wave_trend::{WaveTrend, WaveTrendOutput};
733pub use wedge::Wedge;
734pub use weighted_close::WeightedClose;
735pub use williams_fractals::{WilliamsFractals, WilliamsFractalsOutput};
736pub use williams_r::WilliamsR;
737pub use wma::Wma;
738pub use woodie_pivots::{WoodiePivots, WoodiePivotsOutput};
739pub use yang_zhang::YangZhangVolatility;
740pub use yoyo_exit::YoyoExit;
741pub use z_score::ZScore;
742pub use zero_lag_macd::{ZeroLagMacd, ZeroLagMacdOutput};
743pub use zig_zag::{ZigZag, ZigZagOutput};
744pub use zlema::Zlema;
745
746/// Family classification of every built-in indicator. The (family,
747/// indicators) list is the single source of truth used by `family_tests`
748/// below; README and Wiki taxonomy tables should be kept in sync with it.
749///
750/// Each indicator appears in exactly one family. Names are the public
751/// struct identifiers re-exported from this module (and the crate root).
752pub const FAMILIES: &[(&str, &[&str])] = &[
753    (
754        "Moving Averages",
755        &[
756            "Sma",
757            "Ema",
758            "Wma",
759            "Dema",
760            "Tema",
761            "Hma",
762            "Kama",
763            "Smma",
764            "Trima",
765            "Zlema",
766            "T3",
767            "Vwma",
768            "Alma",
769            "McGinleyDynamic",
770            "Frama",
771            "Vidya",
772            "Jma",
773            "Alligator",
774            "Evwma",
775        ],
776    ),
777    (
778        "Momentum Oscillators",
779        &[
780            "Rsi",
781            "AnchoredRsi",
782            "Stochastic",
783            "Cci",
784            "Roc",
785            "WilliamsR",
786            "Mfi",
787            "AwesomeOscillator",
788            "Mom",
789            "Cmo",
790            "Tsi",
791            "Pmo",
792            "StochRsi",
793            "UltimateOscillator",
794            "Rvi",
795            "Pgo",
796            "Kst",
797            "Smi",
798            "LaguerreRsi",
799            "ConnorsRsi",
800            "Inertia",
801            "Rocp",
802            "Rocr",
803            "Rocr100",
804        ],
805    ),
806    (
807        "Trend & Directional",
808        &[
809            "MacdIndicator",
810            "MacdFix",
811            "MacdExt",
812            "Adx",
813            "Adxr",
814            "Aroon",
815            "Trix",
816            "AroonOscillator",
817            "Vortex",
818            "Rwi",
819            "Tii",
820            "WaveTrend",
821            "MassIndex",
822            "ChoppinessIndex",
823            "VerticalHorizontalFilter",
824            "PlusDm",
825            "MinusDm",
826            "PlusDi",
827            "MinusDi",
828            "Dx",
829        ],
830    ),
831    (
832        "Price Oscillators",
833        &[
834            "Ppo",
835            "Dpo",
836            "Coppock",
837            "AcceleratorOscillator",
838            "BalanceOfPower",
839            "Apo",
840            "AwesomeOscillatorHistogram",
841            "Cfo",
842            "ZeroLagMacd",
843            "ElderImpulse",
844            "Stc",
845        ],
846    ),
847    (
848        "Volatility & Bands",
849        &[
850            "Atr",
851            "BollingerBands",
852            "Keltner",
853            "Donchian",
854            "Natr",
855            "StdDev",
856            "UlcerIndex",
857            "HistoricalVolatility",
858            "BollingerBandwidth",
859            "PercentB",
860            "TrueRange",
861            "ChaikinVolatility",
862            "RviVolatility",
863            "ParkinsonVolatility",
864            "GarmanKlassVolatility",
865            "RogersSatchellVolatility",
866            "YangZhangVolatility",
867        ],
868    ),
869    (
870        "Bands & Channels",
871        &[
872            "MaEnvelope",
873            "AccelerationBands",
874            "StarcBands",
875            "AtrBands",
876            "HurstChannel",
877            "LinRegChannel",
878            "StandardErrorBands",
879            "DoubleBollinger",
880            "TtmSqueeze",
881            "FractalChaosBands",
882            "VwapStdDevBands",
883        ],
884    ),
885    (
886        "Trailing Stops",
887        &[
888            "Psar",
889            "SuperTrend",
890            "ChandelierExit",
891            "ChandeKrollStop",
892            "AtrTrailingStop",
893            "HiLoActivator",
894            "VoltyStop",
895            "YoyoExit",
896            "DonchianStop",
897            "PercentageTrailingStop",
898            "StepTrailingStop",
899            "RenkoTrailingStop",
900            "SarExt",
901        ],
902    ),
903    (
904        "Volume",
905        &[
906            "Obv",
907            "Vwap",
908            "RollingVwap",
909            "Adl",
910            "VolumePriceTrend",
911            "ChaikinMoneyFlow",
912            "ChaikinOscillator",
913            "ForceIndex",
914            "EaseOfMovement",
915            "Kvo",
916            "VolumeOscillator",
917            "Nvi",
918            "Pvi",
919            "AdOscillator",
920            "AnchoredVwap",
921            "DemandIndex",
922            "Tsv",
923            "Vzo",
924            "MarketFacilitationIndex",
925        ],
926    ),
927    (
928        "Price Statistics",
929        &[
930            "TypicalPrice",
931            "MedianPrice",
932            "WeightedClose",
933            "LinearRegression",
934            "LinRegSlope",
935            "ZScore",
936            "LinRegAngle",
937            "Variance",
938            "CoefficientOfVariation",
939            "Skewness",
940            "Kurtosis",
941            "StandardError",
942            "DetrendedStdDev",
943            "RSquared",
944            "MedianAbsoluteDeviation",
945            "Autocorrelation",
946            "HurstExponent",
947            "PearsonCorrelation",
948            "Beta",
949            "SpearmanCorrelation",
950            "Cointegration",
951            "LeadLagCrossCorrelation",
952            "PairSpreadZScore",
953            "PairwiseBeta",
954            "RelativeStrengthAB",
955            "MidPrice",
956            "MidPoint",
957            "AvgPrice",
958            "LinRegIntercept",
959            "Tsf",
960            "RollingCorrelation",
961            "RollingCovariance",
962            "OuHalfLife",
963            "SpreadHurst",
964            "DistanceSsd",
965            "BetaNeutralSpread",
966            "VarianceRatio",
967            "GrangerCausality",
968            "KalmanHedgeRatio",
969            "SpreadBollingerBands",
970        ],
971    ),
972    (
973        "Ehlers / Cycle (DSP)",
974        &[
975            "Mama",
976            "Fama",
977            "FisherTransform",
978            "InverseFisherTransform",
979            "SuperSmoother",
980            "HilbertDominantCycle",
981            "HtDcPhase",
982            "HtPhasor",
983            "HtTrendMode",
984            "SineWave",
985            "Decycler",
986            "DecyclerOscillator",
987            "RoofingFilter",
988            "CenterOfGravity",
989            "CyberneticCycle",
990            "AdaptiveCycle",
991            "EmpiricalModeDecomposition",
992            "EhlersStochastic",
993            "InstantaneousTrendline",
994        ],
995    ),
996    (
997        "Pivots & S/R",
998        &[
999            "ClassicPivots",
1000            "FibonacciPivots",
1001            "Camarilla",
1002            "WoodiePivots",
1003            "DemarkPivots",
1004            "WilliamsFractals",
1005            "ZigZag",
1006        ],
1007    ),
1008    (
1009        "DeMark",
1010        &[
1011            "TdSetup",
1012            "TdSequential",
1013            "TdDeMarker",
1014            "TdRei",
1015            "TdPressure",
1016            "TdCombo",
1017            "TdCountdown",
1018            "TdLines",
1019            "TdRangeProjection",
1020            "TdDifferential",
1021            "TdOpen",
1022            "TdRiskLevel",
1023        ],
1024    ),
1025    ("Ichimoku & Charts", &["Ichimoku", "HeikinAshi"]),
1026    (
1027        "Candlestick Patterns",
1028        &[
1029            "Doji",
1030            "Hammer",
1031            "InvertedHammer",
1032            "HangingMan",
1033            "ShootingStar",
1034            "Engulfing",
1035            "Harami",
1036            "MorningEveningStar",
1037            "ThreeSoldiersOrCrows",
1038            "PiercingDarkCloud",
1039            "Marubozu",
1040            "Tweezer",
1041            "SpinningTop",
1042            "ThreeInside",
1043            "ThreeOutside",
1044            "TwoCrows",
1045            "UpsideGapTwoCrows",
1046            "IdenticalThreeCrows",
1047            "ThreeLineStrike",
1048            "ThreeStarsInSouth",
1049            "AbandonedBaby",
1050            "AdvanceBlock",
1051            "BeltHold",
1052            "Breakaway",
1053            "Counterattack",
1054            "DojiStar",
1055            "DragonflyDoji",
1056            "GravestoneDoji",
1057            "LongLeggedDoji",
1058            "RickshawMan",
1059            "EveningDojiStar",
1060            "MorningDojiStar",
1061            "GapSideBySideWhite",
1062            "HighWave",
1063            "Hikkake",
1064            "HikkakeModified",
1065            "HomingPigeon",
1066            "OnNeck",
1067            "InNeck",
1068            "Thrusting",
1069            "SeparatingLines",
1070            "Kicking",
1071            "KickingByLength",
1072            "LadderBottom",
1073            "MatHold",
1074            "MatchingLow",
1075            "LongLine",
1076            "ShortLine",
1077            "RisingThreeMethods",
1078            "FallingThreeMethods",
1079            "UpsideGapThreeMethods",
1080            "DownsideGapThreeMethods",
1081            "StalledPattern",
1082            "StickSandwich",
1083            "Takuri",
1084            "ClosingMarubozu",
1085            "OpeningMarubozu",
1086            "TasukiGap",
1087            "UniqueThreeRiver",
1088            "ConcealingBabySwallow",
1089        ],
1090    ),
1091    (
1092        "Microstructure",
1093        &[
1094            "OrderBookImbalanceTop1",
1095            "OrderBookImbalanceTopN",
1096            "OrderBookImbalanceFull",
1097            "Microprice",
1098            "QuotedSpread",
1099            "DepthSlope",
1100            "SignedVolume",
1101            "CumulativeVolumeDelta",
1102            "TradeImbalance",
1103            "EffectiveSpread",
1104            "RealizedSpread",
1105            "KylesLambda",
1106            "Footprint",
1107        ],
1108    ),
1109    (
1110        "Derivatives",
1111        &[
1112            "FundingRate",
1113            "FundingRateMean",
1114            "FundingRateZScore",
1115            "FundingBasis",
1116            "OpenInterestDelta",
1117            "OIPriceDivergence",
1118            "OIWeighted",
1119            "LongShortRatio",
1120            "TakerBuySellRatio",
1121            "LiquidationFeatures",
1122            "TermStructureBasis",
1123            "CalendarSpread",
1124        ],
1125    ),
1126    (
1127        "Market Profile",
1128        &[
1129            "ValueArea",
1130            "InitialBalance",
1131            "OpeningRange",
1132            "VolumeProfile",
1133            "TpoProfile",
1134        ],
1135    ),
1136    (
1137        "Risk / Performance",
1138        &[
1139            "SharpeRatio",
1140            "SortinoRatio",
1141            "CalmarRatio",
1142            "OmegaRatio",
1143            "MaxDrawdown",
1144            "AverageDrawdown",
1145            "DrawdownDuration",
1146            "PainIndex",
1147            "ValueAtRisk",
1148            "ConditionalValueAtRisk",
1149            "ProfitFactor",
1150            "GainLossRatio",
1151            "RecoveryFactor",
1152            "KellyCriterion",
1153            "TreynorRatio",
1154            "InformationRatio",
1155            "Alpha",
1156        ],
1157    ),
1158    (
1159        "Alt-Chart Bars",
1160        &["RenkoBars", "KagiBars", "PointAndFigureBars"],
1161    ),
1162    (
1163        "Market Breadth",
1164        &[
1165            "AdvanceDecline",
1166            "AdvanceDeclineRatio",
1167            "AdVolumeLine",
1168            "McClellanOscillator",
1169            "McClellanSummationIndex",
1170            "Trin",
1171            "BreadthThrust",
1172            "NewHighsNewLows",
1173            "HighLowIndex",
1174            "PercentAboveMa",
1175            "UpDownVolumeRatio",
1176            "BullishPercentIndex",
1177            "CumulativeVolumeIndex",
1178            "AbsoluteBreadthIndex",
1179            "TickIndex",
1180        ],
1181    ),
1182    (
1183        "Seasonality & Session",
1184        &[
1185            "SessionVwap",
1186            "SessionHighLow",
1187            "SessionRange",
1188            "AverageDailyRange",
1189            "OvernightGap",
1190            "OvernightIntradayReturn",
1191            "TurnOfMonth",
1192            "SeasonalZScore",
1193            "TimeOfDayReturnProfile",
1194            "DayOfWeekProfile",
1195            "IntradayVolatilityProfile",
1196            "VolumeByTimeProfile",
1197        ],
1198    ),
1199    (
1200        "Chart Patterns",
1201        &[
1202            "DoubleTopBottom",
1203            "TripleTopBottom",
1204            "HeadAndShoulders",
1205            "Triangle",
1206            "Wedge",
1207            "FlagPennant",
1208            "RectangleRange",
1209            "CupAndHandle",
1210        ],
1211    ),
1212    (
1213        "Harmonic Patterns",
1214        &[
1215            "Abcd",
1216            "Gartley",
1217            "Butterfly",
1218            "Bat",
1219            "Crab",
1220            "Shark",
1221            "Cypher",
1222            "ThreeDrives",
1223        ],
1224    ),
1225];
1226
1227#[cfg(test)]
1228mod family_tests {
1229    use super::FAMILIES;
1230
1231    #[test]
1232    fn no_duplicates_across_families() {
1233        let mut names: Vec<&str> = FAMILIES
1234            .iter()
1235            .flat_map(|(_, ns)| ns.iter().copied())
1236            .collect();
1237        let len_before = names.len();
1238        names.sort_unstable();
1239        names.dedup();
1240        assert_eq!(
1241            names.len(),
1242            len_before,
1243            "duplicate indicator across families"
1244        );
1245    }
1246
1247    #[test]
1248    fn total_count_matches_expected() {
1249        // Bump together with new indicators. Drift between this number and
1250        // the actual indicator count is the early-warning signal that an
1251        // indicator was added without being assigned a family.
1252        let total: usize = FAMILIES.iter().map(|(_, ns)| ns.len()).sum();
1253        assert_eq!(total, 367, "FAMILIES total drifted from indicator count");
1254    }
1255}