//! Error types for indicator calculations.
use thiserror::Error;
/// Errors that can occur during indicator computation.
#[derive(Debug, Error, PartialEq, Eq, Clone)]
pub enum IndicatorError {
/// Not enough data points to compute the indicator.
#[error("insufficient data: need {required} candles, got {actual}")]
InsufficientData { required: usize, actual: usize },
/// Invalid parameter for indicator configuration.
#[error("invalid parameter: {message}")]
InvalidParameter { message: String },
}