From Pine

Forge API 1Updated 1 Oct 2026

A Pine indicator maps to an fg.Indicator and a Pine strategy to an fg.Strategy. The names differ more than the ideas: outputs replace plot, settings replace input, and the ta module carries the indicators you know.

What is different

  • Forge works on whole arrays. A Pine script runs once per bar and close[1] is the previous bar. A Forge calculate fills arrays, and a strategy's compute returns signals for every bar at once.
  • Closed bars only. Pine recalculates the forming bar on every tick, so a value can change before the bar ends. Forge decides on closed bars.
  • No look-ahead switch. A higher-timeframe series is visible only after its own bar has closed.
  • Missing values are NaN, and fg.nz and fg.isna replace nz and na.

The traps page lists the mistakes that cost the most.

Then read

Start with repainting and look-ahead, which names repainting as Pine does, and bar close and fills.

Name by name

Every Pine name beside what you write in Forge.