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:
@ -70,21 +70,21 @@ function calculateHurstSignal(indicator, lastCandle, prevCandle, values, prevVal
|
||||
return null;
|
||||
}
|
||||
|
||||
// BUY: Price crosses DOWN through lower Hurst Band
|
||||
// BUY: Price crosses DOWN through lower Hurst Band (dip entry)
|
||||
if (prevClose > prevLower && close <= lower) {
|
||||
return {
|
||||
type: 'buy',
|
||||
strength: 75,
|
||||
strength: 80,
|
||||
value: close,
|
||||
reasoning: `Price crossed DOWN through lower Hurst Band`
|
||||
};
|
||||
}
|
||||
|
||||
// SELL: Price crosses DOWN through upper Hurst Band (reversal from top)
|
||||
// SELL: Price crosses DOWN through upper Hurst Band (reversal entry)
|
||||
if (prevClose > prevUpper && close <= upper) {
|
||||
return {
|
||||
type: 'sell',
|
||||
strength: 75,
|
||||
strength: 80,
|
||||
value: close,
|
||||
reasoning: `Price crossed DOWN through upper Hurst Band`
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user