OnParamsChange
What is it?
Syntax
public OnParamsChange(): void {
// custom logic after parameter change
}When and Why to Use It
Use OnParamsChange() When You Need To:
Don't Use OnParamsChange() If:
What CAN Be Done in OnParamsChange
OnParamsChangeBuffer and Display Updates
Chart Object Management
Internal State Management
What CANNOT Be Done in OnParamsChange
OnParamsChangeβ Forbidden Operations
β Wrong Approach
β
Correct Approach
Practical Examples
Example 1: Dynamic Buffer Styling
Example 2: Parameter Validation and Dependencies
Example 3: Chart Object Management
Best Practices
β
Do This
β Avoid This
When NOT to Implement OnParamsChange()
Key Rules Summary
Pro Tip
Last updated