use crate::indicators::metadata::IndicatorMetadata;
#[allow(unused_imports)]
use crate::traits::Next;
talib_cdl!(CDLDOJI, talib_rs::pattern::cdl_doji);
impl Default for CDLDOJI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHAMMER, talib_rs::pattern::cdl_hammer);
impl Default for CDLHAMMER {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLENGULFING, talib_rs::pattern::cdl_engulfing);
impl Default for CDLENGULFING {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLCLOSINGMARUBOZU, talib_rs::pattern::cdl_closingmarubozu);
impl Default for CDLCLOSINGMARUBOZU {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLDRAGONFLYDOJI, talib_rs::pattern::cdl_dragonflydoji);
impl Default for CDLDRAGONFLYDOJI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLGRAVESTONEDOJI, talib_rs::pattern::cdl_gravestonedoji);
impl Default for CDLGRAVESTONEDOJI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHIGHWAVE, talib_rs::pattern::cdl_highwave);
impl Default for CDLHIGHWAVE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLLONGLEGGEDDOJI, talib_rs::pattern::cdl_longleggeddoji);
impl Default for CDLLONGLEGGEDDOJI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLLONGLINE, talib_rs::pattern::cdl_longline);
impl Default for CDLLONGLINE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLMARUBOZU, talib_rs::pattern::cdl_marubozu);
impl Default for CDLMARUBOZU {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLRICKSHAWMAN, talib_rs::pattern::cdl_rickshawman);
impl Default for CDLRICKSHAWMAN {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSHORTLINE, talib_rs::pattern::cdl_shortline);
impl Default for CDLSHORTLINE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSPINNINGTOP, talib_rs::pattern::cdl_spinningtop);
impl Default for CDLSPINNINGTOP {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLTAKURI, talib_rs::pattern::cdl_takuri);
impl Default for CDLTAKURI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL2CROWS, talib_rs::pattern::cdl_2crows);
impl Default for CDL2CROWS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLCOUNTERATTACK, talib_rs::pattern::cdl_counterattack);
impl Default for CDLCOUNTERATTACK {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLDARKCLOUDCOVER, talib_rs::pattern::cdl_darkcloudcover);
impl Default for CDLDARKCLOUDCOVER {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLDOJISTAR, talib_rs::pattern::cdl_dojistar);
impl Default for CDLDOJISTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHANGINGMAN, talib_rs::pattern::cdl_hangingman);
impl Default for CDLHANGINGMAN {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHARAMI, talib_rs::pattern::cdl_harami);
impl Default for CDLHARAMI {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHARAMICROSS, talib_rs::pattern::cdl_haramicross);
impl Default for CDLHARAMICROSS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHIKKAKE, talib_rs::pattern::cdl_hikkake);
impl Default for CDLHIKKAKE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHIKKAKEMOD, talib_rs::pattern::cdl_hikkakemod);
impl Default for CDLHIKKAKEMOD {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLHOMINGPIGEON, talib_rs::pattern::cdl_homingpigeon);
impl Default for CDLHOMINGPIGEON {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLINNECK, talib_rs::pattern::cdl_inneck);
impl Default for CDLINNECK {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLINVERTEDHAMMER, talib_rs::pattern::cdl_invertedhammer);
impl Default for CDLINVERTEDHAMMER {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLKICKING, talib_rs::pattern::cdl_kicking);
impl Default for CDLKICKING {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLKICKINGBYLENGTH, talib_rs::pattern::cdl_kickingbylength);
impl Default for CDLKICKINGBYLENGTH {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLMATCHINGLOW, talib_rs::pattern::cdl_matchinglow);
impl Default for CDLMATCHINGLOW {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLONNECK, talib_rs::pattern::cdl_onneck);
impl Default for CDLONNECK {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLPIERCING, talib_rs::pattern::cdl_piercing);
impl Default for CDLPIERCING {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSEPARATINGLINES, talib_rs::pattern::cdl_separatinglines);
impl Default for CDLSEPARATINGLINES {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSHOOTINGSTAR, talib_rs::pattern::cdl_shootingstar);
impl Default for CDLSHOOTINGSTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSTICKSANDWICH, talib_rs::pattern::cdl_sticksandwich);
impl Default for CDLSTICKSANDWICH {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLTHRUSTING, talib_rs::pattern::cdl_thrusting);
impl Default for CDLTHRUSTING {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLBELTHOLD, talib_rs::pattern::cdl_belthold);
impl Default for CDLBELTHOLD {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3BLACKCROWS, talib_rs::pattern::cdl_3blackcrows);
impl Default for CDL3BLACKCROWS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3INSIDE, talib_rs::pattern::cdl_3inside);
impl Default for CDL3INSIDE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3LINESTRIKE, talib_rs::pattern::cdl_3linestrike);
impl Default for CDL3LINESTRIKE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3OUTSIDE, talib_rs::pattern::cdl_3outside);
impl Default for CDL3OUTSIDE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3STARSINSOUTH, talib_rs::pattern::cdl_3starsinsouth);
impl Default for CDL3STARSINSOUTH {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDL3WHITESOLDIERS, talib_rs::pattern::cdl_3whitesoldiers);
impl Default for CDL3WHITESOLDIERS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLABANDONEDBABY, talib_rs::pattern::cdl_abandonedbaby);
impl Default for CDLABANDONEDBABY {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLADVANCEBLOCK, talib_rs::pattern::cdl_advanceblock);
impl Default for CDLADVANCEBLOCK {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLBREAKAWAY, talib_rs::pattern::cdl_breakaway);
impl Default for CDLBREAKAWAY {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLCONCEALBABYSWALL, talib_rs::pattern::cdl_concealbabyswall);
impl Default for CDLCONCEALBABYSWALL {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLEVENINGDOJISTAR, talib_rs::pattern::cdl_eveningdojistar);
impl Default for CDLEVENINGDOJISTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLEVENINGSTAR, talib_rs::pattern::cdl_eveningstar);
impl Default for CDLEVENINGSTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLGAPSIDESIDEWHITE, talib_rs::pattern::cdl_gapsidesidewhite);
impl Default for CDLGAPSIDESIDEWHITE {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLIDENTICAL3CROWS, talib_rs::pattern::cdl_identical3crows);
impl Default for CDLIDENTICAL3CROWS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLLADDERBOTTOM, talib_rs::pattern::cdl_ladderbottom);
impl Default for CDLLADDERBOTTOM {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLMATHOLD, talib_rs::pattern::cdl_mathold);
impl Default for CDLMATHOLD {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLMORNINGDOJISTAR, talib_rs::pattern::cdl_morningdojistar);
impl Default for CDLMORNINGDOJISTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLMORNINGSTAR, talib_rs::pattern::cdl_morningstar);
impl Default for CDLMORNINGSTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLRISEFALL3METHODS, talib_rs::pattern::cdl_risefall3methods);
impl Default for CDLRISEFALL3METHODS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLSTALLEDPATTERN, talib_rs::pattern::cdl_stalledpattern);
impl Default for CDLSTALLEDPATTERN {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLTASUKIGAP, talib_rs::pattern::cdl_tasukigap);
impl Default for CDLTASUKIGAP {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLTRISTAR, talib_rs::pattern::cdl_tristar);
impl Default for CDLTRISTAR {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLUNIQUE3RIVER, talib_rs::pattern::cdl_unique3river);
impl Default for CDLUNIQUE3RIVER {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLUPSIDEGAP2CROWS, talib_rs::pattern::cdl_upsidegap2crows);
impl Default for CDLUPSIDEGAP2CROWS {
    fn default() -> Self {
        Self::new()
    }
}
talib_cdl!(CDLXSIDEGAP3METHODS, talib_rs::pattern::cdl_xsidegap3methods);
impl Default for CDLXSIDEGAP3METHODS {
    fn default() -> Self {
        Self::new()
    }
}

#[cfg(test)]
mod tests {
    use super::*;
    use crate::traits::Next;
    use proptest::prelude::*;

    proptest! {
        #[test]
        fn test_cdl_doji_parity(
            o in prop::collection::vec(10.0..100.0, 1..100),
            h in prop::collection::vec(10.0..100.0, 1..100),
            l in prop::collection::vec(10.0..100.0, 1..100),
            c in prop::collection::vec(10.0..100.0, 1..100)
        ) {
            let len = o.len().min(h.len()).min(l.len()).min(c.len());
            if len == 0 { return Ok(()); }

            let mut doji = CDLDOJI::new();
            let streaming_results: Vec<f64> = (0..len).map(|i| doji.next((o[i], h[i], l[i], c[i]))).collect();
            let batch_results = talib_rs::pattern::cdl_doji(&o[..len], &h[..len], &l[..len], &c[..len]).unwrap_or_else(|_| vec![0; len]);

            for (s, b) in streaming_results.iter().zip(batch_results.iter()) {
                assert_eq!(*s as i32, *b);
            }
        }

        #[test]
        fn test_cdl_hammer_parity(
            o in prop::collection::vec(10.0..100.0, 1..100),
            h in prop::collection::vec(10.0..100.0, 1..100),
            l in prop::collection::vec(10.0..100.0, 1..100),
            c in prop::collection::vec(10.0..100.0, 1..100)
        ) {
            let len = o.len().min(h.len()).min(l.len()).min(c.len());
            if len == 0 { return Ok(()); }

            let mut hammer = CDLHAMMER::new();
            let streaming_results: Vec<f64> = (0..len).map(|i| hammer.next((o[i], h[i], l[i], c[i]))).collect();
            let batch_results = talib_rs::pattern::cdl_hammer(&o[..len], &h[..len], &l[..len], &c[..len]).unwrap_or_else(|_| vec![0; len]);

            for (s, b) in streaming_results.iter().zip(batch_results.iter()) {
                assert_eq!(*s as i32, *b);
            }
        }
    }
}


pub const CDLDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Doji",
    description: "A candlestick pattern where the open and close are virtually equal.",
    usage: "Indicates indecision between buyers and sellers.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdldoji.json",
    category: "Patterns",
};

pub const CDLHAMMER_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Hammer",
    description: "A bullish reversal pattern with a small body and long lower shadow.",
    usage: "Signals a potential bottom after a downtrend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhammer.json",
    category: "Patterns",
};

pub const CDLENGULFING_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Engulfing",
    description: "A pattern where a larger candle completely covers the previous smaller candle.",
    usage: "Signals a strong shift in momentum.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlengulfing.json",
    category: "Patterns",
};

pub const CDLCLOSINGMARUBOZU_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Closing Marubozu",
    description: "A candle with no shadow at the closing end.",
    usage: "Indicates strong conviction in the direction of the close.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlclosingmarubozu.json",
    category: "Patterns",
};

pub const CDLDRAGONFLYDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Dragonfly Doji",
    description: "A doji with a long lower shadow and no upper shadow.",
    usage: "Signals a potential bullish reversal.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdldragonflydoji.json",
    category: "Patterns",
};

pub const CDLGRAVESTONEDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Gravestone Doji",
    description: "A doji with a long upper shadow and no lower shadow.",
    usage: "Signals a potential bearish reversal.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlgravestonedoji.json",
    category: "Patterns",
};

pub const CDLHIGHWAVE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "High-Wave Candle",
    description: "A candle with very long shadows and a small body.",
    usage: "Indicates extreme market confusion and volatility.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhighwave.json",
    category: "Patterns",
};

pub const CDLLONGLEGGEDDOJI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Long-Legged Doji",
    description: "A doji with long shadows on both sides.",
    usage: "Indicates a significant struggle between bulls and bears.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdllongleggeddoji.json",
    category: "Patterns",
};

pub const CDLLONGLINE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Long Line Candle",
    description: "A candle with an unusually long body.",
    usage: "Indicates strong momentum in the direction of the candle.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdllongline.json",
    category: "Patterns",
};

pub const CDLMARUBOZU_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Marubozu",
    description: "A candle with no shadows at either end.",
    usage: "Indicates total dominance by one side for the entire period.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlmarubozu.json",
    category: "Patterns",
};

pub const CDLRICKSHAWMAN_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Rickshaw Man",
    description: "A long-legged doji where the body is in the center of the range.",
    usage: "Indicates total equilibrium and indecision.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlrickshawman.json",
    category: "Patterns",
};

pub const CDLSHORTLINE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Short Line Candle",
    description: "A candle with a small body and small shadows.",
    usage: "Indicates low volatility and consolidation.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlshortline.json",
    category: "Patterns",
};

pub const CDLSPINNINGTOP_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Spinning Top",
    description: "A candle with a small body and long shadows.",
    usage: "Indicates indecision after a strong move.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlspinningtop.json",
    category: "Patterns",
};

pub const CDLTAKURI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Takuri",
    description: "A dragonfly doji with an exceptionally long lower shadow.",
    usage: "Indicates a very strong rejection of lower prices.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdltakuri.json",
    category: "Patterns",
};

pub const CDL2CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Two Crows",
    description: "A bearish reversal pattern consisting of three candles.",
    usage: "Signals a potential top in an uptrend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl2crows.json",
    category: "Patterns",
};

pub const CDL3BLACKCROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three Black Crows",
    description: "A bearish reversal pattern with three long red candles.",
    usage: "Signals a major trend reversal to the downside.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3blackcrows.json",
    category: "Patterns",
};

pub const CDL3INSIDE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three Inside Up/Down",
    description: "A reversal pattern confirmed by a third candle.",
    usage: "Signals a more reliable trend change than a simple harami.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3inside.json",
    category: "Patterns",
};

pub const CDL3LINESTRIKE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three-Line Strike",
    description: "A continuation pattern where four candles are involved.",
    usage: "Signals a temporary pause before the trend continues.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3linestrike.json",
    category: "Patterns",
};

pub const CDL3OUTSIDE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three Outside Up/Down",
    description: "A reversal pattern confirmed by a third candle.",
    usage: "Signals a more reliable trend change than a simple engulfing.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3outside.json",
    category: "Patterns",
};

pub const CDL3STARSINSOUTH_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three Stars In The South",
    description: "A rare bullish reversal pattern in a downtrend.",
    usage: "Indicates a gradual exhaustion of selling pressure.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3starsinsouth.json",
    category: "Patterns",
};

pub const CDL3WHITESOLDIERS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Three White Soldiers",
    description: "A bullish reversal pattern with three long green candles.",
    usage: "Signals a major trend reversal to the upside.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdl3whitesoldiers.json",
    category: "Patterns",
};

pub const CDLABANDONEDBABY_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Abandoned Baby",
    description: "A very rare reversal pattern with a doji gapping away.",
    usage: "One of the most reliable reversal signals.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlabandonedbaby.json",
    category: "Patterns",
};

pub const CDLADVANCEBLOCK_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Advance Block",
    description: "A bearish reversal pattern in an uptrend.",
    usage: "Indicates weakening momentum in an upward move.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdladvanceblock.json",
    category: "Patterns",
};

pub const CDLBELTHOLD_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Belt-Hold",
    description: "A single candle pattern signaling a reversal.",
    usage: "Indicates a strong opening in the opposite direction of the trend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlbelthold.json",
    category: "Patterns",
};

pub const CDLBREAKAWAY_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Breakaway",
    description: "A five-candle reversal pattern.",
    usage: "Signals the breakout from a short-term consolidation.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlbreakaway.json",
    category: "Patterns",
};

pub const CDLCONCEALBABYSWALL_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Concealed Baby Swallow",
    description: "A rare bullish reversal pattern.",
    usage: "Indicates a final 'flush out' before a reversal.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlconcealbabyswall.json",
    category: "Patterns",
};

pub const CDLCOUNTERATTACK_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Counterattack",
    description: "A reversal pattern where the second candle closes at the same level as the first.",
    usage: "Signals a stalemate after a strong move.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlcounterattack.json",
    category: "Patterns",
};

pub const CDLDARKCLOUDCOVER_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Dark Cloud Cover",
    description: "A bearish reversal pattern in an uptrend.",
    usage: "Indicates a significant rejection of higher prices.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdldarkcloudcover.json",
    category: "Patterns",
};

pub const CDLDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Doji Star",
    description: "A reversal pattern where a doji gaps away.",
    usage: "Signals a potential shift in trend momentum.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdldojistar.json",
    category: "Patterns",
};

pub const CDLEVENINGDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Evening Doji Star",
    description: "A bearish reversal pattern involving a doji.",
    usage: "A highly reliable signal of a market top.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdleveningdojistar.json",
    category: "Patterns",
};

pub const CDLEVENINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Evening Star",
    description: "A bearish reversal pattern with three candles.",
    usage: "Signals a peak in an uptrend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdleveningstar.json",
    category: "Patterns",
};

pub const CDLGAPSIDESIDEWHITE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Up/Down-Gap Side-By-Side White Lines",
    description: "A continuation pattern involving gaps.",
    usage: "Signals that the current trend is likely to continue.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlgapsidesidewhite.json",
    category: "Patterns",
};

pub const CDLHANGINGMAN_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Hanging Man",
    description: "A bearish reversal pattern at the top of an uptrend.",
    usage: "Signals a potential breakdown after a period of buying.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhangingman.json",
    category: "Patterns",
};

pub const CDLHARAMI_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Harami",
    description: "A two-candle reversal pattern where the second is inside the first.",
    usage: "Signals a potential trend exhaustion.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlharami.json",
    category: "Patterns",
};

pub const CDLHARAMICROSS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Harami Cross",
    description: "A harami where the second candle is a doji.",
    usage: "A more reliable reversal signal than a standard harami.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlharamicross.json",
    category: "Patterns",
};

pub const CDLHIKKAKE_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Hikkake Pattern",
    description: "A trap pattern used to identify false breakouts.",
    usage: "Signals a move in the opposite direction of the trap.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhikkake.json",
    category: "Patterns",
};

pub const CDLHIKKAKEMOD_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Modified Hikkake Pattern",
    description: "A more conservative version of the Hikkake.",
    usage: "Provides a higher probability signal.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhikkakemod.json",
    category: "Patterns",
};

pub const CDLHOMINGPIGEON_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Homing Pigeon",
    description: "A bullish reversal pattern in a downtrend.",
    usage: "Signals a potential bottom.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlhomingpigeon.json",
    category: "Patterns",
};

pub const CDLIDENTICAL3CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Identical Three Crows",
    description: "A bearish reversal pattern with three identical candles.",
    usage: "Signals a very strong trend change.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlidentical3crows.json",
    category: "Patterns",
};

pub const CDLINNECK_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "In-Neck Pattern",
    description: "A bearish continuation pattern.",
    usage: "Indicates that the downward move is not yet over.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlinneck.json",
    category: "Patterns",
};

pub const CDLINVERTEDHAMMER_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Inverted Hammer",
    description: "A bullish reversal pattern at the bottom of a downtrend.",
    usage: "Signals a potential move to the upside.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlinvertedhammer.json",
    category: "Patterns",
};

pub const CDLKICKING_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Kicking",
    description: "A two-candle reversal pattern involving a gap.",
    usage: "Signals a violent shift in market sentiment.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlkicking.json",
    category: "Patterns",
};

pub const CDLKICKINGBYLENGTH_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Kicking - bull/bear determined by longer marubozu",
    description: "A variation of the kicking pattern.",
    usage: "Focuses on the relative strength of the marubozus.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlkickingbylength.json",
    category: "Patterns",
};

pub const CDLLADDERBOTTOM_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Ladder Bottom",
    description: "A five-candle bullish reversal pattern.",
    usage: "Signals a major bottom after a steady decline.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlladderbottom.json",
    category: "Patterns",
};

pub const CDLMATCHINGLOW_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Matching Low",
    description: "A bullish reversal pattern with two identical lows.",
    usage: "Signals support at a specific price level.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlmatchinglow.json",
    category: "Patterns",
};

pub const CDLMATHOLD_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Mat Hold",
    description: "A bullish continuation pattern.",
    usage: "Signals a strong trend that is likely to persist.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlmathold.json",
    category: "Patterns",
};

pub const CDLMORNINGDOJISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Morning Doji Star",
    description: "A bullish reversal pattern involving a doji.",
    usage: "A highly reliable signal of a market bottom.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlmorningdojistar.json",
    category: "Patterns",
};

pub const CDLMORNINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Morning Star",
    description: "A bullish reversal pattern with three candles.",
    usage: "Signals a trough in a downtrend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlmorningstar.json",
    category: "Patterns",
};

pub const CDLONNECK_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "On-Neck Pattern",
    description: "A bearish continuation pattern.",
    usage: "A weak signal that the downtrend will continue.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlonneck.json",
    category: "Patterns",
};

pub const CDLPIERCING_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Piercing Pattern",
    description: "A bullish reversal pattern in a downtrend.",
    usage: "Indicates a significant entry of buyers.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlpiercing.json",
    category: "Patterns",
};

pub const CDLRISEFALL3METHODS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Rising/Falling Three Methods",
    description: "A strong continuation pattern.",
    usage: "Signals a minor consolidation before the trend resumes.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlrisefall3methods.json",
    category: "Patterns",
};

pub const CDLSEPARATINGLINES_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Separating Lines",
    description: "A continuation pattern where candles move in opposite directions.",
    usage: "Signals trend persistence.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlseparatinglines.json",
    category: "Patterns",
};

pub const CDLSHOOTINGSTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Shooting Star",
    description: "A bearish reversal pattern at the top of an uptrend.",
    usage: "Signals a potential move to the downside.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlshootingstar.json",
    category: "Patterns",
};

pub const CDLSTALLEDPATTERN_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Stalled Pattern",
    description: "A bearish reversal pattern in an uptrend.",
    usage: "Indicates that the upward momentum is slowing down.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlstalledpattern.json",
    category: "Patterns",
};

pub const CDLSTICKSANDWICH_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Stick Sandwich",
    description: "A reversal pattern with alternating candle colors.",
    usage: "Signals a potential support or resistance level.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlsticksandwich.json",
    category: "Patterns",
};

pub const CDLTASUKIGAP_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Tasuki Gap",
    description: "A continuation pattern involving a gap.",
    usage: "Signals trend strength.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdltasukigap.json",
    category: "Patterns",
};

pub const CDLTHRUSTING_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Thrusting Pattern",
    description: "A bearish continuation pattern.",
    usage: "A weak signal of trend persistence.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlthrusting.json",
    category: "Patterns",
};

pub const CDLTRISTAR_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Tristar Pattern",
    description: "A rare reversal pattern consisting of three dojis.",
    usage: "Signals an extreme shift in momentum.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdltristar.json",
    category: "Patterns",
};

pub const CDLUNIQUE3RIVER_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Unique 3 River",
    description: "A bullish reversal pattern.",
    usage: "Signals a potential bottom.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlunique3river.json",
    category: "Patterns",
};

pub const CDLUPSIDEGAP2CROWS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Upside Gap Two Crows",
    description: "A bearish reversal pattern.",
    usage: "Signals a potential top in an uptrend.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlupsidegap2crows.json",
    category: "Patterns",
};

pub const CDLXSIDEGAP3METHODS_METADATA: IndicatorMetadata = IndicatorMetadata {
    name: "Up/Down-Gap Three Methods",
    description: "A continuation pattern.",
    usage: "Signals that the trend is likely to continue after a gap.",
    keywords: &["pattern", "candlestick", "classic"],
    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.",
    params: &[],
    formula_source: "https://www.investopedia.com/articles/active-trading/062315/using-bullish-candlestick-patterns-buy-stocks.asp",
    formula_latex: r#"
\text{Pattern Recognition Logic (TA-Lib Internal)}
"#,
    gold_standard_file: "cdlxsidegap3methods.json",
    category: "Patterns",
};

