Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# Lifecycle Methods

The abstract class Strategy defines a design pattern that needs to be followed by user-defined strategies. The design pattern was greatly influenced by React.js components and their lifecycle methods.

When building strategies, lifecycle methods needs to be overloaded. Trading logics should be implemented in these methods.

Contents:

- Summary
- def initialize
  - Reference
- def on_trading_iteration
  - Reference
- def before_market_opens
  - Reference
- def before_starting_trading
  - Reference
- def before_market_closes
  - Reference
- def after_market_closes
  - Reference
- def on_abrupt_closing
  - Reference
- def on_bot_crash
  - Reference
- def trace_stats
  - Reference
- def on_new_order
  - Reference
- def on_partially_filled_order
  - Reference
- def on_filled_order
  - Reference
- def on_canceled_order
  - Reference
- def on_parameters_updated
  - Reference