Questions from Beginners MQL5 MT5 MetaTrader 5 - page 765
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
The mouse movement event is definitely not generated. With the others, I think it's the same.
And in the councillor?
Same thing...
The answer was given before...
But it's better not from-a-light quantity, but about the maximum to try to get by with one copy.
I won't write an example code. A normal programmer just needs a hint. Here is an approximate algorithm:
Thus, it is possible to find two intersections in one copy and one cycle, if necessary. There is even no need in ArraySetAsSeries() because when finding the crossing it is possible and, in my opinion, better to remember the time of bar, not its number. Although, knowing the time of the bar, there is no difficulty in determining its number.
Question: What will be faster, a cycle with copying of the indicator buffer by 1 value and copying of high bar by 1 and comparing those values, or a single copy of a certain amount and comparing values of the two arrays with each other?
I suggest not to deviate from the concept, which, as I understood it, was to copy a certain amount of bar data at the beginning of the code, and then work with this data - or do you suggest an exception?
And, what makes you think I'm a programmer?
I don't think you need to guess - what will be faster, sometimes the answer may not be obvious - only experience can give an answer to such questions.
Just wrote this yesterday:
Task:
on each tick get "InpCountCopy" elements open, high, low, close and time.
Implementation:
Features:
it is possible to choose how to check: in OnTick or in OnTimer (1 second).
Tell me why this code finds a ticket that is not already in the history
Tell me why this code finds a ticket that is not already in the history
Have you tried to search for a closed trade (OUT)? There was an order - you can see it.
Tell me why this code finds a ticket that is not already in the history
That's right :
You are looking for an Order , and the Order to open Position = 63425010 has already done its own , and it is in History.
And I think the Ticket Order and Ticket Position are the same, which misled you.
If you want to analyse the Position, use PositionSelect(), then analyse its properties.
What is needed:
We send an order, in response we receive a position ticket, then an object named "position ticket" is drawn on the chart (no replacement is specified). If we open several positions, respectively, there are several objects with ticket names on the chart, and if we then close one of them, all objects are deleted, while we only need to delete the object with the closed ticket from the history. The delete function works on OnTrade
What is needed:
We send an order, in response we receive a position ticket, then an object named "position ticket" is drawn on the chart (no replacement is specified). If we open several positions, respectively, there are several objects with ticket names on the chart, and if we then close one of them, all objects are deleted, and we only need to delete the object with the closed ticket from the history. The delete function works on OnTrade
So what do you need, a ticket of an order or a ticket of a position?
So what do you need, an order ticket or a position ticket?
You need to delete objects with a ticket that are already in the history, but not those that are still in the market
Duplicate: