Bookmark and Share
Open documentation in a new window
Click Submenu to expand menu.

EA Creator - create Forex Expert Advisor without programming

Web application documentation     Top


Features available     Top
- money management: ability to set maximum percent of equity you can loose on one order. Position size will be calculated according to account balance and stop loss. Very important when dynamic stop loss is used.
- decrease factor: decrease position size after defined number of loss trades happens
- risk management: slippage, maximum spread check, maximum drawdown limit
- various trailing stops: simple trailing stop, trail by candle, break even
- trading only at chosen time window
- automatically stop/start EA when certain conditions happen
- flexibility: different combinations of signals used at different market conditions (coming soon)
- dynamic TP and SL set on position opening time, depending on market volatility or other rules
- information output (trace) levels: ability to choose how much information you want to get when testing/trading EA.
- information messages written to file, journal or sent by Skype or email
- simplified usage of custom indicators
- ability to use custom source code in combination with EA Creator logic
- signal types: candle patterns, standard and custom indicators, breakouts.


Custom indicators     Top
You can upload your custom indicator (*.mq4 file) which can be used later while creating Expert Advisors. Your uploaded indicator will be shown in the list below standard indicators while creating signal. EA Creator will read indicator source code: it will find parameters and modes for this indicator. This information will be shown on website when file is uploaded. Click OK to confirm that indicator is parsed correctly and it will be listed with other indicators later while creating indicator signals. This feature works with most of indicators which can be used in EAs.


Custom signals     Top
You can develop custom signal code (written in MQL4), upload it and use it in combination with other EA Creator logic. Fill in function name field without brackets "()". E.g. for function "MyNewFunction()" fill into field: "MyNewFunction".

Rules for custom signal:
- One function in one file.
- Function must return 1 for buy, -1 for sell signal.
- Function must return 0 when no signal occur (signal is not active).
- File must have *.mqh extension.
Function name must be exactly the same as you fill in field on website (case sensitive).


Creating EA (signals)     Top
Start creating EA by creating Opening signals. This is the only mandatory part for EA. Other parts are optional. Opening signals are divided into two parts: for buy orders and for sell orders.


Signal types     Top
Currently you can create 3 types of signals:
- Indicator signal,
- Breakout signal,
- Candle pattern signal


Indicator signal     Top
You can make comparison between indictor, price, candle level or any static value which gives signal to make action when comparison is true.


Fields description     Top


Indicator     Top
There is a list of indicators that you can use to create signal.

At the top of the list you see standard indicators and at the bottom you can find custom indicators (which you have uploaded on Upload Indicator page).

To create a signal you can make comparison operation between indicator and other indicator, price, candle level or static numeric value which is selected on the other side of comparison mark.

You will be able to choose more options (parameters, mode, timeframe, usage) after you click continue. You are able to choose same indicators on this page and select different parameters or mode to create a signal.


Price     Top
You can add ask or bid price to compare with indicator, candle level or static numeric value on the other side.


Candle     Top
You can use candle levels (high, low, open, close) in comparison operation. You will be able to select which candle and timeframe to use after you click continue.


Numeric value     Top
If you need static value in one side of comparison then select this radio button and fill in value to compare with.


Comparison mark     Top
You have to choose which on which side value must be lower or higher to give signal. When comparison is true then this signal is active. One or more active signals give main signal to open/close position or start/stop trading. It depends on which page you are creating this signal.


Timeframe     Top
Choose which timeframe to use. If you select "Current timeframe" then timeframe will be the same as timeframe on which EA is attached.


Shift     Top
Fill in which shift in time should be used. 0 - current (which is not finished yet), 1 - one candle/bar before current (finished), 2 - two candle/bar before current and so on.


Parameter fields     Top
Here are parameters for selected indicator. Default values are filled in automatically, but you can change them if you need.


Output line/value     Top
Select indicator mode here. Often there is more than one line in indicator, so the same indicator can be used in both comparison mark sides with different modes if needed. E.g. For activating signal when two indicator lines intersect.


Which candle should be used?     Top
Select which candle level you need. It is the same as shift. Current candle - 0, last - 1 and so on.


Additional operation     Top
You can make additional operation with the value on the side where this field is. Operation will be done before making comparison. Leave this field blank if no additional operation is needed. Examples:
*0.023
+0.003
*2.1+0.0035
-Ask
-Bid*0.5+0.0003


How long this signal lasts?     Top
Select "Continuous" if you need this signal to be active all the time when comparison is true. It is recommended to use continuous signals in combination with other signals. If you need signal be active only when indicator modes (lines/values) intersect then select "Instant". This type of signal activates only when there are reverse conditions in one shift before your selected.


Breakout signal     Top
Breakout signal searches for highest and lowest prices in selected time window. It will look back as far as chosen time window lasts. If price is breaking up higher: it will activate signal when price goes by "Bias" value of pips higher than the highest price on this time window. If created in "Open Buy" page - it will give signal to open long position.

If price is breaking lower: it will activate signal when price goes by "Bias" value of pips lower than lowest price on this time window. If created in "Open Sell" page - it will give signal to open short position

You have to fill in one or more "Time Window" fields. If more than one time window fields are filled they will be added to each other. E.g. you need 26 hours time window: fill in 1 day and 2 hours. This feature is for your own convenience. This type of signal lasts for 5 pips after being activated.


Candle pattern signal     Top
You can describe one or more consecutive candles (candle pattern) which gives signal to make action when described pattern is detected.


Fields description     Top


Candle No     Top
Pattern can consist of one or more candles. Candles in a pattern are in the same sequence as numbers in "Candle No" column. First candle in the pattern will be at top of the page, and last - at the bottom.


Timeframe     Top
Select one timeframe for all candles in this pattern signal. If you need more than one timeframe - create another candle pattern signal.


Candle length     Top
Choose minimum and maximum candle length in pips. Candle length is distance from candle high to candle low. If there is no minimum or maximum length for the candle, then leave fields blank.


Candle relative length     Top
It is length of candle in relation with previous candle. Candle relative length is dynamic value (candle length - static) and depends on previous candle length. This value is used as length percentage of previous candle.

E.g. If you need candle to be half the size of previous candle - it would be 50%. If you need current candle to be 2 times longer than previous - it would be 200%.

Fill in minimum and maximum percentage that this candle should be in relation to previous candle. If relative length is not important, then leave these fields blank.


Candle direction     Top
If candle should be bullish, then choose candle direction "Up". If candle should be bearish, then choose candle direction "Down". If candle direction is not important (can be either bullish or bearish), then select "Whatever" direction from the list.


Candle Parts     Top
There are 3 parts of candle/bar you can describe. You can see them in the picture below:
candle parts
Part_1 - distance from candle high to open (if candle direction down) or close (if candle direction is up).
Part_2 - distance from open to close
Part_3 - distance from open (if bullish candle) or close (if bearish candle) to candle low.

You can choose range how large each part could be. Choose minimum and maximum percentage, that this candle part should be in relation to the whole candle.

E.g. 0% would be that there would be no selected part in the candle, 50% means that this part will be half of the candle, and 100% means that it is only one part in this candle.

If candle part size is not important leave "min pct" = 0% and "max pct" = 100%. This means, that this candle part can be any size.


Dynamic Stop Loss     Top
Dynamic Stop Loss is set right before opening a new position. That gives you ability to adapt stop loss to market volatility. Stop loss will be set each time when order is opened. SL values will be different each time, so dynamic money management (in risk percentage from balance) is highly recommended: it allows setting the maximal risk which will be the same for every position (if SL is wider - opened position will be smaller).

You will be able to set MinSL output parameter on Metatrader which prohibits opening positions with smaller stop loss than set in MinSL parameter.

Currently you can create 3 types of Dynamic SL:
- Indicator,
- Candle level,
- Support level.


Indicator     Top
You can set stop loss to any indicator value and do additional operation with it if needed.


Fields description     Top


Indicator     Top
There is a list of indicators that you can use to create dynamic SL. At the top of the list you see standard indicators and at the bottom you can find custom indicators (which you have uploaded on Upload Indicator page).


How indicator should be used     Top
It depends on your chosen indicator logic: what values it returns. You can check it on Data window (ctrl+D) in Metatrader.

Possible values:
- Size in pips - indicator returns exact value in pips. E.g. place SL 30 pips away from current price: indicator returns number 30.
- Actual size - indicator returns numeric value. E.g. place SL 30 pips away from current price: indicator returns number 0.0030.
- Price - indicator returns actual price where SL should be set. E.g. For buy order: if you need to set SL 30 pips away from current price, which is 1.1250, indicator returns number 1.1220.


Operation     Top
Additional operation to stop loss value can be made. You can add, subtract, multiply or divide indicator value (which is already converted to stop loss in pips) by some numeric value. If Value field is empty, then no operation will be done and it is not important which value is selected in Operation list.


Value     Top
Fill in value, if additional operation should be done. Operation will be done to indicator value which is already converted to stop loss size in pips. It does not depend on how indicator is used: indicator value will be automatically converted to size in pips before this operation.

E.g. If you need to make stop loss value 5 pips bigger than indicator returns, then Operation will be "+" and Value will be "5".

If Value field is empty, then no operation will be done.


Timeframe     Top
Choose which timeframe to use. If you select "Current timeframe" then timeframe will be the same as timeframe on which EA is attached.


Shift     Top
Fill in which shift in time should be used. 0 - current (which is not finished yet), 1 - one candle/bar before current (finished), 2 - two candle/bar before current and so on.


Parameter fields     Top
Here are parameters for selected indicator. Default values are filled in automatically, but you can change them if you need.


Output line/value     Top
Select indicator mode here. Often there is more than one line in indicator, so you can choose which one to use.


Candle level     Top
You can set stop loss to candle level (high/low/open/close price).


Fields description     Top


Candle value     Top
There is a list of candle levels (prices) that you can use to create dynamic SL. You can use candle high/low/open/close of specified candle to place stop loss at price of the specified candle level.


Which candle     Top
Choose from which candle/bar price should be taken. (Same as shift: 0 - current, 1 - last, 2 - before the last).


Timeframe     Top
Choose from which timeframe candle/bar should be used.


Operation     Top
Additional operation to stop loss value can be made. You can add, subtract, multiply or divide candle level (already converted to stop loss in pips) by some numeric value. If Value field is empty, no operation will be done and it is not important which value is selected in Operation list.


Value     Top
Fill in value if additional operation should be done. Operation will be done to candle level value which is already converted to stop loss size in pips. E.g. If you need to place stop loss 5 pips further than chosen candle level, then Operation will be "+" and Value will be "5". If Value field is empty, then no operation will be done.


Support level     Top
You can set stop loss to support level of the specified Time Window. For Buy orders SL will be set by "Bias" number of pips lower than the lowest price on this time window. For Sell orders SL will be set by "Bias" number of pips higher than the highest price on this time window.

You have to fill in one or more "Time Window" fields. If more than one time window fields are filled, they will be added to each other. E.g. if you need 26 hours time window: fill in 1 day and 2 hours. This feature is for your own convenience.


Copy from Buy SL     Top
If you have already created dynamic stop loss for sell (closing short positions), you can copy same logic for buy (closing long positions).


Copy from Sell SL     Top
If you have already created dynamic stop loss for buy (closing long positions), you can copy same logic for sell (closing short positions).


Dynamic Take Profit     Top
Dynamic Take Profit is set right before opening a new position. That gives you ability to adapt take profit to market conditions. Take Profit will be set each time order is opened.

You will be able to set MinTP output parameter on Metatrader which prohibits opening positions with smaller Take Profit than value of MinTP parameter.

Currently you can create 3 types of Dynamic TP:
- Candle level,
- Resistance level,
- Indicator.


Indicator     Top
You can set Take Profit to any indicator value and do additional operation with it if needed.


Fields description     Top


Indicator     Top
There is a list of indicators that you can use to create dynamic TP. At the top of the list you see standard indicators and at the bottom you can find custom indicators (which you have uploaded on Upload Indicator page).


How indicator should be used     Top
It depends on your chosen indicator logic: what values it returns. You can check it on Data window (ctrl+D) in Metatrader.

Possible values:
- Size in pips - indicator returns exact value in pips. E.g. place TP 30 pips away from current price: indicator returns number 30.
- Actual size - indicator returns numeric value. E.g. place TP 30 pips away from current price: indicator returns number 0.0030.
- Price - Indicator returns actual price where TP should be set. E.g. For buy order: if you need to set TP 30 pips away from current price, which is 1.1250, indicator returns number 1.1280.


Operation     Top
Additional operation to take profit value can be made. You can add, subtract, multiply or divide indicator value converted to take profit in pips by some numeric value. If Value field is empty, then no operation will be done and it is not important which value is selected in Operation list.


Value     Top
Fill in value, if additional operation should be done. Operation will be done to indicator value which is already converted to take profit size in pips. It does not depend on how indicator is used: indicator value will be automatically converted to size in pips before this operation.

E.g. If you need to make take profit value 5 pips bigger than indicator returns, then Operation will be "+" and Value will be "5".

If Value field is empty, then no operation will be done.


Timeframe     Top
Choose which timeframe to use. If you select "Current timeframe" then timeframe will be the same as timeframe on which EA is attached.


Shift     Top
Fill in which shift in time should be used. 0 - current (which is not finished yet), 1 - one candle/bar before current (finished), 2 - two candle/bar before current and so on.


Parameter fields     Top
Here are parameters for selected indicator. Default values are filled in automatically, but you can change them if you need.


Output line/value     Top
Select indicator mode here. Often there is more than one line in indicator, so you can choose which one to use.


Candle level     Top
You can set Take Profit to real candle level (high/low/open/close price) or distance to this level, if this level is on the opposite side than trade. TP will be distance from candle level to opening price, so it is possible to use any candle: negative number will be automatically converted to positive, so lower than price levels can also be used for buy or higher than price for sell.

E.g. you can set SL and TP to the same candle level: in this case TP will be equal to SL as size in pips.


Fields description     Top


Candle value     Top
There is a list of candle levels (prices) that you can use to create dynamic TP. You can use candle high/low/open/close of specified candle to place Take Profit at price of the specified candle level.


Which candle     Top
Choose from which candle/bar price should be taken. (Same as shift: 0 - current, 1 - last, 2 - before the last).


Timeframe     Top
Choose from which timeframe candle/bar should be used.


Operation     Top
Additional operation to Take Profit value can be made. You can add, subtract, multiply or divide candle level converted to Take Profit in pips by some numeric value. If Value field is empty, no operation will be done and it is not important which value is selected in Operation list.


Value     Top
Fill in value if additional operation should be done. Operation will be done to candle level value which is already converted to take profit size in pips.

E.g. If you need to place Take Profit 5 pips further than chosen candle level, then Operation will be "+" and Value will be "5".

If Value field is empty, then no operation will be done.


Resistance level     Top
You can set Take Profit to support level of the specified Time Window. For Buy orders TP will be set by "Bias" value of pips lower than the highest price on this time window. For Sell orders TP will be set by "Bias" value of pips higher than the lowest price on this time window.

ATTENTION: This could be useful for range trading, but will not work if trading with trend: TP for Buy will not be set if there is no higher price in your chosen time window and TP for Sell will not be set if there is no lower price in your chosen time window.

You have to fill in one or more "Time Window" fields. If more than one time window fields are filled, they will be added to each other. E.g. if you need 26 hours time window: fill in 1 day and 2 hours. This feature is for your own convenience.


Copy from Buy TP     Top
If you have already created dynamic take profit for sell (closing short positions), you can copy same logic for buy (closing long positions).


Copy from Sell TP     Top
If you have already created dynamic take profit for buy (closing long positions), you can copy same logic for sell (closing short positions).


Main Functionality     Top
Some functionality is very important and it is included by default in every new EA created on this website.


Information text (trace)     Top
EA can write output text to file, journal or give alerts, when certain events happen. You can choose how much output you need by selecting trace level. There are 3 levels: the higher level you choose - the more text information about EA trading you get. E.g. for usual trading or longer term backtesting/optimisation you can choose level 1, when you get only the most important information, like when orders are opened/closed. When thinking new strategies and checking if EA is working as you desired, you can set level 3 - you will get all possible output, like when each signal is active, when signals are canceled and why, all data related to money management and so on. This feature is included in every EA created on this website. You can manage it by changing EA parameters.


Money management     Top
You can choose maximum percentage of account size you can risk on one order. Position size will be calculated on order opening time. Stop loss or other parameters can be different for each order, but your maximum risk will be the same for every order. This will keep equity curve more stable, also helps winning strategies to win more and losing to lose less. You can limit losses even more by using decrease factor. This feature is included in every EA created on this website. You can manage it by changing EA parameters.


Risk management     Top
You can limit your risk by setting maximum spread or maximum slippage. E.g. this would limit risk during news time when spread is widened: if spread is wider than chosen - position is not opened.

You can choose fixed stop loss and take profit to limit by setting EA parameters. If you create dynamic stop loss or take profit you can control them by choosing minimum and maximum values in EA parameters. This will filter wrong values, which could result in a loss. E.g. If indicator used for dynamic stop loss returns value which is less than minimum SL, then position will not be opened.

These features are included in every EA created on this website. You can manage them by changing EA parameters.


Additional Functionality     Top
Read "EA Parameters" section in order to find more information about using these features when EA is downloaded and opened in Metatrader.


Simple trailing stop     Top
Trails stop loss by defined value of pips. You will be able to choose this value on Metatrader by setting TrailingStop external parameter for created EA. When price goes to the right direction and existing stop loss (set on order open time or modified earlier by the same trailing stop) value becomes further than trailing stop value, then SL will be modified to the trailing stop value.


Candle trailing stop     Top
Trails stop loss by the candle low levels. E.g. when price goes to the right direction and new candle begins then stop loss can be modified to previous candle low (or candle before previous low - it is modifiable). This type of trailing stop allows dynamically trail stop loss and adapt to market volatility.
You can choose which candle to use for the candle trailing stop - modify CandleTrailingStop EA external parameter on Metatrader.


Break even trailing stop     Top
EA can set stop loss to break even when price goes to right direction by defined value set in BreakEvenPct or BreakEvenPips EA external parameter on Metatrader.


Market hours filter     Top
EA can trade only during selected time window. You will be able enter hour when to start trading and hour when to finish trading. Trading will happen during this timeframe.


Skype notifications     Top
Choose this function if you need to receive information messages (trace) to Skype. Trace level 1 messages will be sent if you do the following set up:
1. To use this feature you must have Skype installed on both computers (the one where EA runs and the one on which you need to receive messages).
2. Then you have to download two files: SkypeLib.dll and Skype4COM.zip. Save SkypeLib.dll and files extracted from Skype4COM.zip into \experts\libraries folder in the terminal directory.
3. Set SkypeAccount external EA parameter to your Skype username where you need trace messages go to. Set TraceToSkype external parameter to true to enable sending messages.
4. When placing EA on the chart select "Allow DLL imports" checkbox.


Email notifications     Top
Choose this feature if you need to receive information messages (trace) to email. You have to configure Metatrader:
1. Go to: "Tools" -> "Options" and fill in required information in "Email" tab.
Note: SendMail function is used as usual, so if you have some issues with mail servers, most likely you will find solution on the internet. If your Metatrader email configuration works with any EA - it will also work with EAs created on this web site.
2. Set TraceToMail external EA parameter to true.


Closing tick timer (counter)     Top
EA can close trade by defined number of ticks later than the main close signal was activated. If you need order to be closed instantly after signal has happened do not use this feature. To enable this feature set OrderClosingTimerOn to true. You can choose for how many ticks to wait before closing position - set the TimerTickCount parameter.


Maximum drawdown     Top
This feature allows you to limit your losses is strategy is unsuccessful. You can choose at which balance EA stops trading by setting MaxAccountDrawdown external parameter. When drawdown happens to your defined level - EA stops trading.


Sleep mode after trade is taken     Top
If you are experiencing that next order is opened too fast after previous was opened - choose this feature and set how long EA should sleep (do not trade) after the last order opening. You can set time in hours, minutes, seconds and milliseconds in EA external parameters. All these values will be summed before sleeping starts.


Money management: decrease factor      Top
You will be able to decrease position size after defined number of loss trades happens. After a positive trade, it will revert back to the original lot size. E.g. After 2 consecutive losses (adjustable figure), the EA will revert from your chosen lot size to a much smaller lot size (from 1 lot to 0.1 lot, also an adjustable figure).


Martingale money management     Top
Idea of martingale is as follows: after each loss EA increases position size, that if next position is profitable, it would pay off losses of previous loosing positions. This is risky strategy, so you should use it only if you fully understand how this works.

When SL and TP is equal, it doubles position after each consecutive loss. If SL is larger then TP, it will increase position more than twice in order not to loose, if next position will be profitable. Position size which you set in Lot or RiskAccountPct is starting positions size, so you should set it to very small size, that it could increase position many times.


Created EAs usage tutorial     Top


MT4 Build information     Top
It is important that you download EA compiled for the right Metatrader build. You can check your Metatrader build number by doing the following steps:
1. Open Metatrader 4
2. Go to menu: Help -> About
3. In the opened window you will see something like: "Version: 4.00 Build 225". 225 here is what you have to choose from the list on website before generating EA.


How to use downloaded EA files?     Top
There are 3 types of files that you can download. Click on the link below to see how to use each of these files:
- EAs for demo trading (for EA Creator subscribers)
- EAs for LIVE trading (for EA Creator subscribers)
- EAs with source code (for EA Creator PRO subscribers)


EAs for demo trading (for EA Creator subscribers)     Top
Note: This is not applicable for PRO subscribers. If you have PRO subscription, then read EAs with source code.

IMPORTANT: These EA files works in Metatrader 4 only in demo trading account. You can download as many different strategies as you need for backtesting in any account or trading in demo account. Also you can edit this type of EA as many times as you like.

Do the following steps to use EA on Metatrader:
1. Save downloaded *.ex4 file into "\experts" folder in the terminal directory.
2. Open Metatrader and check Metatrader Strategy Tester or Navigator. Your EA should be be in "Expert Advisor" list. EA name is the same as file name or EA name that you have chosen on web site.
3. Click "Expert Properties" in Metatrader Strategy Tester and open "inputs" tab. Here you can edit all EA parameters which are described in this documentation. If you need to forward test EA by trading on demo, then drag EA on the chart and you will be able to choose inputs in the opened window.


EAs for LIVE trading (for EA Creator subscribers)     Top
Note: This is not applicable for PRO subscribers. If you have PRO subscription, then read EAs with source code.

This type of EA is without any trading limitations. You can use it on demo or live accounts.

When you download this type of EA - number of LIVE trading EAs will be decreased by 1 in your account (it is decreased only once, so you will be able to download this same EA anytime later). EA files are generated before each download as we do not keep files, so it is important that you have backups of your profitable EAs, because after some bug fixes or after creation of new features in this website it may regenerate files that behaves slightly different when trading.

IMPORTANT: After you download a LIVE trading version of this EA you will no longer be able to edit this EA. This is done to avoid abusing the system (e.g. if user creates new EA logic by editing old EA and tries to download as old LIVE trading EA). Only PRO subscribers have unlimited ability to edit any EAs. If you do not have PRO subscription, then create a new EA.

Do the following steps to use EA on Metatrader:
1. Save downloaded *.ex4 file into "\experts" folder in the terminal directory.
2. Open Metatrader. Your EA should be be in "Expert Advisor" list. EA name is the same as file name or EA name that you have chosen on web site.
3. When using EA on a chart or in Strategy Tester you can edit all inputs (EA parameters) that are described in this documentation.


EAs with source code (for EA Creator PRO subscribers)     Top
Note: This is applicable only for PRO subscribers. If you do not have PRO subscription, then read EAs for demo trading and EAs for LIVE trading.

You can create and edit EAs on this website without any limitations. In *.zip file you can find all source code files of the EA and compiled version.

Do the following steps to use EA on Metatrader:
1. Extract *.zip file somewhere that you can see what is inside this archive. You will find one *.mq4 file, one *.ex4 file and "\include" folder with many *.mqh files.
2. All files that you find in "\include" folder (with *.mqh extension) place into "\experts\include" folder in the terminal directory.
3. *.mq4 and *.ex4 files place into "\experts" folder in the terminal directory.
4. Open Metatrader. Your EA should be be in "Expert Advisor" list. EA name is the same as file name or EA name that you have chosen on web site.
5. When using EA on a chart or in Strategy Tester you can edit all inputs (EA parameters) that are described in this documentation. Also you can see and edit EA source code.

You can edit EA source code with one condition: do not remove any text or symbols in this line in file with ".mq4" extension:
#property copyright "created using web tool at www.eacreator.com"
However you can add your own text at the end of the line if needed. E.g.:
#property copyright "created using web tool at www.eacreator.com by Some Author"


EA Parameters (inputs)     Top
All EA parameters (inputs) are described here. You can edit values to manage EA behavior. All inputs are divided into 2 main sections:
- Main functionality (included in every EA created on this website)
- Additional functionality (included if you have selected while creating EA).


Main functionality     Top
Parameters that are included in every EA created on this website.


Risk management     Top


MaxSpread     Top
Maximum spread that could be while opening new position. If spread is larger - position is not opened.


Slippage     Top
Maximum slippage value. If slippage is larger - position is not opened and requote error shown.


StopLoss     Top
Static stop loss value in pips. Value must be higher than MinSL. Set StopLoss to 0 if you need to disable static stop loss.


TakeProfit     Top
Static take profit value in pips. Value must be higher than MinTP. Set TakeProfit to 0 if you need to disable static take profit.


MinSL     Top
Set this parameter to minimum stop loss value that could be while opening order. It should be used with Dynamic Stop Loss in order not to place SL too near the opening price. If stop loss is smaller than MinSL value - order will not be opened.


MinTP     Top
Set this parameter to minimum take profit value that could be while opening order. It should be used with Dynamic Take Profit in order not to place TP too near the opening price. If take profit is smaller than MinTP value - order will not be opened.


MaxSL     Top
Set this parameter to maximum stop loss value that could be while opening order. If stop loss is bigger than MaxSL value - order will not be opened.


MaxTP     Top
Set this parameter to maximum take profit value that could be while opening order. If take profit is smaller than MaxTP value - order will not be opened.


Money management     Top


Lot     Top
Static order size in lots. It must be set to 0 if dynamic money management (in risk percentage from balance) is used.


RiskAccountPct     Top
Input for dynamic money management. Set how many percents of account size you would like to risk on one order. Biggest loss can be as large as this percentage from all equity, that you currently have. In order to use dynamic money management, Lot parameter must be set to 0. For correct calculation of positions sizes while backtesting you need to set MM_currency_value_for_testing parameter.


MM_currency_value_for_testing     Top
Description:
This parameter is intended only for backtesting and only when dynamic money management is used (Lot = 0 and RiskAccountPct > 0). It allows to calculate correct position sizes in backtesting, because Metatrader 4 Strategy Tester cannot use multiple currency pairs, so depending on base currency and your account currency sometimes it is a must to set this parameter, that you can see the same money management results as in demo/real trading. When trading, this parameter is not used as MT4 can get real time values of other currency pairs.

How to use:
1. Start testing first time without setting this parameter.
2. Check "/tester/files" folder in your terminal directory (where Metatrader is installed). You should find file "Currency_name_for_MT_tester.txt". If You do not find this file, then set MM_currency_value_for_testing parameter to 1.
3. If you have found this file, open it and you will see currency pair name in it. Set MM_currency_value_for_testing input to the quote of this currency pair.

E.g. currency name is "GBPUSD". Check it's current quote. Let's say you find out that now GBPUSD = 1.5959. Set MM_currency_value_for_testing parameter to 1.5959. It is not important if you choose Ask or Bid price, because bias would be anyway, but much smaller than if you do not use this parameter.


Trace (information output)     Top


FileName     Top
Name of the file where output text (trace) will be written during EA run. This file can be found in "\tester\files" (when backtesting) or "\experts\files" (when trading) folder in terminal directory (where Metatrader 4 is installed) if TraceType is set to "F" and TraceLevel is more than 0.


TraceType     Top
Trace can be written to file, printed to journal or alerts shown.

Possible values:
F - write into file,
P - print to journal,
A - show alerts


TraceLevel     Top
Level of trace determines how much output text is written. Larger number means more text but slower execution.

Possible values:
0 - tracing is disabled;
1 - outputs the most important information about trading. Only this level data will be sent through email, because there would be too much messages if higher level is chosen;
2 - Outputs more info, like when start/stop trading occurs, more money management calculations and other data. Up to this level data will be sent trough Skype, because there would be too much messages if higher level is chosen;
3 - Outputs most information. E.g. when each signal is active. The most detailed level.

Note: Text file size can grow very fast, when TraceLevel is set to 2 or 3, so observe it and do not use high TraceLevel while optimizing EA or testing EA on long timeframes.


Strategy Reversal     Top


ReverseSignals     Top
Reverses signals: Buy signals becomes sell signals, and sell signals becomes buy signals. In order to see how strategy would look like with oposite signals set this input to True.


ReverseSLTP     Top
This input changes stop loss size with take profit size and vice versa. You can check how your strategy performs with reversed risk reward ratio. To activate this feature set input to True. This works with dynamic and static SL and TP.


ReverseStrategy     Top
If you set this input to True it will reverse signals and stop loss with take profit (as well as risk-reward ratio).


Other parameters     Top


MagicNumber     Top
This value is identification number of orders made by this EA. If you are running more than one EA at the same time their MagicNumber parameter value must be different.


WaitNextCandle     Top
This parameter eliminates multiple positions opening by the same signal. EA starts looking for new signals only when previous signal candle is finished (closed).


Additional functionality     Top
Parameters that are included if you have selected associated features while creating EA.


Risk management     Top


MaxAccountDrawdown     Top
This parameter limits account drawdown. Value of this parameter means account balance: when it is reached, all trading will be stopped in order not to loose more.


CandleTrailingStop     Top
You can lock profits or decrease risk by trailing stop loss using candle's low. Set value to 1 if you need to trail stop loss by the last candle low. To trail stop loss by candle before the last one low: set this parameter to 2. You can set it to any value: the greater the value: the further candle's low is taken for the stop loss. Set this parameter to 0 in order to disable this feature (in this case SL will not be trailed by candle low).


TrailingStop     Top
You can lock profits or decrease risk by fixed size trailing stop (simple trailing stop). When price goes to the right direction by more pips than specified in TrailingStop parameter - Stop Loss will be moved, that it would be away from current price by TrailingStop size.


TrailingStopStep     Top
This parameter shows how many pips price must go to the right direction, that SL level would be moved. E.g. TrailingStop is set to 30 and TrailingStopStep is set to 3: when price goes by 33 pips away from the initial stop loss - SL will be moved to 30 pips and it will be refreshed later every 3 pips when price goes to the right direction. If you set parameter to 1, then stop loss will be moved when price goes at least one pip to the right direction (the lower the value - the more order modify operations will be done and the more precise trailing stop will be). Lowest value can be 1.


BreakEven     Top
Set this value to True in order to enable break even trailing stop. You can change behavior by modifying BreakEvenPct and BreakEvenPips parameters.


BreakEvenPct     Top
This parameter can be used only when Take Profit is set. Stop loss will be moved to break even (order opening price) when BreakEvenPct percentage value is reached between order opening price and take profit. E.g. TakeProfit = 60 pips, BreakEvenPct = 50. In this case stop loss will be moved to break even (order opening price) when 30 pips of profit is reached.


BreakEvenPips     Top
This parameter is used, if take profit is not set or BreakEvenPct is not set. EA will move stop loss to break even when BreakEvenPips value of profit is reached (price goes to the right direction by BreakEvenPips number of pips).


Trace     Top


TraceToMail     Top
Send trace messages by email. To enable sending messages, set this parameter to True. It will send trace level 1 messages. If TraceLevel parameter is set to higher value, then higher level trace will be written to journal or file, but only level 1 trace messages will be sent by email.


TraceToSkype     Top
Send trace messages through Skype. To enable sending messages set this parameter to True. It will send messages up to trace level 2. If TraceLevel parameter is set to higher value, then higher level trace will be written to journal or file, but only level 1 and level 2 trace messages will be sent through Skype.

Note: You need to make some setup before using this feature.


SkypeAccount     Top
Set this parameter to Skype username of destination account to which messages will be sent (in other words it is account username where messages will be received). Messages will be sent from Skype account, which is running on computer where EA runs (you do not need to input this account username anywhere).


Market hours filter     Top


MarketHoursOn     Top
In order to enable trading only on some time window, set this parameter to True. EA will trade during hours from HourStart to HourStop.


HourStart     Top
Set this parameter to hour when trading should be started. Value can be from 0 to 23.


HourEnd     Top
Set this parameter to hour when trading should be stopped. Value can be from 0 to 23.


Tick counter for order closing     Top
EA can delay position closing for a specified number of ticks after closing signal happens.


OrderClosingTimerOn     Top
In order to enable tick counter, set this parameter to True.


TimerTickCount     Top
Order will be closed, when number of ticks specified in this parameter happens after the closing signal is activated.


Sleep after trade timer     Top
EA can wait for the specified time when the position is opened. To enable sleep set at least one of the following 4 parameters. If all of them are set to 0, then sleep is disabled.


SleepHours     Top
Sleep time in hours.


SleepMinutes     Top
Sleep time in minutes.


SleepSeconds     Top
Sleep time in seconds.


SleepMiliseconds     Top
Sleep time in milliseconds.


Money Management decrease factor     Top
Order size can be decreased after specified number of consecutive losses. Position sizing will go back to normal after the first win.


LossTradesToDecrease     Top
Set number of consecutive losses after which next position size will be deceased by DecreaseFactor. Position sizing will go back to normal after the first win.


DecreaseFactor     Top
Position size after loses will be decreased to the factor of this parameter value (New_position_size = DecreaseFactor * Original_position_size).

E.g. Let's say DecreaseFactor = 0.2. In this case, next position will be decreased 5 times. In order to disable decreasing, set this parameter to 1.


Martingale money management     Top


MartingaleOn     Top
To enable martingale money management set this parameter to True. By default it is turned off (value: False). StopLoss and TakeProfit must be set in order to use martingale. Position size is starting position size for martingale, so set Lot or RiskAccountPct to very small size.


MaxNumberOfIncreases     Top
This is maximum number of increases. When you have more losses in a row than set in "MaxNumberOfIncreases", EA will take the loss and go back to starting position size.