Files
2026-05-27 12:32:26 -04:00

52 lines
2.9 KiB
Plaintext

//+------------------------------------------------------------------+
//| Config.mqh - Global configuration and input parameters |
//| Central place for all EA settings |
//+------------------------------------------------------------------+
#ifndef __CONFIG_MQH__
#define __CONFIG_MQH__
// ==================== LOT SIZING ====================
enum E_LOT_MODE
{
LOT_MODE_FIXED = 0, // Use fixed lot size
LOT_MODE_RISK = 1 // Use risk percent method
};
input E_LOT_MODE g_lot_mode = LOT_MODE_FIXED; // Lot Sizing Mode
input double g_fixed_lot = 0.1; // Fixed Lot Size (if LOT_MODE_FIXED)
input double g_risk_percent = 2.0; // Risk Percent (if LOT_MODE_RISK)
input double g_max_lot = 10.0; // Maximum Lot Size
input double g_min_lot = 0.01; // Minimum Lot Size
// ==================== TRADE MANAGEMENT ====================
input int g_magic_number = 12345; // Magic Number for trades
input int g_stop_loss_points = 100; // Stop Loss in points
input int g_take_profit_points = 200; // Take Profit in points
input int g_max_spread_points = 10; // Max Spread in points
input int g_max_positions = 1; // Max positions at once
// ==================== TRADING HOURS ====================
input bool g_use_trading_hours = false; // Enable trading hour filter
input int g_trade_start_hour = 8; // Trading Start Hour (0-23)
input int g_trade_end_hour = 20; // Trading End Hour (0-23)
// ==================== TRAILING STOP ====================
input bool g_use_trailing_stop = true; // Use Trailing Stop
input int g_trailing_stop_points= 50; // Trailing Stop Distance
input bool g_use_break_even = true; // Use Break Even
input int g_break_even_profit = 10; // Break Even Trigger profit
input int g_break_even_sl = 2; // Break Even SL distance
// ==================== STRATEGY PARAMETERS ====================
input int g_ma_fast_period = 10; // Fast MA Period
input int g_ma_slow_period = 20; // Slow MA Period
input int g_ma_shift = 0; // MA Shift
input ENUM_MA_METHOD g_ma_method = MODE_SMA; // MA Method
input ENUM_APPLIED_PRICE g_ma_price = PRICE_CLOSE; // MA Applied Price
// ==================== DEBUG ====================
input bool g_debug_mode = true; // Enable Debug Logging
#endif //__CONFIG_MQH__