feat(tick_precision): Increased regime BULL/BEAR% to two-decimal display.
This commit is contained in:
@@ -1126,25 +1126,37 @@ class DOLPHINRegimeActor(Actor):
|
||||
|
||||
except Exception as e:
|
||||
self.log.error(f"Nautilus ActorExecutor: Failed to publish regime result: {e}")
|
||||
|
||||
|
||||
# Log regime changes
|
||||
if not self.regime_history or regime != self.regime_history[-1]:
|
||||
self.log.info(f"REGIME CHANGE: {regime.value} | Bull: {bull_ratio:.1%} "
|
||||
f"Bear: {bear_ratio:.1%} Sideways: {sideways_ratio:.1%} | "
|
||||
f"Confidence: {confidence:.1%} | Analyzed: {analyzed}/{total_symbols}")
|
||||
self.log.info(f"REGIME CHANGE: {regime.value} | Bull: {bull_ratio:.2%} "
|
||||
f"Bear: {bear_ratio:.2%} Sideways: {sideways_ratio:.2%} ({bullish}/{bearish}) | "
|
||||
f"Confidence: {confidence:.2%} | Analyzed: {analyzed}/{total_symbols}")
|
||||
self.regime_history.append(regime)
|
||||
|
||||
# Periodic regime status (even without changes)
|
||||
if self.regime_calculations % 1 == 0: # Every calculation
|
||||
self.log.info(f"REGIME STATUS: {regime.value} | Bull: {bull_ratio:.1%} "
|
||||
f"Bear: {bear_ratio:.1%} | Processed: {self.processed_ticks} ticks")
|
||||
if self.regime_calculations % 50 == 0: # Every second, approx, given avg. tick rate
|
||||
# Determine color based on regime
|
||||
if regime == MarketRegime.BULL:
|
||||
color_code = "\033[92m" # Green
|
||||
elif regime == MarketRegime.BEAR:
|
||||
color_code = "\033[91m" # Red
|
||||
else: # SIDEWAYS
|
||||
color_code = "\033[93m" # Yellow
|
||||
|
||||
# Reset color code
|
||||
reset_code = "\033[0m"
|
||||
|
||||
self.log.info(f"{color_code}REGIME STATUS: {regime.value} | Bull: {bull_ratio:.2%} "
|
||||
f"Bear: {bear_ratio:.2%} ({bullish}/{bearish}) | Processed: {self.processed_ticks} ticks{reset_code}")
|
||||
|
||||
# NEW: Log symbol pattern and counts
|
||||
if symbol_pattern: # Only if we have symbols to show
|
||||
pattern_str = " ".join(symbol_pattern) + " " # Create pattern with spaces
|
||||
bull_count = sum(1 for s in symbol_pattern if s.startswith("B"))
|
||||
bear_count = sum(1 for s in symbol_pattern if s.startswith("X"))
|
||||
self.log.info(f"{pattern_str} and totals: BULLS:{bull_count}/BEARS:{bear_count}")
|
||||
|
||||
self.log.debug(f"{pattern_str} and totals: BULLS:{bull_count}/BEARS:{bear_count}")
|
||||
|
||||
def _calculate_confidence(self, bull_ratio: float, bear_ratio: float,
|
||||
analyzed: int, total: int) -> float:
|
||||
@@ -1259,7 +1271,7 @@ def test_siloqy_actors_with_nautilus_process_management():
|
||||
"candle_interval_ms": 15 * 60 * 1000,
|
||||
"throttle_mode": True, # ENABLED: Safe for dual instance testing
|
||||
"throttle_rate_limit_seconds": 10.0, # 10s between batches (vs 2.5s)
|
||||
"max_symbols_throttled": 100 # Only 100 symbols (vs 2000+)
|
||||
"max_symbols_throttled": 414 # Only 100 symbols (vs 2000+)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1269,7 +1281,7 @@ def test_siloqy_actors_with_nautilus_process_management():
|
||||
config={
|
||||
"component_id": "SILOQY-MAIN-ACTOR",
|
||||
"candle_interval_ms": 15 * 60 * 1000,
|
||||
"throttle_mode": True, # ENABLED: Reduced tick generation
|
||||
"throttle_mode": False, # ENABLED: Reduced tick generation
|
||||
"enable_real_data": True # CHANGE TO True for real WebSocket data
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user