MQL4 - automated forex trading   /  

Forum

Getting trading information in my program

Back to topics list To post a new topic, please log in or register

avatar
66
Ilya81 2007.04.25 20:41 
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.
article

Genetic Algorithms: Mathematics

Genetic (evolutionary) algorithms are used for optimization purposes. An example of such purpose can be neuronet learning, i.e., selection of such weight values that allow reaching the minimum error. At this, the genetic algorithm is based on the random search method.


avatar
9
fari 2007.04.26 02:20 
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

avatar
66
Ilya81 2007.04.27 14:39 
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.

avatar
62
ThomasB 2007.04.28 01:37 
I believe none of what you want is possible.

avatar
4
tradelover 2007.04.28 07:15 
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

avatar
66
Ilya81 2007.04.28 16:07 
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.

avatar
28
daraknor 2007.05.02 05:08 
tradelover wrote:
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.
Back to topics list  

To add comments, please log in or register