the holy grail. untill next time

This commit is contained in:
zastian-dev
2026-02-13 17:53:11 +00:00
parent 73cc7a3a66
commit edc655ca2c
5 changed files with 200 additions and 248 deletions

View File

@@ -532,13 +532,13 @@ pub fn generate_signal(symbol: &str, current: &IndicatorRow, previous: &Indicato
buy_score += 4.0;
// TIMING: RSI-14 pullback in uptrend (the "buy the dip" pattern)
// RSI 30-50 means price has pulled back but trend is intact.
// This is the most robust single-stock entry timing signal.
if !rsi.is_nan() && rsi >= 30.0 && rsi <= 50.0 {
// Widened to 25-55: in strong uptrends RSI often stays 40-65,
// so the old 30-50 window missed many good pullback entries.
if !rsi.is_nan() && rsi >= 25.0 && rsi <= 55.0 {
buy_score += 3.0;
}
// Moderate pullback (RSI 50-60) still gets some credit
else if !rsi.is_nan() && rsi > 50.0 && rsi <= 60.0 {
// Moderate pullback (RSI 55-65) still gets some credit
else if !rsi.is_nan() && rsi > 55.0 && rsi <= 65.0 {
buy_score += 1.0;
}
// RSI > 70 = overbought, do not add to buy score (chasing)