Coming from plain Python

Forge API 1Updated 1 Oct 2026

What is the same

Forge code is Python. An indicator is one file with one class, settings are class attributes, and the work is done in a method that fills arrays. If you can read that, you can read a Forge file.

What is different

  • The file declares its level. Every Forge file contains FORGE_API = 1. A file without it is refused.
  • Settings are declared, not passed. param.Int(14, min=2, max=200) is a whole number that defaults to 14 and cannot leave 2 to 200. The same declaration builds the settings form and the values a sweep tries.
  • Missing values are NaN. The first bars of an indicator are empty until it has seen enough bars, and a comparison with NaN is false.
  • Decisions are made on closed bars. A bar that is still forming is not read, and a decision at a bar's close cannot fill at that close.
  • Time is UTC.

Where to start

Read three short pages in this order: repainting and look-ahead, warm-up and bar close and fills. Then write your first indicator and your first strategy.