Origin of trade
-
Hi fxDreema,
You have made a block that is called: "check how it was closed"
Is there also a possibillity to check how it was opened ??
I made an EA and in the EA when the conditions are right the following happened:
The EA puts one trade right away and set a number of pending orders.
Now i want to take action only on the original first trade and not at the trades that were pending orders at first and become trades when the price moves.
I hope you understand my question.
Kind regards,
Martin -
Well, it looks that when a pending order becomes a trade, there is no trace of that pending order anymore. I think that because of this: http://prntscr.com/8r1a3s - the same ticket number from the order is used for the trade.
But even if such thing is possible, there will be searching for information in "how it was opened" every time. Of course, there is always a way to use some Variables and store any information in them, but I don't like using Variables when working with trades and orders, because when the EA is restarted they are all reset and the information is totally lost.
I think that you can just use different Group number fot the trade itself, this will separate it from the other orders/trades. Or if you use "For each Trade" to select the oldest trade, which will probably be this one... well, only if this trade is 1, only if you don't have another similar groups of trades and orders.