Questions from Beginners MQL5 MT5 MetaTrader 5 - page 260

 
I have found time to look into the positions and their properties. I'm confused - if positions are opened and closed, how can I enumerate all historical positions that were opened and closed by the symbol? I want to select the entire history of positions for the symbol, and then go through the history of deals for each historical position. How can I do this? It is described everywhere how to get the history of orders and deals, but how can I get a list of positions??? You slightly misunderstood the question. I am not asking how to deal with a CURRENT position, it is obvious. How to get the HISTORICAL positions that used to be, but have gone into the past? I understand that the POSITION lives from the moment when the volume of deals becomes different from zero, to the moment when it became equal to zero. How to get a list of POSITION? Not orders and deals, but positions on the selected pair???
 
superprofit:

Several questions arise:

  1. what do you understand by "point"? If you take GBPJPY, the spread is about 63 pips or 6 pips.
  2. You cannot see any comments in this screenshot.
  3. This screenshot does not show links between orders and trades

Go like this: right-click on the "History" tab and select "Orders and Trades". It should look something like this:

1

 

YAndrey:
Нашел время еще поизучать позиции и их свойства. Я весь в непонятках - ежели позиции открываются и закрываются, то как перебрать исторические позиции, которые были по символу??? Мне бы хотелось выбрать всю историю позиций по символу, а потом перебрать историю сделок по каждой исторической позиции. Как это сделать? Везде описано как получить историю ордеров и сделок, но как получить список позиций???

You have somewhat misunderstood the question. I'm not asking how to deal with the current position - that's clear. How to get a HISTORICAL position, which was, but has gone into the past? I understand that the POSITION lives from the moment when the volume of deals becomes different from zero, to the moment when it became equal to zero. How to get a list of POSITION? Not orders and deals, but positions on the selected pair???
You could say exactly the same. That is, by working with the account history. Each position has its own unique identifier:POSITION_IDENTIFIER.
 
Hello all did not know where to ask a question, so excuse me. i have a following question, if someone has a Zigzag indicator that when the indicator formed the lock high or low, it would display the price, if formed the top top price should not be displayed at the close and the high candle if the bottom is formed zigzag then just do not close the candle and low is similar indicator now will lay out. but it writes all three parameters and low close high.
 
tol64:
We can say that exactly the same. That is, by working with the account history. Each position has its own unique identifier:POSITION_IDENTIFIER.

I'm talking about Kuzma and you're talking about...

Let me ask you a more specific question - is it possible to select and is there a function for selecting the history of positions? Without going through orders and deals. Just search through all of the historical positions for a currency pair.

 
YAndrey:

I'm talking about Kuzma and you're talking about...

Let me ask you a more specific question - is it possible to select and is there a function to select the history of positions? Without going through orders and deals. Just search through all historical positions for a currency pair.

Or am I talking about Kuzma? I understood you perfectly from the beginning. And do not even doubt it. ))

My answer is very concrete, you just expected a ready solution, which is not there. You will have to write it by yourself. There are many examples of how to do this. Exactly with the search of transaction history, focusing on the position identifier. It's simple.

 
tol64:

Or am I talking about Kuzma? I understood you perfectly from the start. And don't even doubt it. ))

My answer is specific, you just expected a ready-made solution, which you don't have. You will have to write it by yourself. There are many examples of how to do this. Exactly with the search of transaction history, focusing on the position identifier. It's simple.

There! That's how it would have been from the beginning. Thanks for the answer. Because I'm looking for ways that aren't there...
 

Does the compiler "see" only the code described "above"? Why does it not compile such a construction:

class A
{
   public:
   B *b;

};

class B
{
   public:
   A *a;

};
 
YAndrey:

Does the compiler "see" only the code described "above"? Why doesn't such a construction compile:

Yes, exactly. Use a class declaration:

class B;
class A
{
   public:
   B* b;
}

class B
{};
 
Hello guys! Can someone write an EA (or who has one):
- EA should place pending orders at a given price (i.e., if one pending order has triggered, it places another at the specified price)
- If after the first triggered order another pending order opened, it places another pending order, which is equal to the first and so on to infinity?

I will give you an example (prices are taken from my head):
I got the idea to use the "lock" strategy: EUR/USD
I open one order at any time, it can be just before the news releases (e.g. buy at 1.3700), set T/P 5 points, if the price goes my way, all is good. If not, I open two sell orders below 5 points (1.3695).
-If the price has not reached T/P on sell, i.e. has turned around, then I put 2 more buy orders (1.3700), T/P is set to cover the minus on sell.
If the price goes up (above 1.3700) we have one more buy order than sell
If the price goes down (below 1.3695- we have one more sell than buy.
I need an EA to open orders at this price: 1.3700 buy and 1.3695 sell, and the T/P will follow myself.
Thanks for the attention....
Reason: