Hello,
See the results of a Strategy testing below:
If we consider Order number 2 for instance (of type "sell", and direction "in", executed at 14:00:00), how do I know to which "Out" order it is attached ?I mean, this "In" order is at some point closed by a sell position with a direction "out", right ? but how do I know which one ?
Thank you
Thanks Dominik,
After checking I cannot see a column which would be the equivalent of ORDER_POSITION_ID , the problem is that I don't have access to the code of the EA
Sorry but as you can see above, it does not show the relation between the In's and Out's
As one open position can be closed by TP, SL or several orders (partial close) or by another position (close_by) you have to analyse:
DEAL_TICKET, DEAL_ORDER, DEAL_TYPE, DEAL_ENTRY, DEAL_REASON, DEAL_POSITION_ID, ... (try not to drive yourself crazy).
Or you use for each new trade an individual magic number. Of course this is not the intention of the magic number but it can be misused that way.
As one open position can be closed by TP, SL or several orders (partial close) or by another position (close_by) you have to analyse:
DEAL_TICKET, DEAL_ORDER, DEAL_TYPE, DEAL_ENTRY, DEAL_REASON, DEAL_POSITION_ID, ... (try not to drive yourself crazy).
Or you use for each new trade an individual magic number. Of course this is not the intention of the magic number but it can be misused that way.
Then he has to analyse the history the way I said: analyse DEAL_TICKET, DEAL_ORDER, DEAL_TYPE, DEAL_ENTRY, DEAL_REASON, DEAL_POSITION_ID, ...
Wrong. If one position is closed by another position both have different Position IDs but then maybe the same Magic Number.
The IDs of order, deal and position are set by the system. They can be the same or they can differ. The magic number ist the reference of the trader and it's not changed - so why not use it for ones own trading beyond one for each EA?
- www.mql5.com
Then he has to analyse the history the way I said: analyse DEAL_TICKET, DEAL_ORDER, DEAL_TYPE, DEAL_ENTRY, DEAL_REASON, DEAL_POSITION_ID, ...
Wrong. If one position is closed by another position both have different Position IDs but then maybe the same Magic Number.
The IDs of order, deal and position are set by the system. They can be the same or they can differ. The magic number ist the reference of the trader and it's not changed - so why not use it for ones own trading beyond one for each EA?
- Red = Sell
- Blue = Buy
- Right arrow = Open
- Left arrow = Close
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
See the results of a Strategy testing below:
If we consider Order number 2 for instance (of type "sell", and direction "in", executed at 14:00:00), how do I know to which "Out" order it is attached ?I mean, this "In" order is at some point closed by a sell position with a direction "out", right ? but how do I know which one ?
Thank you