Skip to main content

quantwave_core/indicators/
pattern.rs

1use crate::indicators::metadata::IndicatorMetadata;
2#[allow(unused_imports)]
3use crate::traits::Next;
4pub use crate::indicators::incremental::cdl_doji::CDLDOJI;
5native_cdl!(CDLHAMMER, talib_rs::pattern::cdl_hammer);
6impl Default for CDLHAMMER {
7    fn default() -> Self {
8        Self::new()
9    }
10}
11native_cdl!(CDLENGULFING, talib_rs::pattern::cdl_engulfing);
12impl Default for CDLENGULFING {
13    fn default() -> Self {
14        Self::new()
15    }
16}
17native_cdl!(CDLCLOSINGMARUBOZU, talib_rs::pattern::cdl_closingmarubozu);
18impl Default for CDLCLOSINGMARUBOZU {
19    fn default() -> Self {
20        Self::new()
21    }
22}
23native_cdl!(CDLDRAGONFLYDOJI, talib_rs::pattern::cdl_dragonflydoji);
24impl Default for CDLDRAGONFLYDOJI {
25    fn default() -> Self {
26        Self::new()
27    }
28}
29native_cdl!(CDLGRAVESTONEDOJI, talib_rs::pattern::cdl_gravestonedoji);
30impl Default for CDLGRAVESTONEDOJI {
31    fn default() -> Self {
32        Self::new()
33    }
34}
35native_cdl!(CDLHIGHWAVE, talib_rs::pattern::cdl_highwave);
36impl Default for CDLHIGHWAVE {
37    fn default() -> Self {
38        Self::new()
39    }
40}
41native_cdl!(CDLLONGLEGGEDDOJI, talib_rs::pattern::cdl_longleggeddoji);
42impl Default for CDLLONGLEGGEDDOJI {
43    fn default() -> Self {
44        Self::new()
45    }
46}
47native_cdl!(CDLLONGLINE, talib_rs::pattern::cdl_longline);
48impl Default for CDLLONGLINE {
49    fn default() -> Self {
50        Self::new()
51    }
52}
53native_cdl!(CDLMARUBOZU, talib_rs::pattern::cdl_marubozu);
54impl Default for CDLMARUBOZU {
55    fn default() -> Self {
56        Self::new()
57    }
58}
59native_cdl!(CDLRICKSHAWMAN, talib_rs::pattern::cdl_rickshawman);
60impl Default for CDLRICKSHAWMAN {
61    fn default() -> Self {
62        Self::new()
63    }
64}
65native_cdl!(CDLSHORTLINE, talib_rs::pattern::cdl_shortline);
66impl Default for CDLSHORTLINE {
67    fn default() -> Self {
68        Self::new()
69    }
70}
71native_cdl!(CDLSPINNINGTOP, talib_rs::pattern::cdl_spinningtop);
72impl Default for CDLSPINNINGTOP {
73    fn default() -> Self {
74        Self::new()
75    }
76}
77native_cdl!(CDLTAKURI, talib_rs::pattern::cdl_takuri);
78impl Default for CDLTAKURI {
79    fn default() -> Self {
80        Self::new()
81    }
82}
83native_cdl!(CDL2CROWS, talib_rs::pattern::cdl_2crows);
84impl Default for CDL2CROWS {
85    fn default() -> Self {
86        Self::new()
87    }
88}
89native_cdl!(CDLCOUNTERATTACK, talib_rs::pattern::cdl_counterattack);
90impl Default for CDLCOUNTERATTACK {
91    fn default() -> Self {
92        Self::new()
93    }
94}
95native_cdl!(CDLDARKCLOUDCOVER, talib_rs::pattern::cdl_darkcloudcover);
96impl Default for CDLDARKCLOUDCOVER {
97    fn default() -> Self {
98        Self::new()
99    }
100}
101native_cdl!(CDLDOJISTAR, talib_rs::pattern::cdl_dojistar);
102impl Default for CDLDOJISTAR {
103    fn default() -> Self {
104        Self::new()
105    }
106}
107native_cdl!(CDLHANGINGMAN, talib_rs::pattern::cdl_hangingman);
108impl Default for CDLHANGINGMAN {
109    fn default() -> Self {
110        Self::new()
111    }
112}
113native_cdl!(CDLHARAMI, talib_rs::pattern::cdl_harami);
114impl Default for CDLHARAMI {
115    fn default() -> Self {
116        Self::new()
117    }
118}
119native_cdl!(CDLHARAMICROSS, talib_rs::pattern::cdl_haramicross);
120impl Default for CDLHARAMICROSS {
121    fn default() -> Self {
122        Self::new()
123    }
124}
125native_cdl!(CDLHIKKAKE, talib_rs::pattern::cdl_hikkake);
126impl Default for CDLHIKKAKE {
127    fn default() -> Self {
128        Self::new()
129    }
130}
131native_cdl!(CDLHIKKAKEMOD, talib_rs::pattern::cdl_hikkakemod);
132impl Default for CDLHIKKAKEMOD {
133    fn default() -> Self {
134        Self::new()
135    }
136}
137native_cdl!(CDLHOMINGPIGEON, talib_rs::pattern::cdl_homingpigeon);
138impl Default for CDLHOMINGPIGEON {
139    fn default() -> Self {
140        Self::new()
141    }
142}
143native_cdl!(CDLINNECK, talib_rs::pattern::cdl_inneck);
144impl Default for CDLINNECK {
145    fn default() -> Self {
146        Self::new()
147    }
148}
149native_cdl!(CDLINVERTEDHAMMER, talib_rs::pattern::cdl_invertedhammer);
150impl Default for CDLINVERTEDHAMMER {
151    fn default() -> Self {
152        Self::new()
153    }
154}
155native_cdl!(CDLKICKING, talib_rs::pattern::cdl_kicking);
156impl Default for CDLKICKING {
157    fn default() -> Self {
158        Self::new()
159    }
160}
161native_cdl!(CDLKICKINGBYLENGTH, talib_rs::pattern::cdl_kickingbylength);
162impl Default for CDLKICKINGBYLENGTH {
163    fn default() -> Self {
164        Self::new()
165    }
166}
167native_cdl!(CDLMATCHINGLOW, talib_rs::pattern::cdl_matchinglow);
168impl Default for CDLMATCHINGLOW {
169    fn default() -> Self {
170        Self::new()
171    }
172}
173native_cdl!(CDLONNECK, talib_rs::pattern::cdl_onneck);
174impl Default for CDLONNECK {
175    fn default() -> Self {
176        Self::new()
177    }
178}
179native_cdl!(CDLPIERCING, talib_rs::pattern::cdl_piercing);
180impl Default for CDLPIERCING {
181    fn default() -> Self {
182        Self::new()
183    }
184}
185native_cdl!(CDLSEPARATINGLINES, talib_rs::pattern::cdl_separatinglines);
186impl Default for CDLSEPARATINGLINES {
187    fn default() -> Self {
188        Self::new()
189    }
190}
191native_cdl!(CDLSHOOTINGSTAR, talib_rs::pattern::cdl_shootingstar);
192impl Default for CDLSHOOTINGSTAR {
193    fn default() -> Self {
194        Self::new()
195    }
196}
197native_cdl!(CDLSTICKSANDWICH, talib_rs::pattern::cdl_sticksandwich);
198impl Default for CDLSTICKSANDWICH {
199    fn default() -> Self {
200        Self::new()
201    }
202}
203native_cdl!(CDLTHRUSTING, talib_rs::pattern::cdl_thrusting);
204impl Default for CDLTHRUSTING {
205    fn default() -> Self {
206        Self::new()
207    }
208}
209native_cdl!(CDLBELTHOLD, talib_rs::pattern::cdl_belthold);
210impl Default for CDLBELTHOLD {
211    fn default() -> Self {
212        Self::new()
213    }
214}
215native_cdl!(CDL3BLACKCROWS, talib_rs::pattern::cdl_3blackcrows);
216impl Default for CDL3BLACKCROWS {
217    fn default() -> Self {
218        Self::new()
219    }
220}
221native_cdl!(CDL3INSIDE, talib_rs::pattern::cdl_3inside);
222impl Default for CDL3INSIDE {
223    fn default() -> Self {
224        Self::new()
225    }
226}
227native_cdl!(CDL3LINESTRIKE, talib_rs::pattern::cdl_3linestrike);
228impl Default for CDL3LINESTRIKE {
229    fn default() -> Self {
230        Self::new()
231    }
232}
233native_cdl!(CDL3OUTSIDE, talib_rs::pattern::cdl_3outside);
234impl Default for CDL3OUTSIDE {
235    fn default() -> Self {
236        Self::new()
237    }
238}
239native_cdl!(CDL3STARSINSOUTH, talib_rs::pattern::cdl_3starsinsouth);
240impl Default for CDL3STARSINSOUTH {
241    fn default() -> Self {
242        Self::new()
243    }
244}
245native_cdl!(CDL3WHITESOLDIERS, talib_rs::pattern::cdl_3whitesoldiers);
246impl Default for CDL3WHITESOLDIERS {
247    fn default() -> Self {
248        Self::new()
249    }
250}
251native_cdl!(CDLABANDONEDBABY, talib_rs::pattern::cdl_abandonedbaby);
252impl Default for CDLABANDONEDBABY {
253    fn default() -> Self {
254        Self::new()
255    }
256}
257native_cdl!(CDLADVANCEBLOCK, talib_rs::pattern::cdl_advanceblock);
258impl Default for CDLADVANCEBLOCK {
259    fn default() -> Self {
260        Self::new()
261    }
262}
263native_cdl!(CDLBREAKAWAY, talib_rs::pattern::cdl_breakaway);
264impl Default for CDLBREAKAWAY {
265    fn default() -> Self {
266        Self::new()
267    }
268}
269native_cdl!(CDLCONCEALBABYSWALL, talib_rs::pattern::cdl_concealbabyswall);
270impl Default for CDLCONCEALBABYSWALL {
271    fn default() -> Self {
272        Self::new()
273    }
274}
275native_cdl!(CDLEVENINGDOJISTAR, talib_rs::pattern::cdl_eveningdojistar);
276impl Default for CDLEVENINGDOJISTAR {
277    fn default() -> Self {
278        Self::new()
279    }
280}
281native_cdl!(CDLEVENINGSTAR, talib_rs::pattern::cdl_eveningstar);
282impl Default for CDLEVENINGSTAR {
283    fn default() -> Self {
284        Self::new()
285    }
286}
287native_cdl!(CDLGAPSIDESIDEWHITE, talib_rs::pattern::cdl_gapsidesidewhite);
288impl Default for CDLGAPSIDESIDEWHITE {
289    fn default() -> Self {
290        Self::new()
291    }
292}
293native_cdl!(CDLIDENTICAL3CROWS, talib_rs::pattern::cdl_identical3crows);
294impl Default for CDLIDENTICAL3CROWS {
295    fn default() -> Self {
296        Self::new()
297    }
298}
299native_cdl!(CDLLADDERBOTTOM, talib_rs::pattern::cdl_ladderbottom);
300impl Default for CDLLADDERBOTTOM {
301    fn default() -> Self {
302        Self::new()
303    }
304}
305native_cdl!(CDLMATHOLD, talib_rs::pattern::cdl_mathold);
306impl Default for CDLMATHOLD {
307    fn default() -> Self {
308        Self::new()
309    }
310}
311native_cdl!(CDLMORNINGDOJISTAR, talib_rs::pattern::cdl_morningdojistar);
312impl Default for CDLMORNINGDOJISTAR {
313    fn default() -> Self {
314        Self::new()
315    }
316}
317native_cdl!(CDLMORNINGSTAR, talib_rs::pattern::cdl_morningstar);
318impl Default for CDLMORNINGSTAR {
319    fn default() -> Self {
320        Self::new()
321    }
322}
323native_cdl!(CDLRISEFALL3METHODS, talib_rs::pattern::cdl_risefall3methods);
324impl Default for CDLRISEFALL3METHODS {
325    fn default() -> Self {
326        Self::new()
327    }
328}
329native_cdl!(CDLSTALLEDPATTERN, talib_rs::pattern::cdl_stalledpattern);
330impl Default for CDLSTALLEDPATTERN {
331    fn default() -> Self {
332        Self::new()
333    }
334}
335native_cdl!(CDLTASUKIGAP, talib_rs::pattern::cdl_tasukigap);
336impl Default for CDLTASUKIGAP {
337    fn default() -> Self {
338        Self::new()
339    }
340}
341native_cdl!(CDLTRISTAR, talib_rs::pattern::cdl_tristar);
342impl Default for CDLTRISTAR {
343    fn default() -> Self {
344        Self::new()
345    }
346}
347native_cdl!(CDLUNIQUE3RIVER, talib_rs::pattern::cdl_unique3river);
348impl Default for CDLUNIQUE3RIVER {
349    fn default() -> Self {
350        Self::new()
351    }
352}
353native_cdl!(CDLUPSIDEGAP2CROWS, talib_rs::pattern::cdl_upsidegap2crows);
354impl Default for CDLUPSIDEGAP2CROWS {
355    fn default() -> Self {
356        Self::new()
357    }
358}
359native_cdl!(CDLXSIDEGAP3METHODS, talib_rs::pattern::cdl_xsidegap3methods);
360impl Default for CDLXSIDEGAP3METHODS {
361    fn default() -> Self {
362        Self::new()
363    }
364}
365
366#[cfg(test)]
367mod tests {
368    use super::*;
369    use crate::traits::Next;
370    use proptest::prelude::*;
371
372    proptest! {
373        #[test]
374        fn test_cdl_doji_parity(
375            o in prop::collection::vec(10.0..100.0, 1..100),
376            h in prop::collection::vec(10.0..100.0, 1..100),
377            l in prop::collection::vec(10.0..100.0, 1..100),
378            c in prop::collection::vec(10.0..100.0, 1..100)
379        ) {
380            let len = o.len().min(h.len()).min(l.len()).min(c.len());
381            if len == 0 { return Ok(()); }
382
383            let mut doji = CDLDOJI::new();
384            let streaming_results: Vec<f64> = (0..len).map(|i| doji.next((o[i], h[i], l[i], c[i]))).collect();
385            let batch_results = talib_rs::pattern::cdl_doji(&o[..len], &h[..len], &l[..len], &c[..len]).unwrap_or_else(|_| vec![0; len]);
386
387            for (s, b) in streaming_results.iter().zip(batch_results.iter()) {
388                assert_eq!(*s as i32, *b);
389            }
390        }
391
392        #[test]
393        fn test_cdl_hammer_parity(
394            o in prop::collection::vec(10.0..100.0, 1..100),
395            h in prop::collection::vec(10.0..100.0, 1..100),
396            l in prop::collection::vec(10.0..100.0, 1..100),
397            c in prop::collection::vec(10.0..100.0, 1..100)
398        ) {
399            let len = o.len().min(h.len()).min(l.len()).min(c.len());
400            if len == 0 { return Ok(()); }
401
402            let mut hammer = CDLHAMMER::new();
403            let streaming_results: Vec<f64> = (0..len).map(|i| hammer.next((o[i], h[i], l[i], c[i]))).collect();
404            let batch_results = talib_rs::pattern::cdl_hammer(&o[..len], &h[..len], &l[..len], &c[..len]).unwrap_or_else(|_| vec![0; len]);
405
406            for (s, b) in streaming_results.iter().zip(batch_results.iter()) {
407                assert_eq!(*s as i32, *b);
408            }
409        }
410    }
411}
412
413pub const CDLDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
414    name: "Doji",
415    description: "A candlestick pattern where the open and close are virtually equal.",
416    usage: "Indicates indecision between buyers and sellers.",
417    keywords: &["pattern", "candlestick", "classic"],
418    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
419    params: &[],
420    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
421    formula_latex: r#"
422\text{Pattern Recognition Logic (TA-Lib Internal)}
423"#,
424    gold_standard_file: "cdldoji.json",
425    category: "Patterns",
426};
427
428pub const CDLHAMMER_METADATA: IndicatorMetadata = IndicatorMetadata {
429    name: "Hammer",
430    description: "A bullish reversal pattern with a small body and long lower shadow.",
431    usage: "Signals a potential bottom after a downtrend.",
432    keywords: &["pattern", "candlestick", "classic"],
433    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
434    params: &[],
435    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
436    formula_latex: r#"
437\text{Pattern Recognition Logic (TA-Lib Internal)}
438"#,
439    gold_standard_file: "cdlhammer.json",
440    category: "Patterns",
441};
442
443pub const CDLENGULFING_METADATA: IndicatorMetadata = IndicatorMetadata {
444    name: "Engulfing",
445    description: "A pattern where a larger candle completely covers the previous smaller candle.",
446    usage: "Signals a strong shift in momentum.",
447    keywords: &["pattern", "candlestick", "classic"],
448    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
449    params: &[],
450    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
451    formula_latex: r#"
452\text{Pattern Recognition Logic (TA-Lib Internal)}
453"#,
454    gold_standard_file: "cdlengulfing.json",
455    category: "Patterns",
456};
457
458pub const CDLCLOSINGMARUBOZU_METADATA: IndicatorMetadata = IndicatorMetadata {
459    name: "Closing Marubozu",
460    description: "A candle with no shadow at the closing end.",
461    usage: "Indicates strong conviction in the direction of the close.",
462    keywords: &["pattern", "candlestick", "classic"],
463    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
464    params: &[],
465    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
466    formula_latex: r#"
467\text{Pattern Recognition Logic (TA-Lib Internal)}
468"#,
469    gold_standard_file: "cdlclosingmarubozu.json",
470    category: "Patterns",
471};
472
473pub const CDLDRAGONFLYDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
474    name: "Dragonfly Doji",
475    description: "A doji with a long lower shadow and no upper shadow.",
476    usage: "Signals a potential bullish reversal.",
477    keywords: &["pattern", "candlestick", "classic"],
478    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
479    params: &[],
480    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
481    formula_latex: r#"
482\text{Pattern Recognition Logic (TA-Lib Internal)}
483"#,
484    gold_standard_file: "cdldragonflydoji.json",
485    category: "Patterns",
486};
487
488pub const CDLGRAVESTONEDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
489    name: "Gravestone Doji",
490    description: "A doji with a long upper shadow and no lower shadow.",
491    usage: "Signals a potential bearish reversal.",
492    keywords: &["pattern", "candlestick", "classic"],
493    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
494    params: &[],
495    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
496    formula_latex: r#"
497\text{Pattern Recognition Logic (TA-Lib Internal)}
498"#,
499    gold_standard_file: "cdlgravestonedoji.json",
500    category: "Patterns",
501};
502
503pub const CDLHIGHWAVE_METADATA: IndicatorMetadata = IndicatorMetadata {
504    name: "High-Wave Candle",
505    description: "A candle with very long shadows and a small body.",
506    usage: "Indicates extreme market confusion and volatility.",
507    keywords: &["pattern", "candlestick", "classic"],
508    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
509    params: &[],
510    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
511    formula_latex: r#"
512\text{Pattern Recognition Logic (TA-Lib Internal)}
513"#,
514    gold_standard_file: "cdlhighwave.json",
515    category: "Patterns",
516};
517
518pub const CDLLONGLEGGEDDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
519    name: "Long-Legged Doji",
520    description: "A doji with long shadows on both sides.",
521    usage: "Indicates a significant struggle between bulls and bears.",
522    keywords: &["pattern", "candlestick", "classic"],
523    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
524    params: &[],
525    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
526    formula_latex: r#"
527\text{Pattern Recognition Logic (TA-Lib Internal)}
528"#,
529    gold_standard_file: "cdllongleggeddoji.json",
530    category: "Patterns",
531};
532
533pub const CDLLONGLINE_METADATA: IndicatorMetadata = IndicatorMetadata {
534    name: "Long Line Candle",
535    description: "A candle with an unusually long body.",
536    usage: "Indicates strong momentum in the direction of the candle.",
537    keywords: &["pattern", "candlestick", "classic"],
538    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
539    params: &[],
540    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
541    formula_latex: r#"
542\text{Pattern Recognition Logic (TA-Lib Internal)}
543"#,
544    gold_standard_file: "cdllongline.json",
545    category: "Patterns",
546};
547
548pub const CDLMARUBOZU_METADATA: IndicatorMetadata = IndicatorMetadata {
549    name: "Marubozu",
550    description: "A candle with no shadows at either end.",
551    usage: "Indicates total dominance by one side for the entire period.",
552    keywords: &["pattern", "candlestick", "classic"],
553    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
554    params: &[],
555    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
556    formula_latex: r#"
557\text{Pattern Recognition Logic (TA-Lib Internal)}
558"#,
559    gold_standard_file: "cdlmarubozu.json",
560    category: "Patterns",
561};
562
563pub const CDLRICKSHAWMAN_METADATA: IndicatorMetadata = IndicatorMetadata {
564    name: "Rickshaw Man",
565    description: "A long-legged doji where the body is in the center of the range.",
566    usage: "Indicates total equilibrium and indecision.",
567    keywords: &["pattern", "candlestick", "classic"],
568    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
569    params: &[],
570    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
571    formula_latex: r#"
572\text{Pattern Recognition Logic (TA-Lib Internal)}
573"#,
574    gold_standard_file: "cdlrickshawman.json",
575    category: "Patterns",
576};
577
578pub const CDLSHORTLINE_METADATA: IndicatorMetadata = IndicatorMetadata {
579    name: "Short Line Candle",
580    description: "A candle with a small body and small shadows.",
581    usage: "Indicates low volatility and consolidation.",
582    keywords: &["pattern", "candlestick", "classic"],
583    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
584    params: &[],
585    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
586    formula_latex: r#"
587\text{Pattern Recognition Logic (TA-Lib Internal)}
588"#,
589    gold_standard_file: "cdlshortline.json",
590    category: "Patterns",
591};
592
593pub const CDLSPINNINGTOP_METADATA: IndicatorMetadata = IndicatorMetadata {
594    name: "Spinning Top",
595    description: "A candle with a small body and long shadows.",
596    usage: "Indicates indecision after a strong move.",
597    keywords: &["pattern", "candlestick", "classic"],
598    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
599    params: &[],
600    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
601    formula_latex: r#"
602\text{Pattern Recognition Logic (TA-Lib Internal)}
603"#,
604    gold_standard_file: "cdlspinningtop.json",
605    category: "Patterns",
606};
607
608pub const CDLTAKURI_METADATA: IndicatorMetadata = IndicatorMetadata {
609    name: "Takuri",
610    description: "A dragonfly doji with an exceptionally long lower shadow.",
611    usage: "Indicates a very strong rejection of lower prices.",
612    keywords: &["pattern", "candlestick", "classic"],
613    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
614    params: &[],
615    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
616    formula_latex: r#"
617\text{Pattern Recognition Logic (TA-Lib Internal)}
618"#,
619    gold_standard_file: "cdltakuri.json",
620    category: "Patterns",
621};
622
623pub const CDL2CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
624    name: "Two Crows",
625    description: "A bearish reversal pattern consisting of three candles.",
626    usage: "Signals a potential top in an uptrend.",
627    keywords: &["pattern", "candlestick", "classic"],
628    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
629    params: &[],
630    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
631    formula_latex: r#"
632\text{Pattern Recognition Logic (TA-Lib Internal)}
633"#,
634    gold_standard_file: "cdl2crows.json",
635    category: "Patterns",
636};
637
638pub const CDL3BLACKCROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
639    name: "Three Black Crows",
640    description: "A bearish reversal pattern with three long red candles.",
641    usage: "Signals a major trend reversal to the downside.",
642    keywords: &["pattern", "candlestick", "classic"],
643    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
644    params: &[],
645    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
646    formula_latex: r#"
647\text{Pattern Recognition Logic (TA-Lib Internal)}
648"#,
649    gold_standard_file: "cdl3blackcrows.json",
650    category: "Patterns",
651};
652
653pub const CDL3INSIDE_METADATA: IndicatorMetadata = IndicatorMetadata {
654    name: "Three Inside Up/Down",
655    description: "A reversal pattern confirmed by a third candle.",
656    usage: "Signals a more reliable trend change than a simple harami.",
657    keywords: &["pattern", "candlestick", "classic"],
658    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
659    params: &[],
660    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
661    formula_latex: r#"
662\text{Pattern Recognition Logic (TA-Lib Internal)}
663"#,
664    gold_standard_file: "cdl3inside.json",
665    category: "Patterns",
666};
667
668pub const CDL3LINESTRIKE_METADATA: IndicatorMetadata = IndicatorMetadata {
669    name: "Three-Line Strike",
670    description: "A continuation pattern where four candles are involved.",
671    usage: "Signals a temporary pause before the trend continues.",
672    keywords: &["pattern", "candlestick", "classic"],
673    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
674    params: &[],
675    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
676    formula_latex: r#"
677\text{Pattern Recognition Logic (TA-Lib Internal)}
678"#,
679    gold_standard_file: "cdl3linestrike.json",
680    category: "Patterns",
681};
682
683pub const CDL3OUTSIDE_METADATA: IndicatorMetadata = IndicatorMetadata {
684    name: "Three Outside Up/Down",
685    description: "A reversal pattern confirmed by a third candle.",
686    usage: "Signals a more reliable trend change than a simple engulfing.",
687    keywords: &["pattern", "candlestick", "classic"],
688    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
689    params: &[],
690    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
691    formula_latex: r#"
692\text{Pattern Recognition Logic (TA-Lib Internal)}
693"#,
694    gold_standard_file: "cdl3outside.json",
695    category: "Patterns",
696};
697
698pub const CDL3STARSINSOUTH_METADATA: IndicatorMetadata = IndicatorMetadata {
699    name: "Three Stars In The South",
700    description: "A rare bullish reversal pattern in a downtrend.",
701    usage: "Indicates a gradual exhaustion of selling pressure.",
702    keywords: &["pattern", "candlestick", "classic"],
703    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
704    params: &[],
705    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
706    formula_latex: r#"
707\text{Pattern Recognition Logic (TA-Lib Internal)}
708"#,
709    gold_standard_file: "cdl3starsinsouth.json",
710    category: "Patterns",
711};
712
713pub const CDL3WHITESOLDIERS_METADATA: IndicatorMetadata = IndicatorMetadata {
714    name: "Three White Soldiers",
715    description: "A bullish reversal pattern with three long green candles.",
716    usage: "Signals a major trend reversal to the upside.",
717    keywords: &["pattern", "candlestick", "classic"],
718    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
719    params: &[],
720    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
721    formula_latex: r#"
722\text{Pattern Recognition Logic (TA-Lib Internal)}
723"#,
724    gold_standard_file: "cdl3whitesoldiers.json",
725    category: "Patterns",
726};
727
728pub const CDLABANDONEDBABY_METADATA: IndicatorMetadata = IndicatorMetadata {
729    name: "Abandoned Baby",
730    description: "A very rare reversal pattern with a doji gapping away.",
731    usage: "One of the most reliable reversal signals.",
732    keywords: &["pattern", "candlestick", "classic"],
733    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
734    params: &[],
735    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
736    formula_latex: r#"
737\text{Pattern Recognition Logic (TA-Lib Internal)}
738"#,
739    gold_standard_file: "cdlabandonedbaby.json",
740    category: "Patterns",
741};
742
743pub const CDLADVANCEBLOCK_METADATA: IndicatorMetadata = IndicatorMetadata {
744    name: "Advance Block",
745    description: "A bearish reversal pattern in an uptrend.",
746    usage: "Indicates weakening momentum in an upward move.",
747    keywords: &["pattern", "candlestick", "classic"],
748    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
749    params: &[],
750    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
751    formula_latex: r#"
752\text{Pattern Recognition Logic (TA-Lib Internal)}
753"#,
754    gold_standard_file: "cdladvanceblock.json",
755    category: "Patterns",
756};
757
758pub const CDLBELTHOLD_METADATA: IndicatorMetadata = IndicatorMetadata {
759    name: "Belt-Hold",
760    description: "A single candle pattern signaling a reversal.",
761    usage: "Indicates a strong opening in the opposite direction of the trend.",
762    keywords: &["pattern", "candlestick", "classic"],
763    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
764    params: &[],
765    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
766    formula_latex: r#"
767\text{Pattern Recognition Logic (TA-Lib Internal)}
768"#,
769    gold_standard_file: "cdlbelthold.json",
770    category: "Patterns",
771};
772
773pub const CDLBREAKAWAY_METADATA: IndicatorMetadata = IndicatorMetadata {
774    name: "Breakaway",
775    description: "A five-candle reversal pattern.",
776    usage: "Signals the breakout from a short-term consolidation.",
777    keywords: &["pattern", "candlestick", "classic"],
778    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
779    params: &[],
780    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
781    formula_latex: r#"
782\text{Pattern Recognition Logic (TA-Lib Internal)}
783"#,
784    gold_standard_file: "cdlbreakaway.json",
785    category: "Patterns",
786};
787
788pub const CDLCONCEALBABYSWALL_METADATA: IndicatorMetadata = IndicatorMetadata {
789    name: "Concealed Baby Swallow",
790    description: "A rare bullish reversal pattern.",
791    usage: "Indicates a final 'flush out' before a reversal.",
792    keywords: &["pattern", "candlestick", "classic"],
793    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
794    params: &[],
795    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
796    formula_latex: r#"
797\text{Pattern Recognition Logic (TA-Lib Internal)}
798"#,
799    gold_standard_file: "cdlconcealbabyswall.json",
800    category: "Patterns",
801};
802
803pub const CDLCOUNTERATTACK_METADATA: IndicatorMetadata = IndicatorMetadata {
804    name: "Counterattack",
805    description: "A reversal pattern where the second candle closes at the same level as the first.",
806    usage: "Signals a stalemate after a strong move.",
807    keywords: &["pattern", "candlestick", "classic"],
808    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
809    params: &[],
810    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
811    formula_latex: r#"
812\text{Pattern Recognition Logic (TA-Lib Internal)}
813"#,
814    gold_standard_file: "cdlcounterattack.json",
815    category: "Patterns",
816};
817
818pub const CDLDARKCLOUDCOVER_METADATA: IndicatorMetadata = IndicatorMetadata {
819    name: "Dark Cloud Cover",
820    description: "A bearish reversal pattern in an uptrend.",
821    usage: "Indicates a significant rejection of higher prices.",
822    keywords: &["pattern", "candlestick", "classic"],
823    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
824    params: &[],
825    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
826    formula_latex: r#"
827\text{Pattern Recognition Logic (TA-Lib Internal)}
828"#,
829    gold_standard_file: "cdldarkcloudcover.json",
830    category: "Patterns",
831};
832
833pub const CDLDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
834    name: "Doji Star",
835    description: "A reversal pattern where a doji gaps away.",
836    usage: "Signals a potential shift in trend momentum.",
837    keywords: &["pattern", "candlestick", "classic"],
838    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
839    params: &[],
840    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
841    formula_latex: r#"
842\text{Pattern Recognition Logic (TA-Lib Internal)}
843"#,
844    gold_standard_file: "cdldojistar.json",
845    category: "Patterns",
846};
847
848pub const CDLEVENINGDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
849    name: "Evening Doji Star",
850    description: "A bearish reversal pattern involving a doji.",
851    usage: "A highly reliable signal of a market top.",
852    keywords: &["pattern", "candlestick", "classic"],
853    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
854    params: &[],
855    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
856    formula_latex: r#"
857\text{Pattern Recognition Logic (TA-Lib Internal)}
858"#,
859    gold_standard_file: "cdleveningdojistar.json",
860    category: "Patterns",
861};
862
863pub const CDLEVENINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
864    name: "Evening Star",
865    description: "A bearish reversal pattern with three candles.",
866    usage: "Signals a peak in an uptrend.",
867    keywords: &["pattern", "candlestick", "classic"],
868    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
869    params: &[],
870    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
871    formula_latex: r#"
872\text{Pattern Recognition Logic (TA-Lib Internal)}
873"#,
874    gold_standard_file: "cdleveningstar.json",
875    category: "Patterns",
876};
877
878pub const CDLGAPSIDESIDEWHITE_METADATA: IndicatorMetadata = IndicatorMetadata {
879    name: "Up/Down-Gap Side-By-Side White Lines",
880    description: "A continuation pattern involving gaps.",
881    usage: "Signals that the current trend is likely to continue.",
882    keywords: &["pattern", "candlestick", "classic"],
883    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
884    params: &[],
885    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
886    formula_latex: r#"
887\text{Pattern Recognition Logic (TA-Lib Internal)}
888"#,
889    gold_standard_file: "cdlgapsidesidewhite.json",
890    category: "Patterns",
891};
892
893pub const CDLHANGINGMAN_METADATA: IndicatorMetadata = IndicatorMetadata {
894    name: "Hanging Man",
895    description: "A bearish reversal pattern at the top of an uptrend.",
896    usage: "Signals a potential breakdown after a period of buying.",
897    keywords: &["pattern", "candlestick", "classic"],
898    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
899    params: &[],
900    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
901    formula_latex: r#"
902\text{Pattern Recognition Logic (TA-Lib Internal)}
903"#,
904    gold_standard_file: "cdlhangingman.json",
905    category: "Patterns",
906};
907
908pub const CDLHARAMI_METADATA: IndicatorMetadata = IndicatorMetadata {
909    name: "Harami",
910    description: "A two-candle reversal pattern where the second is inside the first.",
911    usage: "Signals a potential trend exhaustion.",
912    keywords: &["pattern", "candlestick", "classic"],
913    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
914    params: &[],
915    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
916    formula_latex: r#"
917\text{Pattern Recognition Logic (TA-Lib Internal)}
918"#,
919    gold_standard_file: "cdlharami.json",
920    category: "Patterns",
921};
922
923pub const CDLHARAMICROSS_METADATA: IndicatorMetadata = IndicatorMetadata {
924    name: "Harami Cross",
925    description: "A harami where the second candle is a doji.",
926    usage: "A more reliable reversal signal than a standard harami.",
927    keywords: &["pattern", "candlestick", "classic"],
928    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
929    params: &[],
930    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
931    formula_latex: r#"
932\text{Pattern Recognition Logic (TA-Lib Internal)}
933"#,
934    gold_standard_file: "cdlharamicross.json",
935    category: "Patterns",
936};
937
938pub const CDLHIKKAKE_METADATA: IndicatorMetadata = IndicatorMetadata {
939    name: "Hikkake Pattern",
940    description: "A trap pattern used to identify false breakouts.",
941    usage: "Signals a move in the opposite direction of the trap.",
942    keywords: &["pattern", "candlestick", "classic"],
943    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
944    params: &[],
945    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
946    formula_latex: r#"
947\text{Pattern Recognition Logic (TA-Lib Internal)}
948"#,
949    gold_standard_file: "cdlhikkake.json",
950    category: "Patterns",
951};
952
953pub const CDLHIKKAKEMOD_METADATA: IndicatorMetadata = IndicatorMetadata {
954    name: "Modified Hikkake Pattern",
955    description: "A more conservative version of the Hikkake.",
956    usage: "Provides a higher probability signal.",
957    keywords: &["pattern", "candlestick", "classic"],
958    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
959    params: &[],
960    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
961    formula_latex: r#"
962\text{Pattern Recognition Logic (TA-Lib Internal)}
963"#,
964    gold_standard_file: "cdlhikkakemod.json",
965    category: "Patterns",
966};
967
968pub const CDLHOMINGPIGEON_METADATA: IndicatorMetadata = IndicatorMetadata {
969    name: "Homing Pigeon",
970    description: "A bullish reversal pattern in a downtrend.",
971    usage: "Signals a potential bottom.",
972    keywords: &["pattern", "candlestick", "classic"],
973    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
974    params: &[],
975    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
976    formula_latex: r#"
977\text{Pattern Recognition Logic (TA-Lib Internal)}
978"#,
979    gold_standard_file: "cdlhomingpigeon.json",
980    category: "Patterns",
981};
982
983pub const CDLIDENTICAL3CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
984    name: "Identical Three Crows",
985    description: "A bearish reversal pattern with three identical candles.",
986    usage: "Signals a very strong trend change.",
987    keywords: &["pattern", "candlestick", "classic"],
988    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
989    params: &[],
990    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
991    formula_latex: r#"
992\text{Pattern Recognition Logic (TA-Lib Internal)}
993"#,
994    gold_standard_file: "cdlidentical3crows.json",
995    category: "Patterns",
996};
997
998pub const CDLINNECK_METADATA: IndicatorMetadata = IndicatorMetadata {
999    name: "In-Neck Pattern",
1000    description: "A bearish continuation pattern.",
1001    usage: "Indicates that the downward move is not yet over.",
1002    keywords: &["pattern", "candlestick", "classic"],
1003    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1004    params: &[],
1005    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1006    formula_latex: r#"
1007\text{Pattern Recognition Logic (TA-Lib Internal)}
1008"#,
1009    gold_standard_file: "cdlinneck.json",
1010    category: "Patterns",
1011};
1012
1013pub const CDLINVERTEDHAMMER_METADATA: IndicatorMetadata = IndicatorMetadata {
1014    name: "Inverted Hammer",
1015    description: "A bullish reversal pattern at the bottom of a downtrend.",
1016    usage: "Signals a potential move to the upside.",
1017    keywords: &["pattern", "candlestick", "classic"],
1018    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1019    params: &[],
1020    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1021    formula_latex: r#"
1022\text{Pattern Recognition Logic (TA-Lib Internal)}
1023"#,
1024    gold_standard_file: "cdlinvertedhammer.json",
1025    category: "Patterns",
1026};
1027
1028pub const CDLKICKING_METADATA: IndicatorMetadata = IndicatorMetadata {
1029    name: "Kicking",
1030    description: "A two-candle reversal pattern involving a gap.",
1031    usage: "Signals a violent shift in market sentiment.",
1032    keywords: &["pattern", "candlestick", "classic"],
1033    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1034    params: &[],
1035    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1036    formula_latex: r#"
1037\text{Pattern Recognition Logic (TA-Lib Internal)}
1038"#,
1039    gold_standard_file: "cdlkicking.json",
1040    category: "Patterns",
1041};
1042
1043pub const CDLKICKINGBYLENGTH_METADATA: IndicatorMetadata = IndicatorMetadata {
1044    name: "Kicking - bull/bear determined by longer marubozu",
1045    description: "A variation of the kicking pattern.",
1046    usage: "Focuses on the relative strength of the marubozus.",
1047    keywords: &["pattern", "candlestick", "classic"],
1048    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1049    params: &[],
1050    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1051    formula_latex: r#"
1052\text{Pattern Recognition Logic (TA-Lib Internal)}
1053"#,
1054    gold_standard_file: "cdlkickingbylength.json",
1055    category: "Patterns",
1056};
1057
1058pub const CDLLADDERBOTTOM_METADATA: IndicatorMetadata = IndicatorMetadata {
1059    name: "Ladder Bottom",
1060    description: "A five-candle bullish reversal pattern.",
1061    usage: "Signals a major bottom after a steady decline.",
1062    keywords: &["pattern", "candlestick", "classic"],
1063    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1064    params: &[],
1065    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1066    formula_latex: r#"
1067\text{Pattern Recognition Logic (TA-Lib Internal)}
1068"#,
1069    gold_standard_file: "cdlladderbottom.json",
1070    category: "Patterns",
1071};
1072
1073pub const CDLMATCHINGLOW_METADATA: IndicatorMetadata = IndicatorMetadata {
1074    name: "Matching Low",
1075    description: "A bullish reversal pattern with two identical lows.",
1076    usage: "Signals support at a specific price level.",
1077    keywords: &["pattern", "candlestick", "classic"],
1078    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1079    params: &[],
1080    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1081    formula_latex: r#"
1082\text{Pattern Recognition Logic (TA-Lib Internal)}
1083"#,
1084    gold_standard_file: "cdlmatchinglow.json",
1085    category: "Patterns",
1086};
1087
1088pub const CDLMATHOLD_METADATA: IndicatorMetadata = IndicatorMetadata {
1089    name: "Mat Hold",
1090    description: "A bullish continuation pattern.",
1091    usage: "Signals a strong trend that is likely to persist.",
1092    keywords: &["pattern", "candlestick", "classic"],
1093    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1094    params: &[],
1095    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1096    formula_latex: r#"
1097\text{Pattern Recognition Logic (TA-Lib Internal)}
1098"#,
1099    gold_standard_file: "cdlmathold.json",
1100    category: "Patterns",
1101};
1102
1103pub const CDLMORNINGDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
1104    name: "Morning Doji Star",
1105    description: "A bullish reversal pattern involving a doji.",
1106    usage: "A highly reliable signal of a market bottom.",
1107    keywords: &["pattern", "candlestick", "classic"],
1108    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1109    params: &[],
1110    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1111    formula_latex: r#"
1112\text{Pattern Recognition Logic (TA-Lib Internal)}
1113"#,
1114    gold_standard_file: "cdlmorningdojistar.json",
1115    category: "Patterns",
1116};
1117
1118pub const CDLMORNINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
1119    name: "Morning Star",
1120    description: "A bullish reversal pattern with three candles.",
1121    usage: "Signals a trough in a downtrend.",
1122    keywords: &["pattern", "candlestick", "classic"],
1123    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1124    params: &[],
1125    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1126    formula_latex: r#"
1127\text{Pattern Recognition Logic (TA-Lib Internal)}
1128"#,
1129    gold_standard_file: "cdlmorningstar.json",
1130    category: "Patterns",
1131};
1132
1133pub const CDLONNECK_METADATA: IndicatorMetadata = IndicatorMetadata {
1134    name: "On-Neck Pattern",
1135    description: "A bearish continuation pattern.",
1136    usage: "A weak signal that the downtrend will continue.",
1137    keywords: &["pattern", "candlestick", "classic"],
1138    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1139    params: &[],
1140    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1141    formula_latex: r#"
1142\text{Pattern Recognition Logic (TA-Lib Internal)}
1143"#,
1144    gold_standard_file: "cdlonneck.json",
1145    category: "Patterns",
1146};
1147
1148pub const CDLPIERCING_METADATA: IndicatorMetadata = IndicatorMetadata {
1149    name: "Piercing Pattern",
1150    description: "A bullish reversal pattern in a downtrend.",
1151    usage: "Indicates a significant entry of buyers.",
1152    keywords: &["pattern", "candlestick", "classic"],
1153    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1154    params: &[],
1155    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1156    formula_latex: r#"
1157\text{Pattern Recognition Logic (TA-Lib Internal)}
1158"#,
1159    gold_standard_file: "cdlpiercing.json",
1160    category: "Patterns",
1161};
1162
1163pub const CDLRISEFALL3METHODS_METADATA: IndicatorMetadata = IndicatorMetadata {
1164    name: "Rising/Falling Three Methods",
1165    description: "A strong continuation pattern.",
1166    usage: "Signals a minor consolidation before the trend resumes.",
1167    keywords: &["pattern", "candlestick", "classic"],
1168    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1169    params: &[],
1170    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1171    formula_latex: r#"
1172\text{Pattern Recognition Logic (TA-Lib Internal)}
1173"#,
1174    gold_standard_file: "cdlrisefall3methods.json",
1175    category: "Patterns",
1176};
1177
1178pub const CDLSEPARATINGLINES_METADATA: IndicatorMetadata = IndicatorMetadata {
1179    name: "Separating Lines",
1180    description: "A continuation pattern where candles move in opposite directions.",
1181    usage: "Signals trend persistence.",
1182    keywords: &["pattern", "candlestick", "classic"],
1183    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1184    params: &[],
1185    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1186    formula_latex: r#"
1187\text{Pattern Recognition Logic (TA-Lib Internal)}
1188"#,
1189    gold_standard_file: "cdlseparatinglines.json",
1190    category: "Patterns",
1191};
1192
1193pub const CDLSHOOTINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
1194    name: "Shooting Star",
1195    description: "A bearish reversal pattern at the top of an uptrend.",
1196    usage: "Signals a potential move to the downside.",
1197    keywords: &["pattern", "candlestick", "classic"],
1198    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1199    params: &[],
1200    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1201    formula_latex: r#"
1202\text{Pattern Recognition Logic (TA-Lib Internal)}
1203"#,
1204    gold_standard_file: "cdlshootingstar.json",
1205    category: "Patterns",
1206};
1207
1208pub const CDLSTALLEDPATTERN_METADATA: IndicatorMetadata = IndicatorMetadata {
1209    name: "Stalled Pattern",
1210    description: "A bearish reversal pattern in an uptrend.",
1211    usage: "Indicates that the upward momentum is slowing down.",
1212    keywords: &["pattern", "candlestick", "classic"],
1213    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1214    params: &[],
1215    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1216    formula_latex: r#"
1217\text{Pattern Recognition Logic (TA-Lib Internal)}
1218"#,
1219    gold_standard_file: "cdlstalledpattern.json",
1220    category: "Patterns",
1221};
1222
1223pub const CDLSTICKSANDWICH_METADATA: IndicatorMetadata = IndicatorMetadata {
1224    name: "Stick Sandwich",
1225    description: "A reversal pattern with alternating candle colors.",
1226    usage: "Signals a potential support or resistance level.",
1227    keywords: &["pattern", "candlestick", "classic"],
1228    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1229    params: &[],
1230    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1231    formula_latex: r#"
1232\text{Pattern Recognition Logic (TA-Lib Internal)}
1233"#,
1234    gold_standard_file: "cdlsticksandwich.json",
1235    category: "Patterns",
1236};
1237
1238pub const CDLTASUKIGAP_METADATA: IndicatorMetadata = IndicatorMetadata {
1239    name: "Tasuki Gap",
1240    description: "A continuation pattern involving a gap.",
1241    usage: "Signals trend strength.",
1242    keywords: &["pattern", "candlestick", "classic"],
1243    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1244    params: &[],
1245    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1246    formula_latex: r#"
1247\text{Pattern Recognition Logic (TA-Lib Internal)}
1248"#,
1249    gold_standard_file: "cdltasukigap.json",
1250    category: "Patterns",
1251};
1252
1253pub const CDLTHRUSTING_METADATA: IndicatorMetadata = IndicatorMetadata {
1254    name: "Thrusting Pattern",
1255    description: "A bearish continuation pattern.",
1256    usage: "A weak signal of trend persistence.",
1257    keywords: &["pattern", "candlestick", "classic"],
1258    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1259    params: &[],
1260    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1261    formula_latex: r#"
1262\text{Pattern Recognition Logic (TA-Lib Internal)}
1263"#,
1264    gold_standard_file: "cdlthrusting.json",
1265    category: "Patterns",
1266};
1267
1268pub const CDLTRISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
1269    name: "Tristar Pattern",
1270    description: "A rare reversal pattern consisting of three dojis.",
1271    usage: "Signals an extreme shift in momentum.",
1272    keywords: &["pattern", "candlestick", "classic"],
1273    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1274    params: &[],
1275    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1276    formula_latex: r#"
1277\text{Pattern Recognition Logic (TA-Lib Internal)}
1278"#,
1279    gold_standard_file: "cdltristar.json",
1280    category: "Patterns",
1281};
1282
1283pub const CDLUNIQUE3RIVER_METADATA: IndicatorMetadata = IndicatorMetadata {
1284    name: "Unique 3 River",
1285    description: "A bullish reversal pattern.",
1286    usage: "Signals a potential bottom.",
1287    keywords: &["pattern", "candlestick", "classic"],
1288    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1289    params: &[],
1290    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1291    formula_latex: r#"
1292\text{Pattern Recognition Logic (TA-Lib Internal)}
1293"#,
1294    gold_standard_file: "cdlunique3river.json",
1295    category: "Patterns",
1296};
1297
1298pub const CDLUPSIDEGAP2CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
1299    name: "Upside Gap Two Crows",
1300    description: "A bearish reversal pattern.",
1301    usage: "Signals a potential top in an uptrend.",
1302    keywords: &["pattern", "candlestick", "classic"],
1303    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1304    params: &[],
1305    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1306    formula_latex: r#"
1307\text{Pattern Recognition Logic (TA-Lib Internal)}
1308"#,
1309    gold_standard_file: "cdlupsidegap2crows.json",
1310    category: "Patterns",
1311};
1312
1313pub const CDLXSIDEGAP3METHODS_METADATA: IndicatorMetadata = IndicatorMetadata {
1314    name: "Up/Down-Gap Three Methods",
1315    description: "A continuation pattern.",
1316    usage: "Signals that the trend is likely to continue after a gap.",
1317    keywords: &["pattern", "candlestick", "classic"],
1318    ehlers_summary: "Candlestick patterns were popularized in the West by Steve Nison in his 1991 book 'Japanese Candlestick Charting Techniques'. These patterns provide a visual representation of market psychology and the balance of power between buyers and sellers at key price levels.",
1319    params: &[],
1320    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
1321    formula_latex: r#"
1322\text{Pattern Recognition Logic (TA-Lib Internal)}
1323"#,
1324    gold_standard_file: "cdlxsidegap3methods.json",
1325    category: "Patterns",
1326};