Errors, bugs, questions - page 2068

 

A rather interesting overview of the new WebAssembly technologyat https://habrahabr.ru/post/342180/

WebAssembly (WASM) — новый бинарный формат, позволяющий запускать код в браузере...

Applications of WebAssembly:

-Lower load time
-Higher computation speed
-Use C/C++ ready code


Considering the medium rumors about a possible web service for MQL code compilation,
there is a reasonable question about the feasibility of implementing the project of running custom Expert Advisors directly from a browser based on WebAssembly.
Знакомство с WebAssembly
Знакомство с WebAssembly
  • 2012.11.17
  • habrahabr.ru
Эта статья основана на моём выступлении на ITSubbotnik, прошедшем в Рязани 14 октября 2017 года. На русском пока что довольно мало материала на эту тему, надеюсь что статья будет вам полезна. Disclaimer: Автор не является экспертом ни в WebAssembly, ни в JavaScript. Данная статья есть компиляция мыслей и идей, полученных из выступлений других...
 
Andrey Khatimlianskii:

Put out the logs, it will make more sense. Both the Expert Advisor and the terminal.

Terminal tab

2017.11.10 16:29:01.266 '8615385': order was opened : #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000
2017.11.10 20:37:38.949 '8615385': close order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 at price 0.00000
2017.11.10 20:37:39.277 '8615385': close order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 at price 0.00000
2017.11.10 20:37:39.745 '8615385': order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 closed at price 1.68356
2017.11.10 20:37:39.745 '8615385': order #4448742 sell 0.02 EURNZD closing at 0.00000 failed [Invalid parameters]

Tab Expert

        Line 8103: 2    16:29:01.266    Forex V2 EURNZD,M1: open #4448742  sell 0.02 EURNZD at 1.68131 ok
        Line 8104: 0    16:29:01.266    Forex V2 EURNZD,M1: Order #4448742  open

        Line 10145: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 1 закрытия/удаления ордера #4448742  Ошибка: 3
        Line 10146: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10147: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 2 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10148: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10149: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 3 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10150: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10151: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 4 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10152: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10153: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 5 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10154: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10155: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 6 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10156: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10157: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 7 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10158: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10159: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 8 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10160: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10161: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 9 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10162: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10163: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 10 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10164: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10165: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 11 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10166: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10167: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 12 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10168: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10169: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 13 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10170: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10171: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 14 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10172: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10173: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 15 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10174: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10175: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 16 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10176: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10177: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 17 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10178: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10179: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 18 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10180: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10181: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 19 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10182: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10183: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 20 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10184: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10185: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 21 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10186: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10187: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 22 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10188: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10189: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 23 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10190: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10191: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 24 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10192: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10193: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 25 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10194: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10195: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 26 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10196: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10197: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 27 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10198: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10199: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 28 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10200: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10201: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 29 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10202: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        Line 10203: 0   20:37:39.760    ExpertName EURNZD,H1: Неудачная попытка 30 закрытия/удаления ордера #4448742  Ошибка: 4108
        Line 10204: 3   20:37:39.760    ExpertName EURNZD,H1: unknown ticket 4448742 for OrderClose function
        
        Line 10243: 2   20:37:39.760    ExpertName EURNZD,H1: close #4448742  sell 0.02 EURNZD at 1.68131 at price 1.68356

No closing really takes place after Error 3. I have understood it.

Expert Advisor #1 is closing and the second one was trying to close the same position at the same time.

I fixed the working logic and there are no errors now.


BUT: The error number changes from #3 to #4108 when the parameters passed to OrderClose() inside the loop remain unchanged.

Why first error #3 and then #4108 is thrown? - This is the question that remains.

{If we look at the timings, then we have an attempt to close a locked order (in which case error 139 itself is not shown), but after it is closed (and the order is unlocked accordingly) we get error 3 }.


Why does the terminal not give us a specific error that the order is blocked and instead we get too general error 3 ?

 
Kirill Belousov:

BUT: Change error number from #3 to #4108 when parameters passed to OrderClose() inside the loop are unchanged.

Why is Error #3 first and then #4108? - This is the question that remains.

This is the version of the code where there was 1 OrderSelect, isn't it? Then 4108 is justified.

3 is when another EA closes a position and 4108 is when we try to close an already closed position.

 
Andrey Khatimlianskii:

This is the version of the code where there was 1 OrderSelect, isn't it? Then 4108 is justified.

3 is when another EA closes a position, 4108 is when we try to close an already closed position.

Right.

But why is error 139 not generated when trying to close an order that has already been closed?

After all, we rather have the situation of error 139. Isn't it so?

 

Incorrect error text

void f( int &[] ) {}

class A
{
public:
  int Array[];
  
  void f2() const
  {
    f(this.Array); // 'Array' - constant variable cannot be passed as reference
  }
};
 
It's not supposed to swear
Print(NULL); // 'NULL' - expression of 'void' type is illegal
 
Kirill Belousov:

Correct.

But why doesn't the error 139 come out when trying to close an order that has already been sent to close?

After all, we rather have the situation of error 139. Isn't it so?

I do not know. But it cannot be called a bug either.

 
Andrey Khatimlianskii:

I don't know. But it's hard to call it a bug either.

2017.11.10 16:29:01.266 '8615385': order was opened : #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000
2017.11.10 20:37:38.949 '8615385': close order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 at price 0.00000
2017.11.10 20:37:39.277 '8615385': close order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 at price 0.00000
2017.11.10 20:37:39.745 '8615385': order #4448742 sell 0.02 EURNZD at 1.68131 sl: 0.00000 tp: 0.00000 closed at price 1.68356
2017.11.10 20:37:39.745 '8615385': order #4448742 sell 0.02 EURNZD closing at 0.00000 failed [Invalid parameters]

If you look at the terminal log, error message 3 is generated after the position is closed, not when the lock on the server should have been detected.

The error message 139 could have been shown almost 0.5 seconds earlier. All this time, the Expert Advisor "hangs" to get error 3 after the order is closed.

And by the way, error 3 Invalid Parameters is in the terminal log and 4108 only due to its output and only in the EA tab. Looks like 4108 is client side processing.

Just want to know/understand the logic in order to put it in the code rather than fumbling with the scientific gauge method... )

In what other situation would one get an error 139 than this...?

 
Kirill Belousov:

What better situation to get an error 139 than this...?

When a pending order/SL/TP is triggered or a position is closed by a stop out (also on the server).

I don't know about 4108.
But again, I see no reason to look into it - if 2 EAs simultaneously give an order to close, one of them will definitely have an error (what difference does it make?).
Processing is very simple - do OrderSelect and check OrderCloseTime.

 
Ilnur Khasanov:

wtf?
from the moderator:
Unfortunately, due to a technical glitch, the description text has been deleted. Please write it again and send the product for verification.
We apologise for the inconvenience caused.

It's not just an inconvenience, it's a pain in the neck a few times (each time - a 10 day wait), and then delete and say: oops, sorry, we erased, somehow restore it yourself, then wait another 10 days. - And when I try to do it the site crashes...

What the hell is this? What kind of glitch has to happen for this to get lost? that there's no history to recover? The description message has been in storage for a few days.
Why didn't the message from the moderator pop up this time?

I know for a fact that this wiping problem doesn't happen one time. This alleged glitch, in fact it is not a glitch (Probably delayed), because it happens not only to me and not at the same time (the problem exists for more than half a year)! - Please comment...

And please fix it. If you can't, hire me. I'll do it in a week, for 2,000 euros.

What a fiasco.

In fact, will they restore the erasure? Half my correspondence with the moderator is gone. The messages from the forum are gone. And the moderators have deleted messages that have gone blank.
Why is there no maintenance mode? - It is better to say in such an order: first mode is activated, then the work is in progress, then mode is restored.

As soon as I posted a message, the site is down. I decided to refresh - the site is down...

wtf for the second time. the comment above was written 4 days ago. now it's back with a remark that i have already corrected. i posted a new version of the product. now it is gone. where has the new version gone?
This is no way to work - well it's not serious...
In a new comment to the moderator I duplicated the description that was missing so as not to lose any more.
what to do with the product? send it by email? attach it to the comments? or try again and wait 24 hours?