Questions from Beginners MQL5 MT5 MetaTrader 5 - page 260

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
tol64:
Read this article: MQL5 Recipes-Trade History and Library of Functions for Getting Position Properties
Several questions arise:
Go like this: right-click on the "History" tab and select "Orders and Trades". It should look something like this:
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???Нашел время еще поизучать позиции и их свойства. Я весь в непонятках - ежели позиции открываются и закрываются, то как перебрать исторические позиции, которые были по символу??? Мне бы хотелось выбрать всю историю позиций по символу, а потом перебрать историю сделок по каждой исторической позиции. Как это сделать? Везде описано как получить историю ордеров и сделок, но как получить список позиций???
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.
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.
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.
Does the compiler "see" only the code described "above"? Why does it not compile such a construction:
Does the compiler "see" only the code described "above"? Why doesn't such a construction compile:
Yes, exactly. Use a class declaration:
- 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....