folder-treeIndicators 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