In this topic, we have some discussion about which of MT4 or MT5 is better to apply various trading style. My opinion is : None - Both. You can apply similar trading styles but differently. What is highlighted by tonny, is that in MT5 you can't hedge and, as an example, challenges me to "open two equal sized trades of different direction in same pair on mt5".
So, I accepted the challenge. Obviously, if you open 2 equals sized trades on the same pair on MT5, both are immediately closed. But I guess, on real live, you don't simply open trades for pleasure to open. Therefore I take a more realistic situation :
Open 2 trades at some price, if price goes in one direction for 5 pips, close the other trade, remaining trade will have a target of 20 pips.
I don't even open trades on same price in both direction. When the price reach 1.3070, I used pending orders to do same things as SL and TP do for MT4. So I open 4 pending orders.
As a consequence, of course, the P/L figures in the history tab are useless. However in Excel or another spreadsheet manager it is easy to calculate them manually by comparing the price of the position opening and the stop loss/take profit order.
I have finalised this system only few weeks ago, I call it virtual position management. Up to this date it looks like working fine. At the beginning, I believed it would be much more complicated than the normal procedure, but now I can say it is quite straightforward.
One twist in the coding can be if somebody would like to use asynchronous order sending when the order number should be got through the OnTradeTransaction event. At this stage I cannot see benefit of sending market order with this method, because you have to wait either using OrderSendAsync (then in OnTradeTransaction) or OrderSend for feedback from the broker server to get the order number (or possible other outcomes, reqoute, rejection, etc.). In case of pending orders it might be worth the additional effort to implement.
Your thinking is on right track. This is almost the good solution, but one important feature is missing. You MUST open the positions regardless whether they will offset each other. The reason is that in real life you cannot know when an EA will open position. Therefore can be situation when only one will open and close position before other opens as well, and in this case you need the position opened to achieve the hoped profit. Sometimes another EA will open another position which can be either same direction or opposite. If the opening is the same size but opposite then the position will be zero, as you described. But it still does not mean that the story is over. So, the EA has to be able to record and track all necessary details of the active position, including open price, position size, SL order & price, etc. Basically the EA calculates everything based on internally stored values and does not use the information which can be obtained about the current position from the terminal.
As a consequence, of course, the P/L figures in the history tab are useless. However in Excel or another spreadsheet manager it is easy to calculate them manually by comparing the price of the position opening and the stop loss order.
I have finalised this system only few weeks ago, I call it virtual position management. Up to this date it looks like working fine. At the beginning, I believed it would be much more complicated than the normal procedure, but now I can say it is quite straightforward.
One twist in the coding can be if somebody would like to use asynchronous order sending when the order number should be got through the OnTradeTransaction event. At this stage I cannot see benefit of sending market order with this method, because you have to wait either using OrderSendAsync (then in OnTradeTransaction) or OrderSend for feedback from the broker server to get the order number (or possible other outcomes, reqoute, rejection, etc.). In case of pending orders it might be worth the additional effort to implement.
I did not speak about an EA but about manual trading. Obviously with an EA you can do what you want, more or less easily. By the way, thanks for your contribution.
- www.mql5.com
Ok can you now do the same without using pending orders or other inconvenient ways? Lets assume you want to manage 100 trades of the same pair made up of different stops and direction will you sit with pen and paper to manage calculate all that then open all those pending orders? Bs
What are you tying to show ? Obviously MT4 and MT5 are very different in order management. Obviously it's easy to open a lot of order with different stops in MT4. Obviously you have to use pending orders in MT5 for manual trading of different orders. And what ? If you don't like that use MT4, no problem with that. Please don't continue to argue about that.
If you have some positive comment on how to work with MT5 (or even MT4), go on, otherwise I already warned you I'm not going to tolerate your spamming posts. This forum is already filled with your posts about "MT5 do not permit hedging ...". This is my last warning.
Sometimes one might want to run many different EAs or strategies on one account and want to monitor everything in one place. And for your info you are the one who restarted this topic and put my name up there so that people know its me you are targeting.
a little off topic
able to close individual deal instead of the whole position?
a little off topic
able to close individual deal instead of the whole position?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
In this topic, we have some discussion about which of MT4 or MT5 is better to apply various trading style. My opinion is : None - Both. You can apply similar trading styles but differently. What is highlighted by tonny, is that in MT5 you can't hedge and, as an example, challenges me to "open two equal sized trades of different direction in same pair on mt5".
So, I accepted the challenge. Obviously, if you open 2 equals sized trades on the same pair on MT5, both are immediately closed. But I guess, on real live, you don't simply open trades for pleasure to open. Therefore I take a more realistic situation :
Open 2 trades at some price, if price goes in one direction for 5 pips, close the other trade, remaining trade will have a target of 20 pips.
Here what this give with MT4 :
Spread was 0.9 pips.
How can I try to do this with MT5 ?
I don't even open trades on same price in both direction. When the price reach 1.3070, I used pending orders to do same things as SL and TP do for MT4. So I open 4 pending orders:
For the SL & TP of the sell order : 1 buy stop and 1 buy limit. For the SL & tp of the buy order : 1 sell stop and 1 sell limit. If the sell limit if reach I cancel the sell stop (or reverse). If the buy limit is reach I cancel the buy stop (or reverse).
These result in the following deals :
The result is a little different due to some difference in open/close price, but the trades are very similar.