+ Reply to Thread
Results 1 to 9 of 9

Thread: JForex Random Entry Systems

  1. #1
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    360

    JForex Random Entry Systems

    Dukascopy are now a Swiss bank, and to help them celebrate we've ported our trusty random entry robot from MQL4 to Java, for use with their JForex platform. Here's the source code:
    Attached Files
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  2. #2
    Junior Member
    Join Date
    Nov 2010
    Posts
    1
    Brilliant, thanks Jim! I've been looking for some examples to help me get started with Dukas. Java is ok, it's just the Dukas classes.

  3. #3
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    360
    Hello Sparkz,

    Welcome to the Trading Gurus community. You're doubly welcome since it sounds like you're a part time Java programmer at the very least!

    Why not tell us all a bit more about yourself over in the Introductions section. You're not too shy are you?

    That code above is about a basic as you can get. If you need any help adding a few more bells and whistles feel free to ask in here.

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  4. #4
    Junior Member
    Join Date
    Nov 2010
    Posts
    1
    Great Thanks to Jim.

    I am a experienced programmer on Mt4,but I am a newbie for Jforex. your ea is a great sample for me . I have tried to add you to my skype list. Thank you again.

  5. #5
    Junior Member
    Join Date
    Mar 2011
    Posts
    3

    JFOrex for other platforms

    I aleady asked this on the contact page so forgive me if you are the one reading this twice:

    I would like to implement my strategy in JForex and execute on MT4 - PROPERLY - so no trade copying - This means rerouting a feed from MT4 (can do easily) and feeding into JForex somewhere upwind so the ticks maintain indicators according. I can route trading instructions back to MT4 fairly easily but injecting ticks INTO JForex not so easy. Am software engineer and can deal with a bit of bytecode engineering (BCEL etc) but would welcom feedback on WHERE. I also have heavily encoded ticks from other source and am interested in using using JForex to backtest using my ticks - a sugegstion for an 'injection' point would be welcome

    I know JForex used TA-Lib, so could choose to use as well and just not bother with JFOrex but i wanted to use what i could of JForex whilst allowing me to execute the code on multiple broker platforms, including MT4, Dukascopy, Currenex, Interactive Brokers etc

  6. #6
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    360
    Hi Ian,

    Here at the Trading Gurus that sort of thing is our daily bread, and we manage quite nicely without any need for complicated stuff like bytecode engineering. Why are you so keen on feeding MT4 ticks into JForex? So that you can use their indis it seems?

    If you have a good look round both here and our blog you'll soon discover that we're not very keen on standard indicators at the best of times. If you insist on using some why not code them outside JForex and/or MT4? That sounds a lot easier to me than arcane stuff like bytecode engineering, and you can fix any bugs much more easily also.

    Have you checked out Birt's stuff on how to use the MT4 strategy tester with Dukascopy ticks?

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

  7. #7
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    Been using tick based testing for 6 months - very helpful

    Basically i hate MQL - and i have lots of experience in Java (and b4 that C++)

    And i have a full time job - so i have to take short cuts

    Basically my intentions are to build a set of components that can be easily asembled in to compound strategies. MQL just isn't suited and i do not want to be limited to MT4 brokers alone

    I also dont want to keep porting strategies to different environments

    The obvious answer is to start again from scratch which am am happy to do - but i drew the line at re-implementing indicators

    Now i know about the TA-Lib libraries and had payed with JFOrex - so injecting ticks seems like the ideal short cut.

    There are drawbacks, even if this was possible, because ultimately JForex isnt fast enough at backtesting for my likes so in all likely hood i would have to address the tick handling, bar and indicator handling, caching and strategy pipeline in any case

    Hang on - am i talking myself out of this ...

    No - tick injection is a short term goal - a new framework is a long term goal

    Its possible that quite a bit of the stuff i'll be implementing doesnt use indicators AT ALL - just tick based price action - but thats another story ..
    Last edited by ianj; 04-02-2011 at 02:28 PM.

  8. #8
    Junior Member
    Join Date
    Mar 2011
    Posts
    3
    Quote Originally Posted by Jim View Post
    Hi Ian,

    without any need for complicated stuff like bytecode engineering.
    Jim

    Bytecode engineerng isnt necessarily complicated - its not hacking the classes - its injecting code and method calls direct into the existing code - its used in every day aspect oriented programming, proxying etc - so its not a black art

    Admittedly it would mean circumventing some of the existing JForex connector implementation, which has already been obfuscated, so its not entirely transparent

    Thats why i asked ..
    Whether injecting ticks will save time depends on how much effort it takes
    Last edited by ianj; 04-02-2011 at 02:41 PM.

  9. #9
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    360
    Hi Ian,

    Quote Originally Posted by ianj View Post
    Bytecode engineerng isnt necessarily complicated
    KISS is my motto, whether trading or programming. "BCEL is already being used successfully in several projects such as compilers, optimizers, obsfuscators, bytecode verifiers and analysis tools". Sounds complicated to me I'm afraid!

    That's why i asked ..Whether injecting ticks will save time depends on how much effort it takes
    Not for me it wouldn't, because I have the few indis I use already coded outside the trading platforms in my language of choice, which in this instance is Object Pascal rather than Java. Your mileage may differ of course.

    Cheers,

    Jim
    Reality is merely an illusion, albeit a very persistent one - Albert Einstein

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts