Communicate with PostgreSQL DB from MQL4 script running inside MetaTrader 4 trading terminal. Why you might want to try this? There are at least 2 things you could achieve:

  • store all quotes coming from your broker to DB in order to have some proof in case of a dispute or to invent/test your own trading system that needs high frequency data;
  • let’s say you already have a good trading system and you need an interface between your trading system and MT4, now you have it – PostgreSQL database, from one side trading system will write signals to DB and from the other side an expert will be running in MT4 using postgremql4.dll for DB access.


AI and artificial neural networks were and still are interesting topics for me, so I decided to learn by doing and wrote my own neural network library (simple feed-forward perceptron) with a twist – library is able to use all available CPU cores to make calculations very fast.
All tests were successfully passed, doxygen documentation generated but then I lost interest in the project and it never came out of the experimental stage. I still think it is possible to develop the ideas of this project further, improve and refactor the design and make it into a real competitive neural net library for simple tasks but where calculation speed is everything.
However for now, if you are really in the need of a decent ANN, please search for FANN and OpenNN projects on SourceForge.