Refine strategy simulation with pyramiding, partial exits, and fixed marker logic

- Implement position pyramiding and 15% partial profit-taking
- Add mutual exclusion between entry and exit in the same candle
- Optimize simulation to use cached indicator results
- Revert Hurst Bands signal logic to cross-down (dip entry)
- Add safety filter for chart markers to prevent rendering errors
This commit is contained in:
DiTus
2026-03-03 15:39:59 +01:00
parent d92af6903d
commit 633a146e8e
3 changed files with 120 additions and 99 deletions

View File

@ -604,10 +604,14 @@ async loadSignals() {
// Merge simulation markers if present
if (this.simulationMarkers && this.simulationMarkers.length > 0) {
markers = [...markers, ...this.simulationMarkers];
// Re-sort combined markers by time
markers.sort((a, b) => a.time - b.time);
}
// CRITICAL: Filter out any markers with invalid timestamps before passing to chart
markers = markers.filter(m => m && m.time !== null && m.time !== undefined && !isNaN(m.time));
// Re-sort combined markers by time
markers.sort((a, b) => a.time - b.time);
// If we have a marker controller, update markers through it
if (this.markerController) {
try {