Introduction to BoxGate EA MT5
BoxGate EA MT5 is an automated trading Expert Advisor (EA) featuring configurable market selection, flexible risk management, position sizing, optional news filtering, and customizable chart display settings. It provides traders with several money management options, including fixed lot sizing, percentage-based risk, and balance-based lot calculation.

BoxGate EA MT5 also includes configurable maximum lot limits, spread control, trade identification, logging functionality, and chart visualization tools. These settings allow traders to adjust the EA's trading environment and risk parameters according to their account size and trading preferences.
Below is a complete explanation of all available BoxGate EA MT5 Inputs, including their default values and functions.

Market
InpMarket (default 0)
Chooses which market the EA trades. 0 means automatic: if the chart symbol contains XAU or GOLD the EA runs the gold rules, otherwise it runs the USDJPY rules. 1 forces USDJPY rules and 2 forces XAUUSD rules, whatever the symbol is called at your broker. This one setting decides the box times, the exit time, the maximum number of trades per day and how the stop loss is calculated.
Risk
InpRiskMode (default 1)
Selects how the lot size is calculated. 0 = risk a fixed amount of money per trade (InpRiskMoney). 1 = risk a percentage of the initial balance (InpRiskPercent). 2 = always use the same lot (InpFixedLot). 3 = risk a percentage of the current balance, so the lot grows and shrinks with the account. 4 = increase the lot in steps as the balance grows (InpBalLot and InpBalAmount). In modes 0, 1 and 3 the lot is worked out from the distance between the entry price and the stop loss.
InpRiskMoney (default 100.0)
The money amount risked on each trade, in account currency. It is used only when InpRiskMode is 0.
InpRiskPercent (default 1.0)
The percentage of the balance risked on each trade. It is used when InpRiskMode is 1 (percentage of the initial balance) or 3 (percentage of the current balance).
InpFixedLot (default 0.1)
The lot size used for every trade when InpRiskMode is 2. It is still limited by the broker's minimum, maximum and step, and by InpMaxLot.
InpBalLot (default 0.01)
Used when InpRiskMode is 4. It is the number of lots added for each full step of InpBalAmount in the balance.
InpBalAmount (default 1000.0)
Used when InpRiskMode is 4. It is the size of one balance step. The lot equals the number of full steps in the balance multiplied by InpBalLot. For example, with 1000 and 0.01, a balance of 3,500 gives 0.03 lots.
InpInitialBalance (default 0.0)
The reference balance for InpRiskMode 1. If you enter a value above zero, the EA uses it. If you leave it at 0, the EA uses the balance at the moment it was started on the chart, so the risk amount stays fixed while the EA keeps running.
InpMaxLot (default 50.0)
A hard upper limit for the lot size. Whatever the risk calculation gives, the EA never opens more than this.
InpMinLotSmall (default true)
Decides what happens when the calculated lot is smaller than the broker's minimum lot. If true, the EA opens the minimum lot anyway, which means the real risk can be higher than you set. If false, the EA skips the trade and the day is finished.
InpMaxSpreadPoints (default 0)
The largest spread, in points, at which a new trade may be opened. If the spread is wider, the EA waits and tries again on a later tick. 0 turns the filter off. It does not affect trades that are already open.
News (optional)
InpNewsFilter (default false)
Turns the news filter on or off. When on, the EA acts only on the first Friday of each month (the usual date of the US jobs report). During the news window it opens no new trades and closes any trade it already has.
InpNewsMinutesBefore (default 10)
How many minutes before the news time the window starts.
InpNewsMinutesAfter (default 30)
How many minutes after the news time the window ends.
InpNewsHour (default 15)
The hour of the news release, in broker server time, not your local time.
InpNewsMinute (default 30)
The minute of the news release, in broker server time. With the default hour of 15, the news time is 15:30 server time.
Technical
InpMagicNumber (default 0)
The ID the EA puts on its trades so it can recognise them and ignore trades from other EAs or from manual trading. If you leave it at 0, the EA uses 27010001 for USDJPY and 27010002 for XAUUSD. Set your own number only if you run several copies on the same symbol.
InpTradeComment (default "BoxGate")
The text written in the comment field of each order. It helps you find the EA's trades in the history.
InpEnableLogging (default true)
If true, the EA writes its messages (such as skipped trades) to the Experts tab. Turn it off for a quieter log.
Display
InpShowPanel (default true)
Shows or hides the information panel on the chart. The panel shows the status, server time, box levels, current trade, risk and lot, closed-trade statistics, a short journal, and balance and equity. It is not drawn in the Strategy Tester.
InpDrawChart (default true)
Draws the box on the chart as two dashed lines: the box high in green and the box low in red. It is not drawn in the Strategy Tester.
InpPanelCorner (default 0)
The position of the panel on the chart. 0 = top left, 1 = top right, 2 = bottom left, 3 = bottom right.
InpFontSize (default 9)
The base font size used in the panel. The title and other elements scale from this value.
InpHistoryDays (default 10)
This input exists in the EA, but the current code does not use it, so changing it has no effect.
Risk warning: past or backtest results do not guarantee future profit. Test on a demo account first and use only money you can afford to lose.
