{"record":{"id":"4396032ad7cbe68c","repo":"nautechsystems/nautilus_trader","slug":"handle-quote-tick-impl-err","errorCode":null,"errorMessage":"`handle_quote_tick` {IMPL_ERR} `{}`","messagePattern":"`handle_quote_tick` (.+?) `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/indicators/src/indicator.rs","lineNumber":57,"sourceCode":"    fn handle_deltas(&mut self, deltas: &OrderBookDeltas) {\n        panic!(\"`handle_deltas` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    fn handle_depth(&mut self, depth: &OrderBookDepth10) {\n        panic!(\"`handle_depth` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    fn handle_book(&mut self, book: &OrderBook) {\n        panic!(\"`handle_book_mbo` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    /// Updates the indicator with the given quote tick.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the configured price type cannot be extracted from the quote.\n    fn handle_quote(&mut self, quote: &QuoteTick) -> anyhow::Result<()> {\n        anyhow::bail!(\"`handle_quote_tick` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    fn handle_trade(&mut self, trade: &TradeTick) {\n        panic!(\"`handle_trade_tick` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    fn handle_bar(&mut self, bar: &Bar) {\n        panic!(\"`handle_bar` {IMPL_ERR} `{}`\", self.name());\n    }\n\n    fn reset(&mut self);\n}\n\npub trait MovingAverage: Indicator {\n    fn value(&self) -> f64;\n    fn count(&self) -> usize;\n    fn update_raw(&mut self, value: f64);\n}","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/indicators/src/indicator.rs#L39-L75","documentation":"The default Indicator trait implementation of handle_quote bails immediately: it is a placeholder signaling that the concrete indicator must override handle_quote to process QuoteTicks. Hitting it means the indicator type was used polymorphically without providing its own quote-tick handler.","triggerScenarios":"Calling handle_quote on an indicator struct that inherits the default trait impl instead of overriding it, i.e. feeding a quote tick into an indicator that only implemented handle_bar or left handle_quote unimplemented.","commonSituations":"Writing a custom indicator and forgetting to implement handle_quote; registering a partially implemented indicator in an indicator bundle driven by quote ticks; trait-object dispatch where the concrete type never overrode the method.","solutions":["Implement handle_quote in your indicator type to extract the configured price from QuoteTick.","If the indicator only supports bars/trades, stop feeding quote ticks to it and feed the supported update type.","Wrap registration in a check that the indicator declares quote-tick support before subscribing it to quote streams."],"exampleFix":"// before\nimpl Indicator for MyIndicator { fn handle_bar(&mut self, bar: &Bar) { ... } }\n// after\nimpl Indicator for MyIndicator {\n    fn handle_quote(&mut self, quote: &QuoteTick) -> anyhow::Result<()> {\n        self.update(quote.price_of(self.price_type));\n        Ok(())\n    }\n}","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"fn supports_quotes<I: Indicator>(ind: &I) -> bool {\n    // Prefer an explicit capability flag on your indicator type\n    ind.supports_quote_ticks()\n}","tryCatchPattern":"// Rust: match on the error from handle_quote\nmatch indicator.handle_quote(&quote) {\n    Ok(()) => {}\n    Err(e) if e.to_string().contains(\"IMPL_ERR\") => {\n        log::error!(\"indicator {} does not implement handle_quote\", indicator.name());\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always override handle_quote when implementing the Indicator trait for quote-driven indicators.","Use a trait with default-panicking methods sparingly; document required overrides.","Test custom indicators with a QuoteTick before live deployment."],"tags":["indicator","unimplemented","trait","rust"],"backgroundTag":"method-not-implemented","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}