Features of the mql5 language, subtleties and tricks - page 15

 
Roffild:

I only described the officially confirmed bug. It was you who suggested to use some API to solve this problem.

Please do not confuse creating an indicator and calling it via iCustom.


Here, don't confuse reality with your fantasies. This is not a bug. It's clear which API it is. And what is the purpose of your presence here?
 
Comments not related to this topic have been moved to "Pending orders are not displayed in visualization mode".
 

You can finish your dancing with tambourine.

The SD said that from the next build OrderSend() will work properly :)

Looks like it really worked. I just got an update to 1550 and checked that all environment is synchronized when opening a position right after OrderSend().
 
Sergei Vladimirov:
Looks like it really worked. I just got an update to 1550 and checked it. When I opened a position right after OrderSend() the whole environment is synchronized.
Only new problems appeared :)
 
Sergei Vladimirov:
The update to 1550 just arrived, I checked - when opening a position right after OrderSend() the whole environment is synchronized.

I confirm, OrderSend became fully synchronized. Bugs of the brakes remain

Request/Response

Request.action = TRADE_ACTION_REMOVE (8)
Request.magic = 0
Request.order = 136746576
Request.symbol =
Request.volume = 0.0
Request.price = 0.0
Request.stoplimit = 0.0
Request.sl = 0.0
Request.tp = 0.0
Request.deviation = 0
Request.type = ORDER_TYPE_BUY (0)
Request.type_filling = ORDER_FILLING_FOK (0)
Request.type_time = ORDER_TIME_GTC (0)
Request.expiration = 1970.01.01 00:00:00
Request.comment =
Request.position = 0
Request.position_by = 0


Result.retcode = 10009
Result.deal = 0
Result.order = 136746576
Result.volume = 0.0
Result.price = 0.0
Result.bid = 0.0
Result.ask = 0.0
Result.comment = Request executed 2194.767 + 0.003 ms
Result.request_id = 245
Result.retcode_external = 0

Result

MP      0       22:37:32.113    Trades  '5338170': cancel order #136746576 buy limit 0.10 #AA at 36.99
JM      0       22:37:34.308    Trades  '5338170': accepted cancel order #136746576 buy limit 0.10 #AA at 36.99
FE      0       22:37:34.308    Trades  '5338170': cancel #136746576 buy limit 0.10 #AA at market done in 2194.779 ms

It's interesting that the log now records the OrderSend execution time each time it is longer than it actually is. That is, if you measure the OrderSend execution time itself, it will be a few milliseconds less than the value shown in the log each time.

The following entries appeared

deal #120390530 sell 0.10 #PG at 90.36 done (based on order #136747126)
 
Dmitry Fedoseev:

So do not confuse reality with your fantasies. This is not a bug. It is clear which API it is. And what is the purpose of your presence here?

So where is the code to solve this problem?

The developers have already confirmed that this is a bug and there is no solution.

Shortly speaking about myself: I've been working here since 2009. Full-fledged macros and B'1001011' construction are my suggestions for MQL5.

 
Roffild:

So where is the code to solve this problem?

The developers have already confirmed that this is a bug and there is no solution.

What bug? Where have they confirmed it?

No API is required for template reading and writing. Everything is normal, by means of MQL5. The fourth version also has https://www.mql5.com/ru/forum/168767/page14#comment_4122244.

 
Slawa:

What bug? Where was it confirmed?

No API is required for template reading and writing. Everything is normal, by means of MQL5. The fourth version also has https://www.mql5.com/ru/forum/168767/page14#comment_4122244.


I am not talking about the templates, I am talking about attaching the indicator, but the indicator line has its own color. This fellow above believes that the lack of opportunities to set your color is a bug.
 

The absence of the ability to set the color of the indicator programmatically is not a bug, but a feature of the architecture.

Indicators are divided into two parts - the drawing part and the calculation part. The drawing part of the indicator is responsible for drawing according to the settings of calculated buffers. The calculating part counts the buffers accordingly. The indicator drawer lives on the chart and works in the guided flow. The calculation part of the indicator lives in the symbol-period cache and works in the symbol refresh flow.

The calculation part of the indicator doesn't know anything about the drawing part. Experts operate only with indicators calculation parts (which in most cases have no drawing part).

The indicator, created by the Expert Advisor, appears only if the command of adding the indicator to the chart is called (it doesn't matter if it is a manual adding or ChartIndicatorAdd). The same indicator calculation part can be called by several chart parts, for example, if there are several charts of the same symbol-period with the same indicator.

Summary. The indicator calculation part can "have" any number of drawing parts, from 0 to 99. The calculated part of the indicator doesn't know how many drawing parts it has.

 
Slawa:
...
Can you make the command"Open chart" in the "Backtest" tab after testing automatically add to the opened chart all the indicators that were used in the advisor, with the appropriate parameters?
Reason: