I suggest you to use the event handler OnTradeTransaction().
Study the example there carefully!
Documentation on MQL5: Event Handling / OnTradeTransaction
- www.mql5.com
[in] MqlTradeResult type variable containing an execution result of a trade request that led to a transaction. It contains the values for TRADE_TRANSACTION_REQUEST type transaction only. When handling transactions of TRADE_TRANSACTION_REQUEST type, it is necessary to analyze the second and third parameters of the OnTradeTransaction() function –...
Carl Schreiber:
I suggest you to use the event handler OnTradeTransaction().
Study the example there carefully!
Thanks for reply.
I think I could use two dimension array:
string pair[][2] pair[0][0] = "EURUSD" // for symbols pair[0][1] = 4 // for amount of positions
The problem is, that I need to mix string and int in array or put and get values in some way.
Any ideas?
Qkey:
I foud solution. I will use second int array :)
Thanks for reply.
I think I could use two dimension array:
The problem is, that I need to mix string and int in array or put and get values in some way.
Any ideas?
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
Hi, I write hedge EA using multicurrency.
I need to SendOrder new positions in both directions if some position for some currency was closed.
For one currency I used:
For multicurrency I have a lot of orders for different symbols so checking OrderTotal() dosn't work.
In my new EA I have an array of watched symbols and I would like to hedge for this currencies:
How can I easily check if for some symbol position was closed?
Thanks in advance!