Done
What is it?
The Done
method is called once, after the indicator has finished calculating all bars.
It marks the end of the calculation cycle and is typically used for final steps or cleanup.
Syntax
When and Why to Use It
Use Done
when you need to:
Perform post-processing after all
Calculate()
calls are completeDraw or update custom chart objects that rely on full data
Clean up temporary data or buffers
Log or store final values
This method is especially useful if your indicator logic depends on seeing the entire dataset.
Example
Important Notes
Done
is called after all bars have been processed inCalculate()
.It runs once per full calculation cycle — not on every tick.
It’s safe to use this method to add chart decorations, logs, or summary calculations.
Last updated