MagicNumberThis number is necessary in order to identify exactly the orders position management. Enter a unique number that you assign to just this one chart exclusively. Through individual magic numbers in each chart, you can use the Expert Advisor several times in various currency pairs, time frames or settings (Metatrader 4 only). Set a different magic number each time you use two or more Expert Advisors on the same Symbol.
TakeProfitThis is used for achieving a profit with each individual position. The value is expressed in pips. When this pip value is reached, the Expert Advisor automatically closes the position.
StopLossThis is the “safety net” of each individual trade. When the stop loss is reached, the Expert Advisor closes the position immediately in order to avoid further losses. This occurrence is almost always associated with a big minus. Therefore, the stop loss plays an important role. ALWAYS SET A STOP LOSS! The continuation of your trading account may depend upon it. Remember that technical problems (e.g. Internet connections, computer failures etc.) can complicate or even prevent you from accessing your broker. Or your MetaTrader crashes… Then the Expert Advisor’s monitoring functions no longer work. If during this time your trade goes against you, then it is wise to have a stop loss in the market. The broker takes over and closes the positions. How far you set it depends on your personal situation. Use the strategy tester or a demo account in order to find a suitable setting. The stop loss should be neither too wide, nor too small. Although a small stop loss would significantly reduce the risk on the trade, it would also be triggered more often. For as many small profits lead up to a big one, so do many small losses result in a big loss.
LotSizeIt is with this lot size value that the EA will open a new position.
SlippageSet the maximum difference (in pips) you want to allow between the expected price (the price the EA tries to enter) and the actual executed price. Slippage can occur during busy trading hours when there is high volatility. Reasonable values are from 1 up to 3.
MaxOpenOrders / MaxOpenTrades / MaxOpenPositionsThis function prevents the EA from opening too many positions and consuming the available margin, which could lead to a costly margin call. It is a limitation of the number of open positions for each EA. When this number is reached, the EA will only open a new position if an existing one is closed. This function is not FSA/FIFO compatible.
InverseStrategyIf the InverseStrategy function is set to True, the EA turns the entry logic around. If the EA gets a buy signal, it will now open a sell position instead, and vice versa.
ShowCommentThis will print some useful information on the chart. Set the value to False to speed up your backtests.
ReverseOnOppositeSignal / ReverseOnSignalThis function reverses the open position(s) if there is an entry signal in the other direction. If for example, you have a 2 buy order open and a sell signal is generated, the EA will automatically close both buy order and open a sell order. The new trade will always have the same lot size as the last one.
CloseOnSignal / Exit StrategySome EA’s have an Exit Strategy. Set this to True in order to use it.
TradeOnNewBarSet this to True if you want to trade only on the opening of a new bar. If for example the EA is on an H1 chart and a signal is generated at 09:42, the EA only opens the trade at 10:00. If set to false, the EA will trade sooner but may also lead to some wrong signals.
Trade max. once per barSet this to False if you want your EA to trade multiple times per bar. It is recommended to set this to True.
Trade DirectionChoose whether you want to trade long or short positions only or both.
Open New PositionsIf this is set to false, the EA will not open new position but still manage the remaining open positions. If you EA has the capability to send Notifications, it will still send them on each signal.
MaxSpreadHere you define the maximum spread you want the EA to trade with. This is a safeguarding function. If for example, the market moves very quickly with much volatility, the spread can be very high. You do not want your EA to trade under such conditions.
Send NotificationsThis allows the EA/Indicator to send Alerts, Email, and Push-Notification to your MetaTrader Mobile App
UseMoneyManagementIf this parameter is set to True, the lot size will be adjusted automatically. The EA then risks only a certain percentage of your trading account. If for example the trading account is $2,000 and RiskPercent is set to 2, then the EA risks only $40 (2000 * 2/100) per trade. If the stop loss is set at 50 pips, the EA will open the next position with 0.08 lots.
RiskPercentSet the maximum you want to risk on the trade, expressed in a percentage of your account equity.
Moving Average (MA) Trend FilterIf the MA trend filter is set to True, the EA will only enter long positions if the current price is above the MA. Vice versa for short.
UseADXFilterSet this to True if you want to use the ADX filter. The ADX filter is based on 3 lines: the ADX main line, the +DI line and the -DI line.
ADX PeriodThe ADX Period.
ADX LevelThe EA trades only if the ADX main line is above this level.
+DI/-DI LevelThe EA enters a long (buy) trade only if the +DI line is above this level. -DI must be above this level for a short (sell) trade.
+DI above/below -DIIf this is set to True, then the EA trades only if the +DI is above the -DI for a long trade (buy). -DI must be above the +DI for a short trade (sell).
ADX Applied PriceThe applied price for the ADX indicator.
BreakevenThe Breakeven function secures your trade by moving the stop loss to a profitable area once your trade has moved a certain number of pips. Example: If BreakEvenPoint is 20 and PipsToLockIn is 5, then the EA will automatically move the stop loss to +5 pips once the trade has moved +20 pips. This function requires a stop loss greater than zero!
UseBreakEvenSet UseBreakEven to True if you want to use break even
BreakEvenPointThis determines when you want your position to break even. This parameter will activate the break even function if the value is set above 0.
PipsToLockInDetermine the pips you want to save after reaching the break even level.
UseTrailingStopSet this to True if you want to use a trailing stop
TrailingStopHere you set the number of pips you want to trail. If the distance is too great, you give away too much of the profits gained. If it is too small, you will be stopped out too often with only small profits. This function is inactive when set at 0.
WhenToTrailThis tells the Expert Advisor at what point (expressed in pips) it must start trailing. If you enter 30 for example, the EA trails this position when it reaches +30 pips. This value can also be negative (if for example, you have a wide spread).
TrailingStepNo description yet. Set it to 1.
CandleTrailThis trailing function trails the high/low of a certain number of candles/bars. Example: If CandlesBack is set to 10 and PadAmount to 5, the EA moves the stop loss to 5 pips below the lowest low of the last 10 candles/bars, and above the highest high for a sell trade. This function requires a stop loss greater than zero!
PadAmountThis gives you a small margin above or below the CandleTrail.
CandlesBackHere you determine how many CandlesBack the CandleTrail function should count back.
ATR TrailThis is a trailing function based on the ATR (Average True Range) indicator, which is integrated into Metatrader. This function trails your position by the result of the ATR period multiplied by its multiplier (divisor).
Use ATR TrailSet this to True if you want to use this function.
ATR PeriodSet the period for the ATR indicator.
ATR MultiplierMultiplies the ATR level with this value.
MartingaleSophisticated Martingale options allow a perfectly coordinated position management for your lot size. This determines how to deal with the lot size after a loss or profit. You can widen the positions as well as reduce them. Martingale positions can easily become an uncontrollable risk.
The Martingale function is not compatible with the ReverseOnOppositeSignal function since the positions opened by the ReverseOnOppositeSignal will always have the same lotSize as the initial position.
1 thought on “Functions Glossary”