Getting trading information in my program

 
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.
 
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
 
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.
 
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
 
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.
 
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

I'm working on this right now, with DLLs containing embedded python. EA for sending out tick data, script for receiving orders.
Reason: