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