- Removed v10 TradingView indicator (moneyline_v10_momentum_dots.pinescript) - Removed v10 penalty system from signal-quality.ts (-30/-25 point penalties) - Removed backtest result files (sweep_*.csv) - Updated copilot-instructions.md to remove v10 references - Simplified direction-specific quality thresholds (LONG 90+, SHORT 80+) Rationale: - 1,944 parameter combinations tested in backtest - All top results IDENTICAL (568 trades, $498 P&L, 61.09% WR) - Momentum parameters had ZERO impact on trade selection - Profit factor 1.027 too low (barely profitable after fees) - Max drawdown -$1,270 vs +$498 profit = terrible risk-reward - v10 penalties were blocking good trades (bug: applied to wrong positions) Keeping v9 as production system - simpler, proven, effective.
33 lines
820 B
Python
33 lines
820 B
Python
__all__ = []
|
|
|
|
__metaclass__ = type
|
|
|
|
|
|
try:
|
|
# Python >=3.2
|
|
from tempfile import TemporaryDirectory
|
|
except ImportError:
|
|
import shutil
|
|
import tempfile
|
|
|
|
class TemporaryDirectory:
|
|
"""
|
|
Very simple temporary directory context manager.
|
|
Will try to delete afterward, but will also ignore OS and similar
|
|
errors on deletion.
|
|
"""
|
|
|
|
def __init__(self):
|
|
self.name = None # Handle mkdtemp raising an exception
|
|
self.name = tempfile.mkdtemp()
|
|
|
|
def __enter__(self):
|
|
return self.name
|
|
|
|
def __exit__(self, exctype, excvalue, exctrace):
|
|
try:
|
|
shutil.rmtree(self.name, True)
|
|
except OSError: # removal errors are not the only possible
|
|
pass
|
|
self.name = None
|