당사 팬 페이지에 가입하십시오
RiskManagementKit.mq5 is an MQL5 Expert Advisor (EA) for risk control and position management. It is not a signal generator and it does not open trades by strategy logic. The EA is designed to run on any symbol and any timeframe as a protective layer for manual trading or other entry systems.

Program structure (MQL5): Event handlers: OnInit(), OnTick() Main class: CRiskManagementKit Core methods: StartOfDay(), RefreshDayState(), CheckDailyLock(), CalcLotSizeByRisk(), ApplyBreakEven(), RoundVolume()
What the EA does on each tick (OnTick):
Refreshes daily state using TimeCurrent(), TimeToStruct(), StructToTime(). Checks daily equity lock using AccountInfoDouble(ACCOUNT_EQUITY). If not locked, applies break-even logic to open positions. Calculates recommended lot size from risk settings. Shows current status on chart using Comment().
Risk Based Calculation:
Uses AccountInfoDouble(ACCOUNT_BALANCE), SymbolInfoDouble(SYMBOL_TRADE_TICK_VALUE), SymbolInfoDouble(SYMBOL_TRADE_TICK_SIZE), and SymbolInfoDouble(SYMBOL_POINT). Normalizes volume to broker constraints with SymbolInfoDouble(SYMBOL_VOLUME_MIN), SYMBOL_VOLUME_MAX, SYMBOL_VOLUME_STEP. Returns normalized lot size from CalcLotSizeByRisk().
Daily Lock system/logic:
Stores day-start equity and monitors intraday equity change in percent. If equity change <= -InpDailyLossLimitPercent or >= InpDailyProfitTargetPercent, trading state is locked for the day. State is reset at new day boundary.
Break-even logic:
Scans positions with PositionsTotal(), PositionGetTicket(), PositionSelectByTicket(). Reads position data with PositionGetDouble()/PositionGetInteger()/PositionGetString(). For BUY/SELL positions on current chart symbol, when floating profit in points reaches InpBreakEvenTriggerPoints, modifies SL to break-even +/- InpBreakEvenBufferPoints using CTrade::PositionModify().
External input parameters:
input double InpRiskPercent input int InpStopLossPoints input bool InpEnableDailyLock input double InpDailyLossLimitPercent input double InpDailyProfitTargetPercent input bool InpEnableBreakEven input int InpBreakEvenTriggerPoints input int InpBreakEvenBufferPoints
Recommended usage:
Attach EA to the symbol you want to manage. It provides risk sizing and protective management only; entry and exit strategy rules are expected to be handled separately.
WPR for Overbought and Oversold
Overbought and oversold indicators aim to determine where the price may experience a reversal.
nCalculate Lot by Percent
Function of lot calculation by risk percentage
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.