Exporting Data From MetaTrader

I received an email today from a reader wanting to know if there was an expert advisor available that would export data to a csv file. although I have not myself seen an EA that does this it is a trivial matter to code such an EA shown below:

int handlFile;
handlFile = FileOpen(”symbol.csv”, FILE_CSV | FILE_WRITE | FILE_READ, ‘,’);
FileSeek(handlFile, 0, SEEK_END);
FileWrite(handlFile, Bid, Ask, Close[1], Volume[1]);
FileClose(handlFile);

Note: This code above is intended as a very rough solution. Time permitting I will write a proper EA with error checking and better features. This code however should be sufficient for basic tasks. For more information on EA coding I strongly recommend you download the getting started book:

MQL Tutorial

The Non EA Export Option

Can’t be bothered with that coding garbage? Never fear there is a very simple option. Go to the Tools Menu then History Centre a dialog box similar to the one shown below will appear simply chose the currency you wish to export and select a file name and your done. This process is shown below:

ExportMetaTraderDataCSV

MetaTrader really is an excellent platform for learning the basics of trading and trading systems. I would recommend to anyone starting out in currency trading that they download MetaTrader and start exploring. If you want to learn more about Forex Trading I suggest you visit the Forex section of this website.

Popularity: 11% [?]

Tagged with:
 

Pseudo Code for Automated Trading Systems

code When it comes to writing computer programs or in this case automated trading systems translating English into programming code can be fraught with danger. Pseudo Code on the other hand refers to a more structured English for describing a process or program. It is important that you learn to write quality pseudo code as it will make a big difference when you come to coding your system your self or hiring a programmer.

There are many benefits in writing your algorithms or trading logic in pseudo code these include:

  • You will gain a detailed understanding of the program or algorithm you are developing.
  • Errors in logic picked up early.
  • Not constrained by a single programming language.

Below is a brief example of pseudo code:

(more…)

Popularity: 22% [?]

Tagged with: