Tell me please how can I get the trading information that MetaTrader loads in my
program. Now I write a program to make graphs with custom possibilities. Now
I use loading data from text files generated by MetaTrader script but it's better
to make the program to get the trading information itself.
- Uninstalling the Platform - For Advanced Users - Getting Started
- MetaEditor - Professional editor of trading applications
- MQL5 Wizard: Development of trading robots for MetaTrader 5
hi,
you could go through the historical trades then you can get every infomation you need.
Have a look in the documentation for :OrdersHistoryTotal()
eg:
for int i=0;i<OrdersHistoryTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
Print("Close price for the order ",OrderClosePrice());
}
// not testet
br
fari
you could go through the historical trades then you can get every infomation you need.
Have a look in the documentation for :OrdersHistoryTotal()
eg:
for int i=0;i<OrdersHistoryTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
Print("Close price for the order ",OrderClosePrice());
}
// not testet
br
fari
The question was how to make it able in my program, not in a MetaTrader script.
What server I need to connect and how to receive data.
But now I've one more question - how to get types of indicators with their parameters are showed in the current window. To put their data then to a file.
But now I've one more question - how to get types of indicators with their parameters are showed in the current window. To put their data then to a file.
I believe none of what you want is possible.
yes, it is possible.
you have to enable DDE server in tools/options/enable dde server, then read help about direct data exchange. As a starting point see userguide/export of quotes.
Idea is that you can share a memory between your program and MT4, use mql4 script/expert to feed data and your program to read data
you have to enable DDE server in tools/options/enable dde server, then read help about direct data exchange. As a starting point see userguide/export of quotes.
Idea is that you can share a memory between your program and MT4, use mql4 script/expert to feed data and your program to read data
DDE seems to me to be not better than using files if an MQL4 script is still required.
Let it be so if directed data receiving from my program isn't possible.
But the second question - is it possible to get list of indicators are shown at the current window.
But the second question - is it possible to get list of indicators are shown at the current window.
tradelover:
yes, it is possible.
you have to enable DDE server in tools/options/enable dde server, then read help about direct data exchange. As a starting point see userguide/export of quotes.
Idea is that you can share a memory between your program and MT4, use mql4 script/expert to feed data and your program to read data
yes, it is possible.
you have to enable DDE server in tools/options/enable dde server, then read help about direct data exchange. As a starting point see userguide/export of quotes.
Idea is that you can share a memory between your program and MT4, use mql4 script/expert to feed data and your program to read data
I'm working on this right now, with DLLs containing embedded python. EA for sending out tick data, script for receiving orders.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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