An object oriented language for Empty4

Post Reply
roger-write
Trader
Posts: 63
Joined: Sat May 19, 2012 10:34 am

Re: An object oriented language for Empty4

Post by roger-write »

I'm still making progress, albeit very slowly. I try to work on this project several times a week and usually most of the day on Saturday. In terms of the actual compiler, etc., I've got one more major piece to work out, which is automated persistence. But there are a ton of little details, not to mention documentation, examples, etc.

While I don't have an exact time yet as to when version 0.98a will be done, the previous version was working (posted here) and that does give you OO. It worked, but it was a little clunkier than what 0.98a will be.

It's surprising how much slower things go when you have a day job, eh? :lol:
raidsan
Posts: 5
Joined: Fri Apr 19, 2013 6:35 pm

Re: An object oriented language for Empty4

Post by raidsan »

one issue: I use chinese character,
If I use ANSI coding for source mq4/oq file, then the chinese characters will become garbled in out mq4 files (it auto change to UTF-8 coding).
and I try to use UTF-8 for source mq4/oq file, then I will got correct UTF-8 coding output files, but after compile to ex4, when it runs, then chinese characters will still became garbled, it seems that metalang.exe can't support UTF-8 coding.
Is it possible to let oq.exe do a coding convert (UTF-8=>ANSI) for the output mq4 files?
raidsan
Posts: 5
Joined: Fri Apr 19, 2013 6:35 pm

Re: An object oriented language for Empty4

Post by raidsan »

raidsan wrote:one issue: I use chinese character,
If I use ANSI coding for source mq4/oq file, then the chinese characters will become garbled in out mq4 files (it auto change to UTF-8 coding).
and I try to use UTF-8 for source mq4/oq file, then I will got correct UTF-8 coding output files, but after compile to ex4, when it runs, then chinese characters will still became garbled, it seems that metalang.exe can't support UTF-8 coding.
Is it possible to let oq.exe do a coding convert (UTF-8=>ANSI) for the output mq4 files?
well, I find GNU tool can do the convert , I need call iconv to convert the coding for the output mq4 files,
e.g. C:\MinGW\bin\iconv.exe -f UTF-8 -t GBK TrendMonitor.UTF8.mq4 > TrendMonitor.mq4
could you please add more param in bld file to support this, such as:
SourceCoding = UTF-8
TargetCoding = GBK
iConvPath = C:\MinGW\bin\iconv.exe
roger-write
Trader
Posts: 63
Joined: Sat May 19, 2012 10:34 am

Re: An object oriented language for Empty4

Post by roger-write »

raidsan wrote:well, I find GNU tool can do the convert , I need call iconv to convert the coding for the output mq4 files,
e.g. C:\MinGW\bin\iconv.exe -f UTF-8 -t GBK TrendMonitor.UTF8.mq4 > TrendMonitor.mq4
could you please add more param in bld file to support this, such as:
SourceCoding = UTF-8
TargetCoding = GBK
iConvPath = C:\MinGW\bin\iconv.exe
I like the idea of dealing with this by referencing an external tool. I'll add that to the list of considerations.

Right now my biggest problem is I'm a bit stuck on automated persistence issues. When I get that worked out (or back it off to less automated persistence) ill be able to move forward again.
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: An object oriented language for Empty4

Post by snailbeard »

I was looking for something else and came across this interesting source code:

A java bridge from JForex to MQL, and it is open source!

https://code.google.com/p/jftoolbox/

Hopefully this means one could write beautiful elegant code and just poke Empty4 from a safe distance.

Everyday spent working with Empty4 is a punishment!

I already have NetBeans installed - every night I look up at the stars and say, just a couple more days...
:lol:

Anyway, I am sure we will escape Empty4 one day...
ovo.cz

Re: An object oriented language for Empty4

Post by ovo.cz »

snailbeard wrote:I was looking for something else and came across this interesting source code:

A java bridge from JForex to MQL, and it is open source!

https://code.google.com/p/jftoolbox/

Hopefully this means one could write beautiful elegant code and just poke Empty4 from a safe distance.

Everyday spent working with Empty4 is a punishment!

I already have NetBeans installed - every night I look up at the stars and say, just a couple more days...
:lol:

Anyway, I am sure we will escape Empty4 one day...

I am not sure if you looked into the source. It seems that it only converts a single mq4 file into a java source, extending a class that simulates MQL commands. The class name is MQLBridge, which I consider rather misleading.
roger-write
Trader
Posts: 63
Joined: Sat May 19, 2012 10:34 am

Re: An object oriented language for Empty4

Post by roger-write »

I've come across a couple of interesting projects/resources at NQuotes.net and tradeplatform.codeplex.com. Both allow a bridge between mql and C# .NET. So you can write experts and indies in C# with all the muscle of the .NET framework. I haven't looked into them yet, but may. Seems like I have less and less time to finish up OQ.
raidsan
Posts: 5
Joined: Fri Apr 19, 2013 6:35 pm

Re: An object oriented language for Empty4

Post by raidsan »

roger-write wrote:I've come across a couple of interesting projects/resources at NQuotes.net and tradeplatform.codeplex.com. Both allow a bridge between mql and C# .NET. So you can write experts and indies in C# with all the muscle of the .NET framework. I haven't looked into them yet, but may. Seems like I have less and less time to finish up OQ.
NQuotes is not open source;

tradeplatform.NET: each call to MT function will need communicate to Empty4; and not support array type,
it run very slowly for complicated / heavy , or history Empty4 bar data process, include backtesting.
it is suited to do order control, download forex calenda, etc.

your effort on OO Empty4 internal is still useful for writing single symbol strategy.
raidsan
Posts: 5
Joined: Fri Apr 19, 2013 6:35 pm

Re: An object oriented language for Empty4

Post by raidsan »

It seems oq don't support subclass constructor "New" auto call base class constructors?
User avatar
snailbeard
Trader
Posts: 615
Joined: Mon Dec 24, 2012 10:54 am
Location: Just above water somewhere between Oxford & Cambridge

Re: An object oriented language for Empty4

Post by snailbeard »

raidsan » Thu Jun 20, 2013 4:12 pm wrote:
roger-write wrote:I've come across a couple of interesting projects/resources at NQuotes.net and tradeplatform.codeplex.com. Both allow a bridge between mql and C# .NET. So you can write experts and indies in C# with all the muscle of the .NET framework. I haven't looked into them yet, but may. Seems like I have less and less time to finish up OQ.
NQuotes is not open source;

tradeplatform.NET: each call to MT function will need communicate to Empty4; and not support array type,
it run very slowly for complicated / heavy , or history Empty4 bar data process, include backtesting.
it is suited to do order control, download forex calenda, etc.

your effort on OO Empty4 internal is still useful for writing single symbol strategy.
tradeplatform.NET:
It has been a while since this was discussed but there is a version 3.6 (Sept 2013). I have downloaded the source and will try to .Net-ify the only MS Windows PC I have. Its a few years old but it should be up to the job. That might be more straight forward than trying to get .Net working under Windows Emulation on Linux, which is where I currently run multiple copies of Empty4.

If I can get it working it could be two birds for one if some indicators & EAs in C# also works with ProTrader 3...
Post Reply

Return to “Coders Hangout”