[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 421

 
gyfto:
How do you find the maximum element in the first dimension of a four-dimensional array?
Copy it into a one-dimensional technical array. Process everything there.
 
Zhunko:
Copy it into a one-dimensional technical array. Process everything there.

Then don't copy it, but form a one-dimensional one, and the "coordinates" in this four-dimensional one will be the remainder of the division of the one-dimensional position by the dimensions in the four-dimensional one... In this case, not a single number will be returned, but an array of four elements - "coordinates" in the four-dimensional array.
 
Vinin:

What do you want to find out? All the answers have already been given. Right and wrong.

I don't think there's anything in that plan anymore. I got what I wanted. Thank you.
 
hoz:


Actually, in the documentation, and more specifically here:

https://docs.mql4.com/ru/trading/OrderSend

Said:

Thus, if the difference between the stated opening price and the current market price for a given instrument is greater than slippage, it is the kitchen's fault, not the opening tolerance...

slippage is the maximum allowable price deviation for market orders (buy or sell orders).

This is right on your, Victor, link. - It obviously says that it is for MARKET ORDERS. Pending orders are not.

When I came from stock trading, I discussed all these issues very closely with a large number of brokerage companies and brokers. The position was unambiguous - on Forex, unlike on the stock market (where it is exactly as you described), if the price has reached a pending order - it will be executed at any price. Specialists at the large banks made it clear that if there is a price dip (gap, slippage - whatever you want to call it, but the price will simply leave and there will be no offers), then the order may be executed with a difference... shall we say - a big one. : )) I won't frighten you with numbers. But the bank (broker) will not be able to hold an order, the deposit on which will no longer secure the trade, but will go at the expense of the bank's loss. The bank will cut its losses at any first price. (Although, there are variations, but this is a nuance of the bank and its counterparties)

 
gyfto:
Then don't copy, but immediately form a one-dimensional one, and the "coordinates" in this four-dimensional one will be as residues of dividing the position in one-dimensional by the dimensions in four-dimensional one... In this case, not a single number will be returned, but an array of four elements - "coordinates" in the four-dimensional array.

Wheefto, can you tell me what a FOUR-dimensional array is? - I'm not being sarcastic: I really don't know. I've seen 1, 2 and 3 dimensional ones in books and articles... but 4-dimensional...

The question is partially answered. - A link to this question on the Internet was suggested. Thanks. http://lord-n.narod.ru/download/books/walla/programming/Spr_po_C/04/0406.htm (for those who might also be interested)

 
Chiripaha:
Can you tell me what a FOUR-dimensional array is? - I'm not being sarcastic: I really don't know. I've seen 1, 2 and 3 dimensional ones in books and articles... but 4-dimensional...


I had to deal with it in my work with KAMA. There are just four transferable values there. I usually run it in a loop before attaching a mask in init(), looking for a better period. But there are four. If you're interested in figurative representation - imagine an array of three-dimensional arrays. That is, for example, an array of 20*12*6*8 would be a linear array of 20 elements, where each element in the array is a three-dimensional array of 12*6*8.
 
Chiripaha:

In all these discussions and attempts to find out the truth, I am very much confused (in actions of seekers) and outraged (in inaction of developers) by the fact that even experienced programmers have to guess, experiment, spend time and effort on what, by definition, should be open, transparent and reference material for developers. So that there are no such questions as "maybe...", "maybe not..." in principle. How do you organize your work with users so that even after day and night discussions the truth still remains undefined and unknowable! - I am amazed at the low level of approach to work and the lack of respect for users.

I have nothing positive to say to MetaQuotes in this regard.

I respect those users who try to do their best.

But I cannot call this approach professional - alas. Neither of them, nor others. Why it happens to them and others is another matter. But it is depressing, frankly.

Why is there no source that gives unambiguous and clear answers to such questions? If there is one, where is it, and why are there still experiments rather than statements?



Actually, yes. This has already been discussed many times, but apparently the methaquotes don't give a damn and don't want to explain anything. As I understand it, they are fine as they are. Whether or not they'll write more about the doc, it won't warm them up... That's why they don't move. It is better not to think about it, but to find the right solutions through arguments and discussions. Otherwise you won't get any explanations from official support.
 
hoz:

Actually, yes. This has been discussed many times, but apparently the methaquoters don't care and don't want to explain anything. As I understand it, they are fine as they are. Whether or not they write the doc in more detail, it won't warm them up... That's why they don't move. It is better not to think about it, but to find the right solutions through arguments and discussions. Otherwise you may not get any clarifications from official support.

Roche stated this problem several years ago (what and how does RefreshRates() do). The documentation says what it does and how it does it. And those who make it up are hard to prove it. They don't want to hear and they don't want to read. Stop making things up. The function does only one thing, it updates the market environment for a particular EA. It takes the data from the terminal. There is no reference to the server.
 
gyfto:

I came across it in my work with KAMA. There are exactly four transferable values there. I usually run it in a loop before attaching a mask in init(), looking for a more profitable period. But there are four. If you're interested in figurative representation - imagine an array of three-dimensional arrays. That is, for example, an array of 20*12*6*8 would be a linear array of 20 elements, where each element in the array is a three-dimensional array of 12*6*8.

Great! : ))) Thank you very much. And very imaginative!
 
Chiripaha:

slippage - The maximum allowable price deviation for market orders (buy or sell orders).

This is right on your, Victor, link. - Obviously it says that for MARKET orders. Pending orders are not.

This is not the case for pending orders. When I started my stock trading career I thoroughly discussed all these issues with a large number of brokerage companies and brokers. The position was unambiguous - on Forex, unlike on the stock market (where it is exactly as you described), if the price reaches a pending order, it will be executed at any price. Specialists at large banks have made it clear that if there is a price dip (gap, slippage - whatever you want to call it, but the price will simply leave and there will be no offers), then the order may be executed with a difference... shall we say - a big one. : )) I won't frighten you with numbers. But the bank (broker) will not be able to hold an order, the deposit on which will no longer secure the trade, but will go at the expense of the bank's loss. The bank will cut its losses at any first price. (Although, there are variations, but this is a nuance of the bank and its counterparties)


I spoke to a broker personally about this too. In fact, there are deviations, but very infrequently. And in general, if everything was exactly like that, then what would be the purpose of the pending orders? Then we all would have entered with market and would not have put positions which slipped by an unlimited number of pips in an unnecessary direction. If there is enough liquidity, which depends on the number of liquidity providers (LP), then the prices will be equal to those specified in the position. After all, liquidity allows it. Do you agree?