Indicators Structure

This section explains the core methods that define the structure and lifecycle of a custom indicator in FXR Script. These methods control how your indicator initializes, processes data, and draws.

๐Ÿ— Key Building Blocks

Indicator Lifecycle

  • init โ€” Runs once when the indicator loads. Sets up user inputs, visual settings, and where it will be displayed (main chart or separate panel).

  • onTick โ€” Runs each price update. Calculates indicator values and updates the chart visuals.

๐Ÿ’ก Tip: Keep your init function simple. Only set up whatโ€™s necessary at startup โ€” this makes your indicator load faster and keeps it easier to maintain.


Last updated