Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1534

 

Hello, dear traders.

My question is as follows: I am writing a two-part copier for MT5. One sends csv file to ftp and the other receives it via http. I use webrequest function and examples from mql5.com site

There is a problem with receiving data from the csv file in the second part of the programme, or rather with the encoding of characters in the csv file. Webrequest receives an array of char, which using the function CharArrayToString, gives kryakozebras. Changing flags when opening a file with the fileopen function (I tried FILE_CSV, FILE_ANSI, FILE_UNICODE) does nothing. In Notepad++ the sent csv file appears in UTF-16 LE c BOM encoding.

The question is how to correctly convert this file with char array to the form it had when sent, i.e. to a string with Latin characters and numbers?

 
Artyom Trishkin #:
  1. The server checks the order for correctness (correct prices, availability of funds on the account, etc.);

Is the availability of funds on the account checked on the server? Not in the terminal? This data is available in the trading environment
and it is one of those checks that can be used without burdening the server.

 
maxvoronin74 positions are not closed according to the Expert Advisor's logic. There is neither a log file for today, nor records in the journal. Although there are closed trades in the history. I contacted the broker, reinstalled the terminal. Nothing has changed. And the broker advises to contact the forum or the developers.... Who can advise what?

Perhaps this case.

FreezeLevel (Дистанция заморозки операций в пунктах) - Предлагаю обсудить такой функционал, который позволяет ДЦ ограничивать трейдера в его волеизъявлении по совершению торговых операций.
FreezeLevel (Дистанция заморозки операций в пунктах) - Предлагаю обсудить такой функционал, который позволяет ДЦ ограничивать трейдера в его волеизъявлении по совершению торговых операций.
  • 2024.02.05
  • Aleksey Vyazmikin
  • www.mql5.com
Получает дистанцию заморозки торговых операций в пунктах. ближе которого замораживаются операции клиента с позициями или ордерами. уровни заморозки и спред - явные искусственные инструменты для ухудшения шансов на заработок у клиентов ДЦ
 
Grigori.S.B #:

Is the availability of funds in the account checked on the server? Not in the terminal? This data is available in the trading environment
and it is one of those checks that can be used without burdening the server.

Taken from the official MetaTrader 5 website:



Regards, Vladimir.

 
Grigori.S.B #:

Is the availability of funds in the account checked on the server? Not in the terminal? This data is available in the trading environment
and it is one of those checks that can be used without burdening the server.

This is not my text

 
Artyom Trishkin #:

It's not my text

That's right, Artem, this is not your text and that's why I myself had to answer the question about checking funds on the server in the previous message with reference to the official information from MetaTrader 5.

Regards, Vladimir.

 
Grigori.S.B #:

Is the availability of funds in the account checked on the server? Not in the terminal? This data is available in the trading environment
and it is one of those checks that can be used without burdening the server.

It is possible that the sufficiency of funds is checked twice, both in the terminal and on the broker's server.

 
Alexey Viktorov #:

It is possible that the sufficiency of funds is checked twice, both in the terminal and on the broker's server.

Most likely it is so, perhaps with prices (validity, indents, etc.) the same.
Client terminal is a kind of filter, one of the main tasks of which is
to maximise server load.

 
MrBrooklin #:

Good afternoon, Valery! Yes, that's the problem, that the slightest inaccuracy can fundamentally change the meaning of everything I said in my initial post. As far as I'm concerned, an order and an instruction are synonyms. And though the order is not a full synonym, but, damn, if you translate it from English, it turns out to be a synonym too. ))

Although the explanation you gave is the most clear and logical.

Regards, Vladimir.


Good morning) Earlier in the connection client broker exchange, the client really ordered the broker how to dispose of his funds, so there the order was an instruction and order. Now in the regulations almost all have a phrase, your order is put in the queue for execution) Kind of like an order, but in the queue. An order in the queue is more logical in meaning. Well and the level of the client in relation to financial companies is kind of defined as equal, but where is the exchange and where is the client of the exchange or where is Tinek and where are his clients)))) and who can order whom))))))

 

In general, I tried to express my thought in some way connected and as briefly as possible, and this is what I got in the end:

Let's take a closer look at the general scheme of trading operations:
.
  1. From the trading platform installed on the trader's computer, an order (order, instruction) is sent to the server of a brokerage company (forex dealer, dealer centre, etc.) to execute a deal on one of the two main types of orders. These include:
    • market order is an order (instruction) for immediate execution of a transaction at the current bid or offer price, depending on the type of its execution;
    • a pending order is an order (instruction) to make a deal in the future at a price specified by the trader that differs from the current market price.
  2. The server checks the order for correctness (correctness of prices, availability of funds on the account, etc.);
  3. Orders that have passed the check are waiting for their further processing on the trading server. Further the order can be:
    • executed (in one of the automatic execution modes or by a dealer);
    • cancelled after expiry of the validity time;
    • rejected (for example, in case of lack of money or absence of a suitable offer on the market);
    • cancelled by the trader himself;
  4. If the trader (or advisor) has sent an order (order, instruction) for immediate execution of the order (i.e. market order) to the server of the brokerage company, then a new position will be opened immediately after the transaction in the corresponding financial instrument.
  5. If a trader (or advisor) has sent an order (order, instruction) to the brokerage company's server to execute an order in the future (i.e. a pending order), then after the current price reaches the price level specified by the trader in the pending order, this order will "trigger", then the transaction will be executed and a new position will be opened immediately;
  6. If there is an already open position on a financial instrument, the result of the transaction may be an increase or decrease in the volume of the position, its closing or reversal.


Please respond with constructive criticism. ))

Regards, Vladimir.

Reason: