Categories

September 16, 2020

Creating your EAs (Expert Advisers) and Backtesting on MT4

Do you know how to program MQL4 EAs and backtest the strategies on MT4?

Creating-your-EAs-(Expert-Advisers)-and-Backtesting-on-MT4 Creating-your-EAs-(Expert-Advisers)-and-Backtesting-on-MT4

You can make your own MT4 EAs

On MT4 trading platform, you can make your own EA if you can program it.

We will briefly explain its advantages and disadvantages and how to make EAs (Expert Advisors).

First, let’s find out the advantages and disadvantages of making your own EAs.

Benefits of self-made EA

Various types of MT4 EA are available for free on the internet.

In the beginning, you are recommended to install and use EA that can be downloaded for free on the internet on your MT4, but it is hard to find EA with the logic that perfectly matches my trading style.

However, if you can make your own EA, you will not have to worry about it.

If you make your own MT4 EA, you can customize all kinds of trading rules such as currency pairs, chart tool parameters used for technical analysis, timeframe for determining entry timing, profit and loss ratio, etc. as you like.

Even if you are busy and do not have time to look at the chart, if you start MT4 and set EA automatic trading, Forex trading will be performed automatically based on the method you created.

You can also adjust the logic by taking into account the trading results.

See the list of MT4 brokers

Disadvantages of self-made EA

One of the disadvantages of self-made EA is that it is difficult to create if you cannot program.

First of all, of course, you can’t create an EA without programming knowledge.

As for the type of programming language, it is necessary to use “MQL” developed by MetaTrader’s development company “MetaQuotes” instead of the popular C language.

For those who have never studied programming before, learning a minor language and assembling a program from scratch is a difficult task.

Also, even if you study and learn to program and set the logic of EA, it is possible that when you try to use it, it will not enter and settle as you expected.

However, already programed EA’s problems can be solved by asking a programmer.

In this case, it seems that the most reasonable method is to decide only what kind of trading style you want and leave the rest to the professionals.

What’s EAs (Expert Advisers) of MT4 and MT5?

Why many traders fail with EAs?

EA is a very attractive tool, but there are surprisingly many people who fail with the tool.

Why do you make a mistake when you choose a high-margin and good EA?

The main reason may be that traders continue to use the old EAs.

The market price is constantly changing, and some movements that used to work may suddenly stop working.

It is impossible to make stable profits forever by using the same thing all the time.

For that reason, when starting an EA, it is necessary to constantly update the data, such as adjusting to the latest market price.

No matter how automatic trading is, it is dangerous to leave it completely unattended, so be sure to optimize.

Keep an eye on the latest information and continue your research to find out which EA has the highest profit margin today.

Traders who are willing to learn like that are more successful in EA.

Full User Guide – MetaTrader4 (MT4) Trading Platform

Why EA is better than manual trading?

Forex usually makes a decision of “sell” or “buy” while looking at the market price and considering the economic situation and political situation, and trades based on that decision.

The method used for trading varies from person to person, and although FX is a minority, there are people who focus on fundamentals and trade, while there are also traders who emphasize technical analysis of the majority and trade.

Those who trade by technical analysis use various technical indicators and trade based on them.

Each trading method varies from person to person, such as trading by focusing on the candlestick line or by focusing on the horizon.

When you trade based on technical analysis, for example, if you pay attention to technical indicators, you need to place a new order or settlement order when certain conditions are met.

However, it becomes a problem if you are in a state where you cannot trade when a market meets the conditions.

Some people work during the day and some work late till night, so they may not be able to spend their time trading.

Forex companies offer pre-orders such as OCO and IFO as well as limit orders and stop orders, however, many of these pre-orders require you to specify a rate.

For example, it is necessary to point out a specific rate such as “Enter by selling if the price breaks below 1.10 dollars”.

Some people may want to place a new order or a settlement order when the technical indicators such as meet certain conditions.

In that case, whether or not the technical index meets the conditions is more important than the rate, so it means that trading by pre-order such as IFO is not very meaningful.

Also, since most technical indicators are used instead of one, it is not possible to trade at the timing when multiple technical indicators match the trading conditions with a pre-order.

In addition, there are Forex companies that will notify you by e-mail etc. when the technical index meets the conditions, but if you are in a situation where you can not trade at that timing, it will be completely meaningless.

In this way, when trading at discretion, those who do not spend much time on trading due to work etc. must find the timing that matches the trading conditions within the limited time, so performance is improved.

That’s where automatic trading came in.

Automatic trading is also called system trading, and it is widely used in FX because it is supported by people who have difficulty in discretionary trading due to work, etc. and those who are not good at performance and cannot improve performance.

By setting an automatic trading software called EA, which has a built-in program to automatically buy and sell when the conditions specified by you are met, on the chart, trading is performed according to the conditions.

Merit and Demerit of Automated System Trading (EAs) in Forex

Control your emotions with EAs

As already mentioned, such system trading is beneficial for those who cannot usually check the market price frequently.

But that’s not the only benefit.

It is often said that you should not put emotions into trading, but there are many traders who can not do that easily.

It often happens that you couldn’t thoroughly follow the trading rules you made, and thought, “You can pursue profits a little more” and “If you wait a little longer, the market will reverse and the loss will shrink”, so you can take appropriate profits and cut losses.

It is often the case that the loss is inflated without doing so.

In system trading, the program trades based on the rules, so such a feeling does not occur.

Therefore, there is an advantage that the trading rules can be thoroughly enforced.

You will not pursue profits deeply or expand the unrealized loss as it is by using EAs.

Everything about Forex – How and Why for beginners

Backtesting is mandatory for System Trading

In recent years, more and more people are trading FX using system trading.

Unlike discretionary trading, which tends to be emotional, the characteristic of system trading is that you can trade according to the rules.

However, system trading is not always a win, and the market prices that you are good at differ depending on the system.

As mentioned earlier, the basic style of investing in Forex etc. is to trade while actually looking at the trading screen.

However, in recent years, some traders make full use of programs and perform system trades that mechanically trade based on certain rules.

And Backtesting is indispensable for this system trading.

Here, we will explain these basics to those who are not familiar with system trading and backtesting.

Learn what system trading is and why you need backtesting to get a better understanding of Forex.

See the list of MT4 Brokers

Backtesting can verify the performance of EAs

The characteristic of system trading is that it does not involve any emotions, but backtesting is indispensable for doing so.

What is important when trading Forex is, of course, “improving performance”.

In discretionary trading, emotions hinder performance improvement.

Since system trading eliminates this feeling, the performance of trading using this can be a pure measure of the quality of the method.

By backtesting, you can see if the technique actually improves performance.

If you try it in real trade without backtesting, you may lose a lot if it is a poorly performing method.

To prevent this from happening, it is important to check the performance status in advance and put it into practice.

In addition, backtesting is an effective means not only for measuring the goodness of a technique but also for measuring which currency pair at which time zone the technique can perform best.

One method does not give much higher performance, and it is not uncommon for market changes to make it less performant than it used to be.

In that case, you need to check from various angles, such as trying different methods, or even if the same method is used, try different time zones and different currency pairs.

As a result, if you find that another method can perform better, you can use that method to make new trades.

Also, if the traditional method has the potential to improve performance in other currency pairs and time zones, it is a good idea to trade in other time zones or switch to another currency pair.

The Best MT4 Forex Broker to run EAs

Backtesting is better also for discretionary trading

Even in the case of discretionary trading, it is better to backtest as much as possible.

However, there are many people who do not know how to back-test discretionary trades.

Collecting chart data for the past few years for backtesting on your own can be a daunting task.

Furthermore, if you try to collect short time charts such as 5 minutes and 15 minutes for 10 years, it is difficult to collect them, and apply your own method while checking the price movements one by one as it will take a long time to do so

You can also backtest discretionary trades with demo accounts

But to record how much performance you have achieved and convert it into data, it takes time and effort.

It’s not that backtesting using demo trade is meaningless, but the rate of demo trade provided by Forex companies may differ from the actual market price, so as a verification of the method, it’s a delicate place to be useful.

Therefore, if possible, it is better to backtest based on the rate actually delivered.

If you want to backtest discretionary trades, we recommend that you use software that can backtest.

A detailed explanation will be given later, but by using software that can be verified, it is possible to efficiently verify the method in discretionary trading.

See the list of MT4 Brokers

How to do backtest EAs and Strategies?

Backtesting is important whether it is a system trade or a discretionary trade.

Here, we will explain the basics of backtesting, which is the key to improving trading performance.

MT4 (Meta Trader 4), which is famous as a trading tool indispensable for system trading, is not only free to use, but there are thousands of FX company that provide the trading service using MT4, and it is a big advantage that it can be traded automatically.

However, since knowledge of the programming language MQL4 is required to create an automatic trading program, the hurdles are a little high and not everyone can easily create it.

As a result, many traders customize their free EA to improve performance.

When customizing, it is also a feature of MT4 that you can check in advance how much performance the method can actually improve.

When performing backtesting, it is better to do with historical data as long as possible to obtain more accurate data.

In the case of MT4, although there is long-term data, there are also periods when it is missing, so when performing backtesting, most traders download historical data acquired from other Forex companies to MT4.

There is also a site that introduces how to download historical data of other Forex companies to MT4, so if you actually download it, you may refer to it.

After downloading, MT4 allows you to backtest by entering the required numbers in the parameters using a feature called test settings.

You can also back-test by downloading historical data to Excel.

In that case, delete the information other than the necessary information (open price, close price, high price, low price, etc.) from the downloaded data, put the function in Excel, and calculate how much pips can be taken.

For example, if you buy at the opening price and sell at the closing price, the closing price-opening price-spread will be the profit or loss, so enter the formula so that you can calculate this.

By doing this, you can graph the calculated data and check the transition of performance.

See the list of MT4 Brokers

What to be careful with backtesting?

When actually trading Forex, it is not uncommon for spreads to temporarily widen due to data announcements, important remarks, etc., but in the case of backtesting, such temporary spread widening is not reflected, ao please be careful about that.

Also, keep in mind that backtesting is based on historical data, so you may not know if it will be valid in the future.

Even if the backtest result is good, it is possible that it was refreshing when used in an actual trade.

So make sure you understand that and use the backtest data as a reference.

Go to Hercules.Finance Main Page

Study and Backtest your EAs and Start Earning

The number of people who trade Forex using system trading has increased.

However, system trading only deals with pre-programmed buying and selling, so it cannot handle movements that are not in the program.

Therefore, it is important to use different programs depending on the market price.

And you need to backtest to see which program suits your trading method.

The backtest is to confirm “what kind of transaction and how much performance will be improved with this program” using the data of the past market price.

For example, it may be a program that is superior to other programs in the range market, but the timing of buying and selling shifts in the trend market.

Also, some programs can do nothing if there is a sudden movement, and on the other hand, some programs are good at such a market condition.

If you don’t know what you’re good at and what you’re not good at with the program you’re trying to use, you can incur unexpected losses.

When backtesting, MT4 can be done independently, but for other system trading, backtesting of the software may be required.

There are free and paid software, so choose the one that is easy for you to use.

Automatic trading by system trading is convenient, but it is by no means all-purpose.

All Forex Brokers

  • IFC Markets
  • FxPro
  • IronFX
  • Axiory
  • FBS
  • Land-FX
  • MyFX Markets
  • Titan FX
  • Traders Trust
  • XM
  • LMFX
  • FXDD
  • ForexClub
  • Tradeview
  • EightCap
  • FXOpen
  • HotForex
  • FXGiants
  • LQDFX
  • Fortrade
  • CM Trading
  • InstaForex
  • FXPRIMUS
  • ForexMart
  • Valutrades
  • AvaTrade
  • Yadix
  • easyMarkets
  • JustForex
  • FXTM
  • HYCM
  • FP Markets
  • SimpleFX
  • IC Markets
  • Evolve Markets
  • Tickmill
  • Markets.com
  • UFX
  • Anzo Capital
  • LiteForex
  • 4xCube
  • OctaFX
  • Tifia
  • XTB
  • AAAFx
  • NordFX
  • FXGlory
  • Capex
  • ClickTrades
  • TopstepFX
  • HotForex ZA (South Africa)
  • XMTrading
  • PaxForex
  • FortFS
  • ETFinance
  • ATFX
  • XBPrime
  • Oinvest
  • VantageFX
  • EXNESS
  • BlackBull Markets
  • SuperForex
  • Deriv
  • SquaredFinancial
  • Olymp Trade
  • FinmaxFX
  • Plus500
  • FXCM
  • USGFX

All Crypto-Currency Exchanges

  • CEX.IO
  • HitBTC
  • Paxful
  • BitMEX
  • Binance
  • YObit
  • Bibox
  • BKEX
  • CoinPark
  • CoinEx
  • IRONX
  • CoinField
  • bybit
  • Bitpanda
  • XBTFX
  • Trade8
  • PrimeBit