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
In OnTrade() we receive a response from the server. It means that if we check event in OnTrade(), we will already know for sure if there is a position or not. Although we could provide standard options such as DEAL_ENTRY_FULLOUT (complete closing) orDEAL_ENTRY_PARTOUT (partial closing) to make everything perfectly elegant.)))
This is a good suggestion. No problem for the current moment in real time, but when analyzing the history we need to sum the volumes of all deals that formed the position, to know when it was finally closed.
Yes, it's harder to analyse the story. True, all the necessary information can again be contained in a comment, but the code then becomes more and more "motley". :)
Through the comment, of course, you can, but only in the automatic trading of your EA, and it will not work when analyzing the accounts of others and even with manual control. Only through selection through HistorySelectByPosition().
A long, long time ago, I came up with a solution that makes a huge pile of this kind of mess unnecessary.
But it's on the developer side.:(
It consists in adding to the description (structure) of a trade a field describing the resulting open position on a symbol (after a trade has taken place).
Positive values of this field could mean a Buy position, negative - a Sell position. 0 = no position.
--
This can be done even now - and no server will suffer. There is no need to change the server. At all. Everything can be solved inside the terminal.
// This change is even cheaper than paying credits for all forum posts discussing the mess around with calculating positions on history. :)
... add a field to the description (structure) of the trade describing the resulting open position on the instrument (after the trade has taken place).
Positive values of this field could mean Buy position, negative - Sell position. 0 = no position.
Interesting move! And in combination with new properties DEAL_ENTRY_DECREASE (volume decrease) and DEAL_ENTRY_INCREASE(volume increase) it would be perfect: everyone who needs result volume of a trade - ask us, everyone who needs only trade results (decrease/increase of volume) - ask us!
Have you written to the BOD about your proposal? - Because it's not hard for me to dolt out a nice idea.
This can be done even now - and no server will not suffer. You do not need to change the server. At all. Everything can be solved inside the terminal, quite easily.
// This change is even cheaper than paying credits for all forum posts discussing the mess around with position calculation on history.:)
"Credits for all forum posts discussing the hassle around counting positions on history" - are they that expensive? :) Giving them to the altar of change :)
Interesting move! And in combination with new properties DEAL_ENTRY_DECREASE (volume decrease) and DEAL_ENTRY_INCREASE(volume increase) would be perfect: who needs result volume of a specific trade - you're welcome, who needs only trade result (as "volume decrease/increase") - you're welcome!
About your proposal to the CD wrote? - Because it's not difficult for me to throw in a nice idea.
"Credits for all forum posts discussing the hassle of calculating positions on history" - are they that expensive? :) Giving them up on the altar of change :)
No. They get very stressed out at proposals that change the underlying data structures.
And I really don't like to quarrel with them.
Anyway, I have complexes when it comes to "fundamental" proposals. :)
// I've done a lot of them, and a very small percentage are implemented.
So : have the incentive - go ahead, apply. I hope people will support, the proposal seems to be valuable.
No. They get very tense about proposals that change the underlying data structures.
And I really don't like to quarrel with them.
Anyway, I have complexes when it comes to "fundamental" proposals. :)
// I've done a lot of them and a very small percentage is implemented.
So: have incentive - go ahead and apply. I hope people will support, the proposal is kind of valuable.
Hi all!
Can you advise me, if I open a trade (Buy or Sell) in the MT5 tester at a certain"point in time".
But at thispoint in time there was no quote on the currency pair (ie there is a gap in the data, ie start of the bar M5 at 00:05, and the next bar after that has already started at 00:25)
And I open a deal in the tester for example at 00:15.
What price the tester sets in the deal from the first bar (Clowes) or from the second (Open).
Or will it refuse to open it at all?
Yes, it opens orders, all is well, but it does not write printers. It says
2012.09.04 17:20:10 Trades '1232639': order #11979593 buy 1.00 / 1.00 EURUSD at 1.25755 done
2012.09.04 17:20:10 Trades '1232639': deal #11107137 buy 1.00 EURUSD at 1.25755 done (based on order #11979592)
2012.09.04 17:20:10 Trades '1232639': instant buy 1.00 EURUSD at 1.25739 sl: 1.25439 tp: 1.26039 (deviation: 20)
2012.09.04 17:20:10 Trades '1232639': instant buy 1.00 EURUSD at 1.25739 sl: 1.25439 tp: 1.26039 (deviation: 20)
2012.09.04 17:20:09 Expert Advisor (EURUSD,M5) loaded successfully