Skip to content

Conversation

@JosueNina
Copy link
Collaborator

@JosueNina JosueNina commented Jan 5, 2026

Description

Adds a new default initialization path for custom Python indicators, requiring overriding compute_next_value instead of update and passing the instance to the base class, while preserving backward compatibility.

Related Issue

Closes #9085

Motivation and Context

N/A

Requires Documentation Change

Yes.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

@JosueNina JosueNina changed the title WIP: Add new initialization path for Custom Python Indicators Refactor Custom Python Indicators to rely on compute_next_value Jan 5, 2026
@JosueNina JosueNina changed the title Refactor Custom Python Indicators to rely on compute_next_value Refactor PythonIndicator to rely on compute_next_value Jan 5, 2026
@AlexCatarino
Copy link
Member

AlexCatarino commented Jan 6, 2026

Perhaps you should remove the examples using update so users don't use it. I plan on flagging it in the Docs as legacy and recommend this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PythonIndicator Updated is not Called on Manual Updates

2 participants