SigmaR: Developing a Hurst Cycles EA for Metatrader

The Sum of All Robots!

I have been busy since the Xmas break working on a intraday robot, provisionally entitled ‘SigmaR’. I thought I would post some thoughts on the development of such a program.

I have a robot already running on a live account in ProRealTime which performs fairly well but the shortcomings of the PRT language are quite stark when dealing with fast intraday trading. Those that have visited my trading room last year know that I prefer to trade on the 1 minute chart using David Hickson’s original nominal model. The problem with PRT comes with the fact the calculations for entering or modifying trades are performed after the bar close. Clearly that is not too good when broker spreads are factored into risk/reward calculations and the T2 calculations must be accurate.

Fortunately after studying MQL4 I was happy to see that Metatrader’s offering is far more substantial with calculation performed after each tick. Perfect for what I need. The MQL4 language is C++ based and although I have not programmed in C++ before I have managed to pick it up pretty well. Anyone who has programmed in PHP or Java as I have will have little issue adjusting.

Anyway, the main goal of the EA is, of course, to replicate the strategy of trading the FLD crosses that I would perform manually. There are many nuances such as underlying trend, pause zones and VTL/FLD angles that I can build in later. For now, here is a screen shot of the progress and some points below.


Some points to consider at this early stage:

  • Entry is via pending stop orders, they are faster than tracking a median price or ask/bid cross of the FLD.
  • The stop orders are adjusted to the FLD level after every bar
  • Minimum targets can be specified to avoid choppy sessions and dubious crosses
  • The highest and lowest bars are calculated by looking back half the specified FLD wavelength.
  • Any length of FLD can be used. In the above example I am using the 15 minute FLD as the signal cycle
  • Further signal cycles can be used by dropping the EA on the same chart and choosing a new wavelength (ie 60 minutes).

Further developments include considering the rate of change of an FLD to assess entry criteria, smoothing techniques for the FLD, trailing stops (essential), scaling out of trades at predefined levels, inbuilt money management, VTLs and underlying trend calculation.


  • Bob Wo

    Hi, very interesting work!

    Are you live trading with MT4?

    Do you only trade the 1 min chart?


    • Hi Bob, thanks for your interest.

      Intraday I trade on the 1 minute chart as I can easily see the main 4 intraday cycles necessary to make good decisions, in my opinion. Those being the 15 minute, hourly, 160 minute and 5 hour cycles.

      I do take longer term trades based on EOD data, most of which I post on twitter using Sentient Trader.

      The point of this bot is to remove the human from the equation as I have found results are better.



  • Bob Wo

    Hi David,

    How is your bot testing performing?

    Have you found an optimum time chart to trade?


    • Hi Bob,

      Bot is looking good, concentrating on the DAX at the moment, 1 minute as I would do manually intraday. Have built in volume profiling, minimum targets and FLD smoothing to mitigate against poor entries. I’m pretty pleased with it so far.


  • Bob Wo

    Sounds really good!

    Will you be making your bot available once you have finished your testing (I don’t mind being a beta tester!)?


    • Possibly mate, not sure. I would imagine end of February it will be ready to go across all instruments on a 1 minute timeframe. For now it is in live testing with new aspects being added daily to push a few more % of profit from it.


  • Bob Wo

    Saw your “live test” tweet this morning – awesome!

    Will you be posting stats on wins/loses, profits etc?


    • Hi Bob,

      Yes I will do, backtesting is encouraging.


  • tom

    Fascinating stuff. Looking forward to seeing how it progresses.

Leave a Reply to Bob Wo Cancel reply

Your email address will not be published.