Regular visitors will have noticed ever increasing amounts of spam on the Trading Gurus Community Forum. On November 24th 2012 we implemented some changes:

1. New users will be moderated 2. Registered users who have a post count of zero will not be able to view attachments or download code. 3. Registered users who have a post count of zero will not be able to create a new thread

As an additional countermeasure we anticipate introducing a modest paywall in the near future.

If this is your first visit here our apologies for the inconvenience.

Existing users may wish to contribute their ideas to this thread.

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Experimental brain surgery for Ray?

  1. #1
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139

    Experimental brain surgery for Ray?

    Hi Jim,

    I'm considering donning a surgical gown and giving Ray a little brain surgery, perhaps adding one or two artificial neurons. I've had a glance at his brain's anatomy, but before I make irreversible modifications, I wanted to ask how you'd like me to deal with his copyright notice? I was thinking of adding an additional copyright to cover my surgical alterations.

    Of course you may prefer that I stay well away from such a delicate part of Ray's being!

    Do you have any thoughts?

    Thanks,

    Dr T

  2. #2
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Hi Dr. T,

    Ray's brain isn't actually very delicate. In fact it's virtually non existent! If you feel some portion of Ray's existing code would be useful following a brain transplant then your proposal is eminently acceptable. Maybe a new name should be coined for the resulting contraption?

    Cheers,

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

  3. #3
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Ok, so after many hours of medical procedures, something akin to Frankenstein's monster has been created. I've cloned Ray and given him some 'enhancements'. The resulting creation is, for now, called RAI (Ray's Artificial Intelligence), reflecting that most of Ray's original MQL4 code has been retained with a few additional lines that enable him to 'think' about which direction to trade.

    As a result of the operation, RAI currently defaults to trading only a single currency (GBPUSD). It is possible that he can trade more - but it hasn't been tested. Actually, none of this code has been tested, apart from a run on the MT4 backtester to check that it runs - which it does - and loses any money given to him. He is shared here for community testing. He is definitely NOT ready for a live account. Basic things like the inputs and outputs from the neural network haven't been tested, so he may be trading based upon whatever he finds PC memory.

    For RAI to function, he calls an external DLL. I've attached the C source for this and a compiled DLL. Once again, the code is not 'release quality', I've used it a few times on different projects, but have put no effort into error checking and it has only been minimally tested - it appears to work ok. Furthermore, this code is not pretty. It is very quick and dirty. Feel free to tidy this up, bug fix, spot glaring errors etc.

    So, if anyone is brave enough to unleash RAI on the MT4 backtester or a demo account, then I'd be interested to hear how you get on. I'll be running him on the MT4 optimizer over Christmas and as I have time I'll tinker with the code.

    Cheers,

    Dr_T
    Attached Files Attached Files

  4. #4
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Here's an example MT4 back test report for RAI. If only he could avoid the 'death by Martingale' style drawdowns...
    Attached Files Attached Files

  5. #5
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Hi Dr. T,

    Thanks very much for uploading your neural network code. I'm currently travelling around Europe, and won't be back in England until the second week of the New Year. Forgive me if I don't post much in the way of a sensible response before then!

    Until I downloaded your .ZIP I hadn't appreciated that you were using a NN DLL you've written yourself, rather than an existing open source library such as FANN.

    More from me when I've had a chance to test RAI in anger!

    Cheers,

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

  6. #6
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    I've played with FANN in the past and it seems to work well. I'm not proposing my code as a replacement - it's just the homebrew that I've worked with for a while, mainly because I wanted to explore the scaled conjugate gradient training method...

    If you take a peek at the source you'll see that it's a pretty straight forward implementation of the referenced paper. In this respect, it hasn't been optimised for speed or efficiency.

    Enjoy travelling around Europe!

    Dr T

  7. #7
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139
    Just thought that I'd post an update. I gave RAI an Alpari UK demo account to see what happened. It turns out that RAI can be pretty careless when it comes to pretend money, as if he doesn't value it!

    Anyway, he blew £250 in a few days. See the MT4 report attached. It is pretty similar to the back test report, so no surprises. I've also attached the settings file used in this run. I wonder if RAI would do any better with a more intelligent exit strategy? Maybe I'll give one to RAI for Christmas!

    Cheers,

    Dr_T
    Attached Files Attached Files

  8. #8
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139

    Neural advantage...

    Ok, so I've found a few [important] bugs in my original code. So, I re-wrote the system and removed the Martingale code (sorry Ray).

    Attached is the MT4 backtest. Apparently, had I have used this system between 2000 and the end of 2006, there would have been consistent profits. Unfortunately, since then it seems that the neural advanatage vanishes! Almost as if somebody flicked a switch. All of this depends on whether you believe the MT4 backtester using Alpari UK M1 history data.

    The zip only contains the backtest graph because the html report is 119 MB due to the enormous number of trades made by this system (I tested it between 2000-2011). It runs pretty much as a scalper, so makes a lot of trades per day.

    Anyway, I've attached the code and backtest graph for your entertainment.

    Dr T
    Attached Files Attached Files

  9. #9
    Administrator Jim's Avatar
    Join Date
    Apr 2010
    Location
    South West England
    Posts
    494
    Hi Dr T,

    I tried experimenting with RAI, but fell at the first hurdle

    MT4 tells me "cannot load library 'ANNLib.dll' (error 126)", and depends.exe suggests this error is due to the absence of MSVCR100D.DLL on my system. Is it possible for you to provide the "release" version of your DLL rather than what I assume from the foregoing is the debug version?

    Thanks,

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

  10. #10
    Senior Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    139

    Release version of ANNLib.dll

    Hi Jim,

    Please find attached a freshly compiled release version of the dll.

    Thanks,

    Dr T
    Attached Files Attached Files

Page 1 of 4 123 ... LastLast

Tags for this 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
  •