This project is read-only.

need array...

Jun 20, 2013 at 12:34 PM
Edited Jun 20, 2013 at 7:37 PM
without array, history bars data can't be process property,
it would be restricted to do only ligtht data process work, such as order process, download calendar, etc.
Jul 8, 2013 at 10:10 PM
Edited Jul 8, 2013 at 10:16 PM
Hi raidsan,

How much historical data do you require before any given trade?

To get round the lack of array passing, I do the following:
  1. During intialization of the strategy, I pull as much historical data as I require to make the first trade. This means intialization is slow because I have to run a loop which call MT4 multiple times. I then rebuild the data in some form on the C# side.
  2. Thereafter, during each relevant tick I add the data to my local copy of the historical data as it's produced by MT4. This way I have the data in whatever C# or datastore that I like.
Of course, it's still too slow to be useful if you require a trading system that operates on short time spans. But if your strategy only requires to run when new time bar occurs (e.g. once every minute) it seems to work fairly well for me (in testing).
Jul 19, 2013 at 7:47 PM
Edited Jul 19, 2013 at 7:48 PM
Is it possible to use some thing like boost/interprocess, create shared memory on mt4 side for rates data, and to access the data through container such as vector or map on C# side?