User manual to the advisor Martex 6.0

This version of the EA works only on InstaForex broker accounts!

How to open an account in InstaForex       Guide to the advisor Martex 5.3

Martexmartingale» and «Forex») – is a universal advisor works according to the martingale strategy, has a unique hedging system, is able to get out of the "lock" on its own. The Martex EA can average and hedge not only its own orders, but also other orders ("alien") opened by another EA or manually opened by a trader. To do this, you just need to set the magic number "-1"in the EA. The EA will be interesting for both beginners and experienced traders.

Features of the work of the EA Martex

  • the EA opens a new order only after closing the previous bar and opening a new bar of the working timeframe;
  • before opening a new order, the EA checks the positions of the previous bars if their position corresponds to the algorithm of the EA the order will be opened if not, the opening of the order will be postponed until the opening of the new bar;
  • The same is true if Auto Trend is enabled, the order will be opened only if there is a corresponding signal from Auto Trend;
  • since the EA analyzes the previous bars, accurate quotes with full bars and without gaps are necessary for the correct optimization of the EA;
  • if hedging is allowed, the first order in the opposite direction will be opened only if the remaining free margin is lower or equal to "Limit of free margin..." and if the distance between the last open order and the current price (Ask or Buy) is greater than "Indent for the first hedge order", if at least one of these conditions is not met, the order will not be opened;
  • the second hedge order will be opened if the remaining free margin becomes less than the difference: "Limit of free margin..." minus 10;
  • the trailing stop is blocked when there is a "lock", i.e. when there are orders open in both directions, you can change this in the settings in the "Hedging" block;
  • if the margin level falls below 100 %, the EA will not close orders in the "lock" to prevent a stop-out.


  • Before starting the Martex EA on a real account, first optimize it in the MT4 strategy tester on historical data (at least 3 months) of your broker.
  • If you want to try Martex EA on another currency pair or on another timeframe, you must first optimize the EA in the strategy tester.
  • How to optimize the EA see here


  • the EA works on the martingale strategy;
  • it has a hedging system and can exit the "lock";
  • it can average and hedge "alien" orders, including those opened manually by a trader;
  • it has a trend direction filter Auto Trend, which indicates the direction for opening orders;
  • if the free margin decreases below the set value, trading is stopped;
  • fixed profit per day;
  • trailing stop, both for single orders and general for orders with averaging;
  • limit on the number of open orders by martingale;
  • limitation on the total lot size of all open orders of one direction;
  • sending messages to email about lack of funds and when trading stops;
  • sending Push notifications to your smartphone about lack of funds and when trading stops;
  • "hot buttons" to quickly close all open positions on a currency pair;
  • works on both dollar (USD) and ruble accounts (RUR);
  • works on accounts with quotes of 4 and 5 decimal places.


enter key

Enter the key = 0 – it is enough to enter the numerical key in the field once so that the EA can operate on a real account. After the key is checked, the EA will create a special file which will be stored in the created folder "General_key" (MQL4 -> Files -> General_key). With each new launch, the EA finds the key file itself and checks it for compliance with this account. You do not need to re-enter the key. The key is common to all of our free advisors and indicators that are installed on this account.


If you already have a real account and the key to the real account is activated (see above), then to get access to trading on a demo account, you need to: install the EA on the demo account in the "Enter the key" window, enter your real account number and click OK.

access to demo

If you did everything correctly, the EA settings will appear on the chart, and an entry will appear in the "Log". "Ok! Access is allowed!»

access allowed!


Hot buttons are designed for quick execution of one command. After pressing the button, its color changes, and the button is blocking, when pressed again, removed the blocking and leads to the original state of the button. Any press of the button EA fixes in its log, you can see the current position of the button on the tab "Experts". You can also unblock the button using the new initialization of the EA (for example, switching to another timeframe). In this case, you do not need to press anything, the blocking is removed automatically.

hot buttons

Close All – closes absolutely all open orders on the current currency pair and removes all pending orders regardless of the magic number.

Close Profit – closes only orders with profit on the current currency pair.

Close Buy – closes only Buy orders on the current currency pair.

Close Sell – closes only Sell orders on the current currency pair.


general setting

Trading is allowed = true, if you select false, then the EA will no longer open new orders, but all other functions of the EA will continue to work (trailing stop, breakeven, etc.).

Magic number (1 = automatic) = 1 - allows you to specify the EA, which orders (with which magic number) it needs to track. If the magic number = 1, the EA automatically creates the original magic number, which will differ depending on the currency pair and the timeframe on which it is set. Instead of 1, you can set any other magic number, but it must be greater than 1.
If the magic number = 0, then the EA will average orders opened only manually, but will not open new orders. If the magic number is set to -1 (minus one), the EA will average not only its orders, but also all other orders for this currency pair, including those opened manually by the trader, but will not open new orders.


  • Long only - open and trawl only buy orders;
  • Short only - open and trail only sell orders;
  • Long & Short - for orders of all directions.


Working timeframe: = «5 Minutes» - selecting the timeframe for opening the first order and for subsequent orders with averaging. Use the mouse to select the desired timeframe from the drop-down menu. If you select "current", the indicators will automatically be adjusted for the period of the chart, which is currently set in the open terminal window.

Working timeframe

Initial lot in the series = 0.01 - the size of the first lot.

Take Profit for one order = 8.0 - in points, if there are no open martingale orders.

Minimal profit for martingale = 5.0 - in points, the total average take profit for all open orders with a martingale of the same direction.

Stop Loss = 0.

Use a common stop loss = false - if true, the stop loss for all orders will be at the same level, set for the first order.

Breakeven (when lock) – when there is a small profit, and trailing stop is still not included, the EA moves the stop loss set at breakeven level.

Profit to enable a breakeven = 12 – level of take-profit in points, at which a breakeven is enabled

Level breakeven = 2 – sets the level, at which a stop-loss must be moved: if set to 1, then the position will be closed, when the profit is 1 point; if set to 0, then the position will be closed with the profit of 0 points.

Slippage = 3 - the level of slippage in points on the volatile market it is better to increase.


risk management

Limit of free margin in % = 60 - the remaining free margin as a percentage. If the free margin remains less than the set limit and if hedging is allowed, an order will be opened in the opposite direction. If hedging is not allowed, the EA will simply stop opening new martingale orders until the free margin is greater than the set value.

By this indicator, you can control how much free funds are left to open new orders. If you have 50% of your free margin left , it means that 50% of your funds are already pledged (margin) and you should think about adding additional funds to your account.

If you set limits on the remaining free margin below 50 %, the EA will not be able to correctly assess the risk before opening a new order and will not be able to warn you in time about the approach of a stop out.

If you set the free margin limit above 80 %, then the EA will often hedge and earn little.

However, if you have a large deposit and the initial lot size is minimal, then you can raise the free margin limits above 80 percent.

Martingale coefficient = 1.5 - martingale multiplier, an increase in the lot volume of the subsequent order by a specified coefficient. If the multiplier is = 1.0, then the EA will only place orders with a lot equal to the lot volume of the first order.

Step between martingale orders = 4.0 - the step (distance) in points between the martingale orders.

Fix the profit for the day = false, if true, the EA will stop its work when the set profit is reached, and will continue its work only with the beginning of a new day.

Daily profit, in the deposit currency = 5.0 - the amount of profit per day in the deposit currency.

Maximum number of open orders = 30 - the maximum number of orders, in one direction, that the EA can open.

Maximum amount of lots = 100 - restrictions on the maximum, total volume of all lots, open orders, one direction.

Close by Equity = false - if true, then allow closing all orders on the current symbol when the Equity reach the set level.

Equity amount, in the deposit currency = 0 - the Equity level in the deposit currency at which all orders on the chart will be closed.

Block 3. HEDGING


Hedge = false - allow the EA to open orders in the opposite direction, hedging or "locking" the current open positions. The hedge will only start working when the remaining free margin is equal to or below the set value in the "Limit of free margin in %".

Indent for the first hedge order = 10.0 - the distance to the first order in the opposite direction. If the remaining free margin is below the set limit, and the distance for the first hedge order is less than the set value, the EA will not open an order in the opposite direction.

Exit from the "lock" by MA = true - exit the "lock" with a profit and only when the price breaks through the moving average, if false, then exit the "lock" when the minimum profit appears, all orders will be closed.

MA period to exit = 55 - the period of the moving average.

MA shift = 0 - the shift of the moving average.

MA method: = Exponential - select the method for calculating the moving average.

method the moving average

MA applied price: = Close price - select the price for calculating the moving average.

price the moving average

Close by balance to "lock" = true - when exiting the "lock", the EA will close all orders when the Equity reach the Balance level that was before the hedging, i.e. the closing will be zero without profit or loss.

Trailing stop at the "lock" = false, in the" lock", the trailing stop is blocked, but if you need to use the trailing stop in the "lock" situation, then select true here.



Instrument for AT: - select the instrument for AT

  • Close price - at the closing price of the bar, if the closing price is higher than the previous one, then a buy signal if lower, then a sell signal;
  • Moving Average - if the price is higher than the MA, buy signal if the price is lower than the MA, sell signal;
  • Disabled - the AT is disabled.

select the instrument for AT

Timeframe for the AT: = «1 Hour» - Auto Trend timeframe selection. Use the mouse to select the desired timeframe from the drop-down menu. If you select "current", the indicators will automatically be adjusted for the period of the chart, which is currently set in the open terminal window.

timeframe for the AT

Use AT for martingale = false - if false, the AT signals will be taken into account only when opening the first order, if true, when opening all orders, including martingale orders.

Period the trend MA = 21.

Shift the trend MA = 0.

Method the trend MA: = Exponential.

MA method

Applied price the trend MA: = Close price.

MA applied price


trailing stop

Mode selection: – choosing a trailing stop:

  • Normal - standard trailing stop, starts trail only when there is profit;
  • Total trailing stop - by one (average) stop loss closes all open orders in one direction, including lossing orders;
  • Disabled - trailing stop is disabled.

modes trailing stop

Virtual trailing stop = false, if true, the EA will protect the profit by using a trailing stop that is invisible to the broker.

Trailing stop level = 16 - the trailing level in points.

Trailing step = 2 - if the profit is 16 points, the trailing will move the stop loss by 2 points.


other setting

Language info panel = English - switch the language on the info panel can be Russian or English.


Background graphics = Dark1 - selects the color background of the chart Dark1 or Dark2 and Light.

background graphics

Send email = false - allow sending messages to email.
How to set up sending messages to e-mail see the "Help" to MetaTrader 4, section "Client Terminal Settings" hereinafter "Email".

Send push notification = false - allow you to send Push notifications to the mt4 mobile terminal installed in your smartphone.
How to set up sending notifications see the "Help" to MetaTrader 4 section "Client Terminal Settings" hereinafter "Notifications".

Show options panel = true - displays textual information about the financial status of the account and currently active commands on the chart, if false, it does not show messages.

Font size in messages: = Small - you can choose the font size small, medium, big.

font size

Show hot buttons = true - yes, show, false - no, do not show, "hot buttons" in the strategy tester do not work!

Deleting objects from the graph = false - allow clearing the chart from unnecessary graphical objects (arrows, modifications of stop loss levels, take profit, etc.).

Delete objects, in minutes = 240 - deleting objects after a set time, in minutes from object creation.

Дата публикации: 28-03-2021, 20:31, Проссмотров: 137

Облако тегов

Архив новостей