Back to Nautilus Trader

Example: Simple use of technical indicators

examples/backtest/example_07_using_indicators/README.md

1.226.0631 B
Original Source

Example: Simple use of technical indicators

This example demonstrates how to use technical indicators in a NautilusTrader strategy.

The example shows how to set up and use a simple Exponential Moving Average (EMA) indicator within a trading strategy, demonstrating proper initialization, updating, and accessing latest / previous indicator values.

What this example demonstrates:

  • Creating and configuring a technical indicator (EMA).
  • Registering the indicator to receive bar data.
  • Accessing indicator values in the strategy.
  • Storing historical indicator values.
  • Accessing latest / previous indicator values.