- Remove OpenAI.mqh entirely (no direct API calls)
- Add AIGateway.mqh: unified gateway → n8n → OpenRouter → Claude
- advisory mode: EA never fails to start (gateway down = MAYBE 0.5x)
- mandatory mode: blocks trades if gateway unreachable
- actions: validate_trade, get_briefing, get_session, get_news_bias,
report_trade, watchlist_status, ping
- includes bid/est_sl/est_tp in validate_trade payload
- Add AISession.mqh: AMD session detection (Asia/London/NY/Interbank)
with corner chart labels showing session phase + GW status
- InputParams.mqh: AI_Mode, AI_Gateway_URL, briefing TF flags,
AI_Session_Draw, Use_Watchlist_Gate
- GlobalVariables.mqh: gateway state, per-TF briefing cache,
session + news headlines globals
- MasterAICoordinator.mqh: wired to AIGateway (SetUseOpenAI shim kept)
- NewsEngine.mqh: merges live AI news bias from gateway
- AISignalConfirmation.mqh: delegates to AIValidateTrade()
- AILabels.mqh: GW status (color-coded), validation stats, per-TF briefs
- ChartLabels.mqh: session label integration
- profitgtx.mq5 v7.00: OnInit init gateway + session, OnTimer multi-TF
briefing refresh, OnTradeTransaction fire-and-forget trade report
- Recompile: 0 errors, 0 warnings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.8 KiB
MQL5
51 lines
1.8 KiB
MQL5
#ifndef CHART_LABELS_MQH
|
|
#define CHART_LABELS_MQH
|
|
|
|
#include "AILabels.mqh"
|
|
|
|
string STATUS_LABEL = "VZ_STATUS";
|
|
|
|
void UpdateLabels()
|
|
{
|
|
string bias = "NEUTRAL";
|
|
if(IsBullBias()) bias = "BULL";
|
|
if(IsBearBias()) bias = "BEAR";
|
|
|
|
string coord = Coordinator_AllowTrade ? "ALLOW" : "BLOCK";
|
|
string news_dir = (News_Bias_Direction > 0 ? "BULL" : News_Bias_Direction < 0 ? "BEAR" : "NEUTRAL");
|
|
|
|
string text = "Mode:" + ModeToString(Current_Mode) +
|
|
" | State:" + StateToString(Current_State) +
|
|
" | Bias:" + bias +
|
|
" | W:" + IntegerToString(Active_Warnings) +
|
|
" | P:" + IntegerToString(Active_Praise_Signals) +
|
|
" | ADX:" + DoubleToString(Current_ADX, 1) +
|
|
" | StochK:" + DoubleToString(Stoch_K_Current, 1) +
|
|
" | Coord:" + coord +
|
|
" | CStr:" + DoubleToString(Coordinator_Cluster_Strength, 1) +
|
|
" | CConf:" + DoubleToString(Coordinator_Conflict_Score, 1) +
|
|
" | NN:" + IntegerToString(NN_Bias) + "/" + DoubleToString(NN_Confidence, 0) +
|
|
" | News:" + news_dir + "/" + DoubleToString(News_Bias_Strength, 0) +
|
|
(News_Trade_Block_Active ? " BLOCK" : "");
|
|
|
|
if(ObjectFind(0, STATUS_LABEL) < 0)
|
|
ObjectCreate(0, STATUS_LABEL, OBJ_LABEL, 0, 0, 0);
|
|
|
|
ObjectSetInteger(0, STATUS_LABEL, OBJPROP_CORNER, CORNER_LEFT_UPPER);
|
|
ObjectSetInteger(0, STATUS_LABEL, OBJPROP_XDISTANCE, 10);
|
|
ObjectSetInteger(0, STATUS_LABEL, OBJPROP_YDISTANCE, 15);
|
|
ObjectSetInteger(0, STATUS_LABEL, OBJPROP_COLOR, clrWhite);
|
|
ObjectSetString(0, STATUS_LABEL, OBJPROP_TEXT, text);
|
|
|
|
UpdateAILabel();
|
|
UpdateSessionLabel();
|
|
}
|
|
|
|
void CleanupLabels()
|
|
{
|
|
ObjectDelete(0, STATUS_LABEL);
|
|
CleanupAILabels();
|
|
CleanupSessionLabel();
|
|
}
|
|
|
|
#endif
|