Many times I've wanted to answer questions in the public forex factory forums e.g. Platform Tech. I find it very frustrating that I can't. As a commercial member, I can't post to threads outside the commercial section of forex factory. Anyway, this thread is my attempt to provide some technical help.
Although this thread will mostly be used by experienced programmers, I will try to write my posts in such a way that newbie c++ programmers can cope. You experienced guys may need to skip a few posts to get to the detail you want
IMPORTANT: This thread is for using the eclipse IDE. Please don't ask for or post examples using other IDE's.
There are two important features of my own code. It must:
- be trading platform agnostic
- compile on multiple operating systems
Trading platform agnostic
Must be suitable for multiple trading platforms e.g. metatrader, jforex, ninja i.e. called from MQL, Java and C#.
Compile on multiple operating systems
The code must not only run on windows. It must run natively on other operating systems e.g. linux. This rules out the use of visual studio as the ide and any calls to the win32 api etc
After much consideration, I decided that c++ will be the language for the generic 'core' code. That choice was mainly dictated by the need to call the generic code from other languages e.g. MQL, java, c# etc.
Why eclipse?
Pesonally, I am targeting metatrader and JForex. So most of my code will be mql, c++ and java. The open-source eclipse ide has excellent support for both c++ and java languages and it is cross-platform.
Links to software:
In my posts, I'm careful to provide links that will not become stale, preferring to direct you to the latest version generically rather than a specific version. If a generic link does become stale, let me know and I'll post a more up-to-date link here on the first post
Installation (Quick) ... works on 32 & 64 bit Windows XP/Vista/7 etc
- Install 7zip (get it here)
- Install Java Runtime (get it here)
- Extract my workspace to your c:\ contains ...
- hello-example
- hello_make-example ('make file' example)
- ExpertSample (MT4 DLL)
- boost_header-example
- boost_lib_regex-example
- quantlib-example
- ta-lib-example
- (workspace_20111231_1350.7z) Updated 31 Dec 2011
- Extract my MinGW package to your c:\ contains ...
- MinGW (from mingw-get-inst-20111118.exe)
- gcc 4.6.1
- g++ 4.6.1
- MSYS 1.0
- boost 1.48.0
- quantlib 1.1
- talib 0.4.0
- (MinGW_20111231_1350_.7z) Updated 31 Dec 2011
- MinGW (from mingw-get-inst-20111118.exe)
- Extract my eclipse package to your c:\ contains ...
- eclipse indigo SR1 CDT 8.0
- (eclipse_20111230_1930.7z)
- Add the following to the end of your path ... Inserted Code
[noparse];C:\MinGW\msys\1.0;C:\MinGW\msys\1.0\bin;c:\mingw\bin[/noparse]
- Run eclipse.exe (it's inside c:\eclipse)
- Choose c:\workspace as your workspace
Installation (Detailed)
- Installation is not really 'installing' (9)
- Installing the toolchain: MinGW (13)
- Test MinGW installation (14)
- MSYS: Minimal SYStem Configuration (32)
- Install eclipse CDT IDE (15)
- Test that eclipse is working (16)
- boost: build the engine (27)
- boost: build the libraries (28)
- boost: test the libraries (30)
- quantlib: building with msys/mingw (34)
- quantlib: test the library in eclipse (35)
- ta-lib: building with msys/mingw (37)
- ta-lib: test in eclipse (38)
MT4 DLL Example
- Create Project & Source Folder (21)
- Add Files to Project (22)
- Project Properties (23)
- Build the DLL (24)
- Test the DLL in MT4 (25)
Virtual Machines
- Protect your computer from your programming (2)
- A master virtual machine (10)
- VM Player: Installation (20)
- Clone your master virtual machine (11)
- Cloning vm master continued ... (12)
Programming: Language (c++)
General Notes
- DLL: what is a dll? (4)
- Compiling and linking (5)
- Toolchain: the compiler and more (MinGW) (7)
- IDE: Integrated Development Environment (Eclipse) (8)
- MSYS: Minimal SYStem (31)
- boost: C++ source libraries (26)
- QuantLib: framework for quantitative finance (33)
- ta-lib: Technical Analysis Library (36)