Skip to main content

quantwave_core/indicators/
pattern.rs

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