Discussion of article "Create Your Own Expert Advisor in MQL5 Wizard"

 

New article Create Your Own Expert Advisor in MQL5 Wizard is published:

The knowledge of programming languages is no longer a prerequisite for creating trading robots. Earlier lack of programming skills was an impassable obstacle to the implementation of one's own trading strategies, but with the emergence of the MQL5 Wizard, the situation radically changed. Novice traders can stop worrying because of the lack of programming experience - with the new Wizard, which allows you to generate Expert Advisor code, it is not necessary.
Author: MetaQuotes
 
the shortest article never seen !!! welcome to the pavlov syndrom.
 

Is it possible to build a multicurrency Expert Advisor using the wizard? How can I programme this situation:

there are two positions on different instruments, EURUSD.PROFIT=1000 (1lot) and GBPUSD.PROFIT=-450 (1lot) need to close partially both positions so that the total profit~0 (EURUSD.PROFIT~250 (?lot) and GBPUSD.PROFIT~-250 (?lot))

 
beginner:

Is it possible to build a multicurrency Expert Advisor using the wizard? How can I programme this situation:

there are two positions on different instruments, EURUSD.PROFIT=1000 (1lot) and GBPUSD.PROFIT=-450 (1lot) it is necessary to close partially both positions so that the total profit~0 (EURUSD.PROFIT~250 (?lot) and GBPUSD.PROFIT~-250 (?lot))

With the help of the Wizard, you will be able to build any Expert Advisor (including multi-currency, solving the situation described in your post).

The only thing to understand is that the Wizard is a tool for assembling a "house" from "cubes". Some set of "cubes" exists in the standard library.

Unfortunately, none of the standard "cubes" implements an algorithm like: "it is necessary to close partially both positions so that the total profit~0".

Many bright ideas are not implemented yet, but you have the opportunity to write your own classes implementing the algorithms you need.

Two articles have already been published:

"MQL5 Wizard: How to Write Your Trading Signals Module" and "MQL5 Wizard: How to Write Your Capital and Risk Management Module".

The article "MQL5 Wizard: How to Write Your Open Position Maintenance Module" is almost ready for publication

 
I understand that you have to implement your algorithms yourself, you as you can facilitate this process, but I as a beginner in m5 would like to see a ready example of a multicurrency advisor with control of open positions, preferably the simplest, can anyone provide such an example and how much time does it take a professional programmer to implement it?
 
Can anyone show how to trade on multiple instruments using MQL5 Wizard?
Мастер MQL5: Создание эксперта без программирования
Мастер MQL5: Создание эксперта без программирования
  • 2010.12.15
  • MetaQuotes Software Corp.
  • www.mql5.com
Вы хотите быстро проверить торговую идею, не тратя времени на программирование? Выберите в "Мастере MQL5" нужный тип торговых сигналов, подключите модули сопровождения позиций и управления капиталом - на этом вся работа закончена. Создайте свои реализации модулей или закажите их через сервис "Работа" - и комбинируйте новые модули с уже существующими.
 

Hey, Bulat,

Very good stuff you tell us, programming like this, in modules, is fine to me because at this moment

I`am learning MT5 stuff so it`s takes a while to code. Now within three minutes Iam into the game!

  

thank Rob. 

 

The article is a very significant instruction on the way how to develop more advanced experts with ease.

However, I'm having trouble replacing built-in signalindicators with my custom indicator.

The generator recognizes my indicator but the expert refuses to work.

Is there an article/post on how to do it properly?

Step on New Rails: Custom Indicators in MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.
 

Gentlemen, can you please explain how to deal with

-----------------------------------------------

The mechanism of making trading decisions on the basis of signal modules

The mechanism of making trading decisions can be presented in the form of the following basic provisions:

  • Each of the signal modules has its own set of market models (a certain combination of prices and indicator values).
  • Each market model is assigned a significance measured from 1 to 100. The higher the value, the stronger the model.
  • Each of the models generates a forecast of price movement in a certain direction.
  • The forecast of the signals module is the result of the search of embedded models and is given as a number in the range from -100 to +100, where the sign determines the direction of the expected movement (negative - the price will fall, positive - the price will rise). The absolute value corresponds to the strength of the found best model.
  • The forecast of each module is sent for voting with a weight coefficient from 0 to 1.0 specified in its settings ("Weight").
  • The result of the voting is a number from -100 to +100, where the sign defines the direction of the predicted movement, and the absolute value characterises the signal strength. It is calculated as the arithmetic mean of weighted forecasts of all signal modules. This final value is used in the Expert Advisor to make trading decisions.

In the settings of each generated Expert Advisor there are two parameters - threshold values for making a decision to open or close a position (ThresholdOpen and ThresholdClose), which can have values from 0 to 100. If the strength of the final signal (absolute value) overcomes the threshold value, a decision is made to make a trading operation in the direction corresponding to the sign of the forecast.

-----------------------------------------------

Examples

Let there be a certain Expert Advisor with the threshold values ThresholdOpen=20 and ThresholdClose=90. Signals modules based on MA with the weight of 0.4 and Stochastic with the weight of 0.8 are involved in making decisions about trading operations. Let's consider two variants of the received trading signals:

Variant 1.

The price crossed the ascending MA indicator from bottom to top. This corresponds to one of the market models inherent in the MA module, which implies price growth. Its significance is equal to 100. At the same time the Stochastic oscillator turned downwards and formed a divergence with the price. This is one of the Stochastic models embedded in the Stochastic module, suggesting a price drop. The significance of this model is equal to 80.

Let's calculate the result of the final vote. The weighted forecast obtained from the MA module is calculated as 0.4 * 100 = 40. The weighted forecast from the Stochastic module is calculated as 0.8 * (-80) = -64. The final forecast is calculated by finding the arithmetic mean of these two weighted forecasts: (40 - 64)/2 = -12. This is a sell signal with a conditional strength of 12. The threshold value equal to 20 has not been reached. Accordingly, the trade operation is not performed.

--------------------------------------------

Where do the model values come from?

As far as I understand, in the example below, the AC Module generates 4 variants of signals - what is the significance of each of them?

Or am I missing something?



MQL5 Reference Guide / Standard Library / Classes of Trading Strategies / Trading Signals Modules / Accelerator Oscillator Indicator Signals

Accelerator Oscillator Indicator Signals

This signals module is based on market models of the Accelerator Oscillator indicator. The mechanism of making trading decisions based on the module signals is described in a separate section.

Signal generation conditions

Below is a description of the conditions under which the module sends a signal to the Expert Advisor.

Signal type

Description of conditions

Buy

  • The indicator value is above 0 and it is growing on the analysed bar and the previous one.

  • The indicator value is below 0 and it is growing on the bar being analysed and the previous two bars.

For Sell

  • The indicator value is below 0 and it is falling on the analysed bar and the previous one.

  • The indicator value is above 0 and it is falling on the bar being analysed and the previous two bars.

Not against buying

The indicator value is growing on the bar being analysed.

Not against selling

The indicator value on the analysed bar is falling.

Note

Depending on the Expert Advisor operation mode ("Every Tick" or "At Open Prices"), the bar being analysed is either the current bar (with index 0) or the last formed bar (with index 1).

Customisable parameters

This module has the following customisable parameters:

Parameter

Description

Weight

Weight of the module signal in the range from 0 to 1.

 
You can read about models and values in the article MQL5 Wizard: New Version
 
Rosh:

You can read about models and values in the article MQL5 Wizard: New Version

Yes, I looked, in all models of trading signals there are at least 4 significances?

For buying

For selling

Not against buying

Not against selling

https://www.mql5.com/en/docs/standardlibrary/expertclasses/csignal

But nowhere is there any information - how much each value weighs in numbers...................

At the same time, the example talks about the significance of each model in figures

Examples

Let there be a certain Expert Advisor with threshold values ThresholdOpen=20 and ThresholdClose=90. The signal modules based on MA with the weight of 0.4 and Stochastic with the weight of 0.8 are involved in making decisions about trading operations. Let's consider two variants of the received trading signals:

Variant 1.

The price crossed the ascending MA indicator from bottom to top. This corresponds to one of the market models inherent in the MA module, assuming the price growth. Its significance is equal to 100. At the same time the Stochastic oscillator turned downwards and formed a divergence with the price. This is one of the Stochastic models, which suggests the price falling. The significance of this model is equal to 80.

Let's calculate the result of the final vote. The weighted forecast obtained from the MA module is calculated as 0.4 * 100 = 40. The weighted forecast from the Stochastic module is calculated as 0.8 * (-80) = -64. The final forecast is calculated by finding the arithmetic mean of these two weighted forecasts: (40 - 64)/2 = -12. This is a sell signal with a conditional strength of 12. The threshold value equal to 20 has not been reached. Accordingly, the trade operation is not performed.

Where do the values highlighted in red come from?

Документация по MQL5: Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов
Документация по MQL5: Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов
  • www.mql5.com
Стандартная библиотека / Классы торговых стратегий / Модули торговых сигналов - Документация по MQL5