Is autotrading possible with a DC using Metatrader?

 
About this question I have had doubts in the last 24 hours. Situation 1: Why did the order close at this price?



Situation 2:
Quotes stop coming for one pair from a certain moment, the Expert Advisor is inactive. The Expert Advisor should have closed the open order at the right time. It is clear the order did not close. The result is a stop loss soon.

I have sent emails to support yesterday but there has been no response yet. And if the first situation can be seen in fact (by the way, what explanation is there?), the second one cannot be seen if I do not constantly monitor the quotes flow. But it is not autotrading, is it?

Without discussing the DC: it is overseas and big, and if it does not work with him, then it will not work with anyone else, as on me....
 
The whole problem could probably be solved by a built-in function that would allow to call the function start from itself with the completion of the previous call on a global level, i.e. emulation of arrival of a new quote with the same values.
This would solve many problems, but MT4 developers for some reason do not share the importance of such a thing. :((
 
Andrei01 >>:
Всю проблему видимо могла бы решить встроенная функция, которая позволяла бы вызывать функцию старт из неё самой с завершением предыдущего вызова на глобальном уровне, то есть эмуляция прихода новой котировки с прежними значениями.
Это решило бы множество проблем, но разработчики МТ4 почему-то важность такой вещи не разделяют. :((
I don't quite get the idea. If you use watchdog, it doesn't help in autotrading, because you are not at the monitor. And if there are open positions, there is no influence on them ...
 
Choomazik >>:
Я не совсем понял идею. Если ипользовать watchdog, то в автотрейдинге это не поможет, так как вас нету у монитора. И если есть открытые позиции, то никакого влияния на них уже нету ...

As I understood the problem is that Expert Advisor is inactive due to lack of quotes and start function call? This can only be solved at the level of the external application that calls the start function, i.e. at the level of MT4 developers. This is similar to creating and deleting objects in OOP.

Another possible variant is to run the EA in parallel on a chart with another pair and perform some operations on ticks of this pair from there, but for orders of the first pair - the probability of missing quotes for several symbols at once is much lower.

 
Andrei01 >>:

Как я понял проблема в том что эксперт бездействовал из-за отсутствия котировок и вызова функции старт? Это может быть решено только на уровне внешнего приложения, которое вызывает функцию старт, то есть на уровне разработчиков МТ4. Это похоже на создание и удаление объектов в ООП.

Другой возможный вариант - это запустить эксперта паралелльно на графике с другой парой и от туда совершать какие-то операции по тикам этой пары, но для ордеров первой пары - вероятность что пропадут котировки одновременно на нескольких инструментах гораздо ниже.

Possibility but not a radical solution to the problem, no guarantee for the second pair either.

 
Choomazik писал(а) >>

Possibility but not a radical solution to the problem, no guarantee for the second pair either.


it is possible to write the body of the whole EA in a looped init() and update quotients on each cycle. Then the position can be closed at a certain time even without entering the ticks and calling start(). But this is actually a script

 

or you can combine these two ideas and then everything will be guaranteed, i.e. loop the script in another window and analyse only the fact that the quotes in the first window stop coming in.

 
Avals >>:


..... даже без поступления тиков и вызове start()

If you don't get a quote for a long time, you'll probably get an error 136 ERR_OFF_QUOTES like no price. So still have to wait :(

 
Andrei01 >>:

а можно совместить эти две идеи и тогда будет всё гарантированно, то есть в другом окне зациклить скрипт и анализировать только факт прекращения прихода котировок в первом окне.

... then get a notification that no quotes are coming in. You are not in front of the monitor, because everything is automatic. Then you should probably close everything on the pair, because you are no longer trading as such.

 
Choomazik >>:

... тогда получите оповещение, что котировки не приходят. Вас перед монитором нет, ведь все идет автоматом. Тогда вероятно надо закрывать все на паре, потому что торговли как таковой вы уже не ведете.

This is how you program this case - the question was how to recognize this event, not what to do in this case.

The action may vary depending on the cause - it may not necessarily be a problem of the DC, although if you can prove that it was the fault of the DC, then you can probably try to demand something.

Reason: