Inputs
Inputs are the EA’s input variables: the settings a trader can change in MetaTrader’s EA properties without recompiling.
Declaring inputs
Open the Inputs & Constants tab. Each row has a name, an MQL type (int, double, bool, string), a default value and a comment that MetaTrader shows as the label. Names must be valid MQL identifiers: letters, digits and underscores, not starting with a digit.
The exported EA always has a MagicNumber input, which tags its trades so it only manages its own. One is added for you if you don’t declare it.
Linking block settings
Any numeric block setting can be linked to an int or double input. In the Inspector, use the small Fixed value / Input selector next to the field. A linked field:
- exports as the input’s name, for example
ExecuteMarketOrder("BUY", ResolveLot(LotSize, StopPips), …), so changing the input in MetaTrader changes the behaviour; - uses the input’s value in the Strategy Tester.
Renaming an input keeps its links. If you delete an input that is still linked, the Inspector shows a warning and the block falls back to its default.
The starter templates come with their main settings already linked (lot size, risk %, indicator periods, stop loss and take profit where they have inputs for them).
Changing inputs for one test
The Strategy Tester’s setup lists your inputs. Values you change there apply to that run only; the project keeps its own. The exported .set file and MT5 tester .ini use the values of the run.