feat: Add debug output for SunnyBands signal verification in scanner
This commit is contained in:
parent
3f10207481
commit
b58df4f952
@ -334,6 +334,18 @@ def run_sunny_scanner(min_price: float, max_price: float, min_volume: int, portf
|
|||||||
# Calculate SunnyBands
|
# Calculate SunnyBands
|
||||||
results = sunny.calculate(df)
|
results = sunny.calculate(df)
|
||||||
|
|
||||||
|
# Debug data alignment
|
||||||
|
print(f"\nDebug: Data for {ticker}")
|
||||||
|
print("Last 3 candles:")
|
||||||
|
for i in [-3, -2, -1]:
|
||||||
|
candle = df.iloc[i]
|
||||||
|
bands = results.iloc[i]
|
||||||
|
print(f"\nDate/Time: {candle['date']}")
|
||||||
|
print(f"OHLC: ${candle['open']:.2f}, ${candle['high']:.2f}, ${candle['low']:.2f}, ${candle['close']:.2f}")
|
||||||
|
print(f"DMA: ${bands['dma']:.2f}")
|
||||||
|
print(f"Bands: Lower=${bands['lower_band']:.2f}, Upper=${bands['upper_band']:.2f}")
|
||||||
|
print(f"Signals: Bullish={bands['bullish_signal']}, Bearish={bands['bearish_signal']}")
|
||||||
|
|
||||||
# Check last day's signals
|
# Check last day's signals
|
||||||
last_day = df.iloc[-1]
|
last_day = df.iloc[-1]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user