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:
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user