fix: Add signal_info_override and confidence_override to execute_trade_v2_adaptive
Deploy to Windows VPS / deploy (push) Has been cancelled
Deploy to Windows VPS / deploy (push) Has been cancelled
PROBLEM: - execute_trade_v2_adaptive didn't accept pre-calculated signal_info - Function did its own signal analysis internally - Trying to pass entry_signal/signal_info caused parameter errors SOLUTION: - Added optional parameters: signal_info_override, confidence_override - If provided, function uses pre-calculated values - If not provided, function calculates values itself (backward compatible) CHANGES: - Cell 28: Added new parameters to function signature - Cell 28: Use signal_info_override if provided - Cell 28: Use confidence_override if provided - Cells 85, 90: Updated execute_trade calls to use new parameters - activate_enhanced_scoring.py: Updated to use new parameters Now enhanced_trading_check_wrapper can pass its hybrid confidence score to execute_trade_v2_adaptive properly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -123,15 +123,11 @@ def enhanced_trading_check_wrapper(symbol="XAUUSD", debug=False):
|
|||||||
if final_confidence >= adaptive_threshold:
|
if final_confidence >= adaptive_threshold:
|
||||||
print(f"\\n🎯 Signal qualified! {final_confidence:.1f}% >= {adaptive_threshold:.1f}%")
|
print(f"\\n🎯 Signal qualified! {final_confidence:.1f}% >= {adaptive_threshold:.1f}%")
|
||||||
|
|
||||||
# Convert signal to string for execute_trade
|
# Execute trade with pre-calculated signal_info and enhanced confidence
|
||||||
signal_direction = "LONG" if entry_signal == 1 else "SHORT"
|
|
||||||
|
|
||||||
# Execute trade with ENHANCED confidence
|
|
||||||
result = execute_trade_v2_adaptive(
|
result = execute_trade_v2_adaptive(
|
||||||
symbol=symbol,
|
symbol=symbol,
|
||||||
entry_signal=signal_direction,
|
signal_info_override=signal_info,
|
||||||
confidence=final_confidence, # ← Use enhanced score!
|
confidence_override=final_confidence # ← Use hybrid score!
|
||||||
signal_info=signal_info
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"timestamp": "2026-01-23T00:00:00.067537",
|
"timestamp": "2026-01-23T08:15:25.214791",
|
||||||
"session_thresholds": {
|
"session_thresholds": {
|
||||||
"asian": 60,
|
"asian": 60,
|
||||||
"ny": 60,
|
"ny": 60,
|
||||||
"london": 90,
|
"london": 80,
|
||||||
"overlap": 70
|
"overlap": 70
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
|
|||||||
@@ -4615,5 +4615,32 @@
|
|||||||
},
|
},
|
||||||
"position_control_active": 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))"
|
"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))"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": "2026-01-23T08:15:23.095258",
|
||||||
|
"version": "V1.6_Adaptive_Complete",
|
||||||
|
"symbol": "XAUUSD",
|
||||||
|
"entry_signal": 1,
|
||||||
|
"confidence": 100.0,
|
||||||
|
"adaptive_threshold": 70,
|
||||||
|
"signal_quality": "excellent",
|
||||||
|
"market_regime": "ranging",
|
||||||
|
"regime_strength": 23.310395164481207,
|
||||||
|
"risk_adjusted_strength": 298807.0387491906,
|
||||||
|
"adaptive_interval": 15,
|
||||||
|
"session": "asian",
|
||||||
|
"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=634634801, order=698895870, volume=0.1, price=4956.52, bid=0.0, ask=0.0, comment='Request executed', request_id=1587946485, retcode_external=0, request=TradeRequest(action=1, magic=234000, order=0, symbol='XAUUSD', volume=0.1, price=4956.46, stoplimit=0.0, sl=4951.0291128352765, tp=4969.302217911808, 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