## 0.22.2 (2026-02-15)

### Breaking
- **Trade model split**: `Trade` is now an interface; the previous concrete implementation is `SimulatedTrade` (backtesting/simulation), and live executions are represented by `LiveTrade`.
- **Swing indicator interfaces**: Removed deprecated `RecentSwingHighIndicator` and `RecentSwingLowIndicator`; use `RecentSwingIndicator` and concrete implementations directly.


### Added
- **Charting time axis mode**: Added `TimeAxisMode` with `BAR_INDEX` support to compress non-trading gaps (weekends/holidays) on charts while keeping bar timestamps intact.
- **Concurrent real-time bar series pipeline**: Introduced core support for concurrent, streaming bar ingestion with
  a dedicated series (`ConcurrentBarSeries`/builder), realtime bar model (`RealtimeBar`/`BaseRealtimeBar`), and
  streaming-bar ingestion helpers to enable candle reconciliation and side/liquidity-aware trade aggregation.
- **Live trading domain model**: Added `ExecutionIntent`, `ExecutionFill`, `LiveTrade`, and `LiveTradingRecord` with
  partial-fill tracking, multi-lot bookkeeping, and configurable matching (`FIFO`, `LIFO`, `AVG_COST`, `SPECIFIC_ID`).
- **Strategy trade direction**: Added `Strategy#getStartingType()` (default `BUY`) so strategies can declare long-first
  or short-first behavior explicitly.
- **Open position analytics**: Added `PositionLedger`, `OpenPositionCostBasisCriterion`,
  `OpenPositionUnrealizedProfitCriterion`, and `TotalFeesCriterion` for live exposure and fee analysis.
- **Sharpe Ratio**: Added `SharpeRatioCriterion` and its related calculation classes
- **Equity-curve controls**: Added `OpenPositionHandling` and `PerformanceIndicator` to standardize mark-to-market vs
  realized behavior across performance metrics.
- Added **ThreeInsideUpIndicator** and **ThreeInsideDownIndicator**
- Added **MorningStarIndicator** and **EveningStarIndicator**
- Added **BullishKickerIndicator** and **BearishKickerIndicator**
- Added **PiercingIndicator** and **DarkCloudIndicator**
- **Threshold-based boolean rules**: [#1422](https://github.com/ta4j/ta4j/issues/1422) Added `AndWithThresholdRule`/`OrWithThresholdRule` that also work backwards with a certain threshold.
- Added versions-maven-plugin
- **Elliott Wave analysis toolkit**: Added `ElliottWaveAnalyzer`, `ElliottAnalysisResult`, configurable `PatternSet`,
  and the `org.ta4j.core.indicators.elliott.swing` detector/filter package for pluggable, chart-independent analysis.
- **Elliott Wave confidence modeling**: Added profile-driven confidence scoring with factor breakdowns, time
  alternation diagnostics, and granular Fibonacci relationship scoring.
- **Elliott Wave trend bias**: Added `ElliottTrendBias` and `ElliottTrendBiasIndicator` for scenario-weighted
  bullish/bearish context, plus `ElliottScenarioSet#trendBias()` and `ElliottWaveFacade#trendBias()` helpers.
- **Elliott Wave strategy demos**: Added `ElliottWaveAdaptiveSwingAnalysis`, `ElliottWavePatternProfileDemo`,
  `ElliottWaveTrendBacktest`, and `HighRewardElliottWaveBacktest` with `HighRewardElliottWaveStrategy` for
  selective impulse entries using confidence, alternation, and risk/reward filters.
- **DonchianChannelFacade**: [#1407](https://github.com/ta4j/ta4j/issues/1407): Added **DonchianChannelFacade** new class providing a facade for DonchianChannel Indicators by using lightweight `NumericIndicators`
- Added constructors accepting custom ATR indicator to **AverageTrueRangeStopGainRule** **AverageTrueRangeStopLossRule** and **AverageTrueRangeTrailingStopLossRule**
- **Sortino Ratio**: Added `SortinoRatioCriterion` for downside deviation-based risk adjustment

### Changed
- **Bar builders null handling**: Bar builders now skip null-valued bars entirely instead of inserting placeholder/null bars, leaving gaps when inputs are missing or invalid.
- **Charting overlays**: Refactored overlay renderer construction and centralized time-axis domain value selection to reduce branching without changing chart output.
- **Charting defaults**: Centralized chart styling defaults (anti-aliasing, background, title paint) for consistency across chart types.
- **Chart builder metadata**: Chart definitions now surface a shared metadata object for domain series, title, and time axis mode; chart plans expose a ChartContext and derive their primary series from it, with ChartWorkflow rendering helpers accepting contexts.
- **TimeBarBuilder**: Enhanced with trade ingestion logic, time alignment validation, and RealtimeBar support.
- **BaseBarSeriesBuilder**: Deprecated `setConstrained` in favor of deriving constrained mode from max-bar-count configuration.
- **Release automation (two-phase, tokens, tooling):** Two-phase workflows (`prepare-release.yml`, `publish-release.yml`) with optional direct push (`RELEASE_DIRECT_PUSH`). Token handling: preflight runs before checkout; `GH_TA4J_REPO_TOKEN` is used for checkout and push only when valid, otherwise `github.token`; fail fast when the token lacks write (warn in dry-run). Release process docs overhauled; pre-push hook runs actionlint on workflow changes (see CONTRIBUTING); agent workflow skips full build for workflow/CHANGELOG/docs-only changes.
- **Release scheduler and discussions:** Gated by `RELEASE_SCHEDULER_ENABLED`. Dispatches through prepare-release only when binary-impacting changes exist (`pom.xml` or `src/main/**`); AI prompt uses summarized binary changes and trimmed changelog with optional `RELEASE_AI_MODEL`. Scheduler and release runs post to GitHub Discussions with run mode and timestamp; binary path list and Maven Central summary in collapsible details; previous dry-run comments for the same tag are removed before posting.
- **Publish-release manual trigger:** For workflow_dispatch, `releaseCommit` is optional and auto-detected from `release/<version>.md` on the default branch so manual publishes require only the release version.
- **Release health workflow:** Scheduled checks for tag reachability, snapshot version drift, stale release PRs, and missing release notes, with summaries posted to Discussions.
- **Factory selection from bars**: Derive the NumFactory from the first available bar price instead of assuming a specific price is always present.
- **CashFlow**: Added a realized-only calculation mode alongside the default mark-to-market cash flow curve.
- **Live/backtest calculation parity**: `CashFlow`, `CumulativePnL`, `Returns`, and drawdown criteria now align on bar
  indices, support explicit equity/open-position handling, and correctly account for multiple live lots.
- **Live vs simulated record boundaries**: `BaseTradingRecord` now rejects `LiveTrade`, while charting/analysis paths can
  build partial `LiveTradingRecord` instances so recorded live fees are preserved.
- **Live persistence simplification**: Removed `LiveTradingRecordSnapshot`; persistence now uses `LiveTradingRecord`
  serialization plus explicit cost-model rehydration.
- **Recorded fee semantics**: Live-trading positions and criteria now use recorded `LiveTrade` fees via
  `RecordedTradeCostModel` so PnL reflects actual execution costs.
- **License headers**: Switch Java source file headers to SPDX identifiers.
- **Elliott Wave analysis example**: Scenario probability weighting now applies adaptive confidence contrast so closely scored scenarios separate more clearly.
- **Position duration criterion**: implemented `PositionDurationCriterion` to measure positions duration.
- **Statistics helper**: Consolidated statistics selection into the `Statistics` enum, with Num calculations.
- **Monte Carlo drawdown criterion**: Reused shared statistics helper for simulated drawdown summaries.
- **Dependencies**: update to latest versions
- **Elliott Wave scoring and diagnostics**: Extension ratio scoring now penalizes under/over-extended projections,
  chart/JSON outputs include scenario-weighted trend bias, and logs include time alternation diagnostics.
- **CI concurrency**: Cancel in-progress runs for the primary PR/push validation workflows to reduce backlog.

### Fixed
- **Build script**: Ensure `scripts/run-full-build-quiet.sh` creates a temp filter script on macOS by using a trailing-`X` mktemp template and guarding cleanup when the temp list is unset.
- **TimeBarBuilder**: Preserve in-progress bars when trade ingestion skips across multiple time periods.
- **Release workflow notifications**: Fix discussion comment posting in workflows (unescaped template literals).
- **Release workflow hardening**: Improved `prepare-release.yml` token preflight with push-capability checks and an early `git push --dry-run` probe, and fixed `github-script` `core` redeclaration errors in both `prepare-release.yml` and `publish-release.yml`.
- **Release health workflow**: Ensure discussion notifications are posted even when summary generation fails and avoid `github-script` core redeclaration errors.
- **Indicator unstable periods**: Standardized unstable-bar aggregation and warm-up guarding across indicators so pre-warmup bars are handled consistently, including lookback-driven trend/cross indicators.
- **CashFlow**: Prevented NaN values when a position opens and closes on the same bar index.
- **Returns**: Mark-to-market returns now carry forward cost-adjusted prices for consistent holding-cost treatment.
- **BarSeries MaxBarCount**: Fixed sub-series creation to preserve the original series max bars, instead of resetting it to default Integer.MAX_VALUE 
- **SimulatedTrade**: Avoid divide-by-zero when calculating net price for zero-amount trades and return a non-null
  zero-cost model when deserialized without a transient cost model.
- **Position**: Default transaction/holding cost models after deserialization now return zero-cost models instead of
  `null`.
- **Live-trading validation hardening**: `BaseTradingRecord` now rejects empty trade arrays with a clear error, and
  `PositionBook` validates null/non-positive live trades before mutating lot state.
- **Strategy starting type propagation**: `BarSeriesManager` default `run(...)` methods now use `Strategy#getStartingType()`, `BaseStrategy` composition (`and`/`or`/`opposite`) preserves non-default starting types, and strategy serialization round-trips retain short-mode (`SELL`) starting type metadata.
- **ExecutionFill index handling**: `LiveTradingRecord.recordExecutionFill(ExecutionFill)` now applies explicit fill indices consistently for both `LiveTrade` and non-`LiveTrade` implementations.
- **Keltner channels**: Rebuild ATR indicators after deserialization and include ATR unstable bars in the reported warmup.
- **Trade interface naming**: Aligned the public `Trade` interface filename with Java conventions to restore compilation.
- **Release scheduler**: Gate release decisions on binary-impacting changes (`pom.xml` or `src/main/**`) so workflow-only updates no longer trigger releases.
- **Release scheduler redaction**: Avoid masking long Java class names in binary-change listings.
- **Release version validation**: Fixed version comparison in `prepare-release.yml` to properly validate that `nextVersion` is greater than `releaseVersion` using semantic version sorting, preventing invalid version sequences.
- **Fixed incorrect @since 0.23** by replacing with 0.22.2
- **Full build script**: Fix macOS temp file creation in `run-full-build-quiet.sh` by using a portable mktemp template.
