27 行
1.1 KiB
MQL5
27 行
1.1 KiB
MQL5
#ifndef AI_SIGNAL_CONFIRMATION_MQH
|
|
#define AI_SIGNAL_CONFIRMATION_MQH
|
|
|
|
// ---------------------------------------------------------------------------
|
|
// AISignalConfirmation.mqh — Trade gate using AI Gateway
|
|
// advisory: allow at 0.5x size if gateway is down
|
|
// mandatory: block trade if gateway is down or returns NO
|
|
// off: always allow (no AI gate)
|
|
// ---------------------------------------------------------------------------
|
|
|
|
bool AIApproveTrade(const bool is_buy,
|
|
const string setup_name,
|
|
const double intended_lots,
|
|
const double spread_points,
|
|
const double risk_amount,
|
|
const double margin_required,
|
|
const double free_margin,
|
|
const string session_phase,
|
|
double &size_multiplier)
|
|
{
|
|
if(!AI_Validate_Trades || AI_Mode == "off")
|
|
return true;
|
|
|
|
return AIValidateTrade(setup_name, is_buy, intended_lots, spread_points, risk_amount, margin_required, free_margin, session_phase, size_multiplier);
|
|
}
|
|
|
|
#endif
|