fix: Critical bug - entry_signal type mismatch preventing all trades
Deploy to Windows VPS / deploy (push) Has been cancelled
Deploy to Windows VPS / deploy (push) Has been cancelled
CRITICAL BUG:
- extended_top_down_v2_adaptive returns entry_signal as NUMBER (1, -1, 0)
- enhanced_trading_check_wrapper checked for STRINGS ("LONG", "SHORT")
- Result: 1 in ["LONG", "SHORT"] = False → NO TRADES EVER EXECUTED!
FIX:
- Changed: if entry_signal in ["LONG", "SHORT"]
- To: if entry_signal in [1, -1] # 1=LONG, -1=SHORT
- Added signal_direction conversion before execute_trade call
This explains why no trades were being executed despite good signals!
Updated:
- TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb (Cells 85, 90)
- activate_enhanced_scoring.py
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c4c10f69fb
commit
939e01d994
4 files changed
+60705
-137
No files matched your search
@@ -4588,5 +4588,32 @@
|
||||
},
|
||||
"position_control_active": true,
|
||||
"order_result": "OrderSendResult(retcode=10009, deal=631796029, order=695596696, volume=0.1, price=4823.55, bid=0.0, ask=0.0, comment='Request executed', request_id=1587946477, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4823.62, stoplimit=0.0, sl=4818.361220809183, tp=4836.031947977042, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||
},
|
||||
{
|
||||
"timestamp": "2026-01-22T18:39:29.895012",
|
||||
"version": "V1.6_Adaptive_Complete",
|
||||
"symbol": "XAUUSD",
|
||||
"entry_signal": 1,
|
||||
"confidence": 97.81,
|
||||
"adaptive_threshold": 70,
|
||||
"signal_quality": "excellent",
|
||||
"market_regime": "ranging",
|
||||
"regime_strength": 33.894449391752474,
|
||||
"risk_adjusted_strength": 171361.16964171888,
|
||||
"adaptive_interval": 5,
|
||||
"session": "ny",
|
||||
"relaxed_features": {
|
||||
"pullback_entry_disabled": true,
|
||||
"lower_confidence_threshold": true,
|
||||
"lower_min_strength": true,
|
||||
"fixed_tf_alignment": true
|
||||
},
|
||||
"adaptive_features": {
|
||||
"adaptive_rhythm": true,
|
||||
"session_aware": true,
|
||||
"volatility_based": true
|
||||
},
|
||||
"position_control_active": true,
|
||||
"order_result": "OrderSendResult(retcode=10009, deal=633007436, order=696946027, volume=0.1, price=4893.91, bid=0.0, ask=0.0, comment='Request executed', request_id=1587946480, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4893.93, stoplimit=0.0, sl=4883.200531304935, tp=4917.9186717376615, deviation=20, type=0, type_filling=1, type_time=0, expiration=0, comment='TradingBot_V1.6', position=0, position_by=0))"
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user