After an absence of several months I have a new project for the trader/coders on futures.io (formerly BMT). It is coded using NT7.
ZNano1 Automated Strategy Specifications
This strategy is based on previous versions of Hurley and Aardvark and builds on code kindly provided by Big Mike originally and several other generous coders on futures.io (formerly BMT). I have been busy these past several months trying to improve on past Strategies and ZNano1 is actually one of the family of version82 of Strategies I have been actively developing.
Hopefully the futures.io (formerly BMT) community can assist in making this a better Strategy.
Points of note are:
My favourite bar type for this Strategy at present is Rjay’s RenkoHybrid – this is proprietary to him and is available for purchase or trial on his website – Home ( - I have no affiliation to Rjay or his web site in any way. I prefer a RH12 chart. Renkomedian (also coded by Rjay as I understand it) is similar or identical to RH bars and some of you may have that, but I think RH is better because it does appear to generate fewer overfill errors than Renkomendian using this Strategy.
Default uses 5 targets each trading 1 contract – can easily be reduced to a minimum of 2 Targets of 1 contract each but I do not recommend less than 2 Targets. If you do reduce the number of Targets traded I suggest that you trial the values used for r1size through r5size (ie up to the number of targets you trade).
You may notice that Target 2 defaults to a value of 2000 ticks – this is to make all targets after Target 1 very large – this allows the Exit rules to determine the exit of Target 2 through Target 5. (Note that I have detected overfill errors with the existing code in the Exit rules).
Cumprofittarget and cumlosstarget are the same as in previous Hurley/Aardvark strategies. But note that the values entered as user defined variables apply PER CONTRACT TRADED – ie if the total number of contracts for T1 through T5 equals 5, then the value for these variables is multiplied by 5. I have these defaulting to big numbers – 50,000 and 5,000 ticks respectively, as this allows me to see the big picture of continuous auto-trading, avoiding complexities of hitting the Cumprofittarget or Cumlosstarget. In the real world you should (must) set daily profit and loss targets – so set these to respectable limits as you see fit.
Entries default with a 5 tick limit entry (value = -5 ticks [minus 5 less than the Close of the trigger bar for longs and therefore plus 5 above the Close for shorts]) in an attempt to get a competitive entry. Note that in fast moving markets you may miss some entries for at least a bar or two and this can cause losing trades.
The strategy uses reversal of the TrendQuality indicator for exits after the first target is filled, which allows for scaling out the runners for Target2 through Target5. The exits are governed by the user-definable variables r1size1 through r5size, which default to 2 through 6. Each time a TrendQuality indicator reversal occurs a counter in the code increases by 1, thus each time the counter equals r1size through r5size, an exit of Target 2 through Target5 will be forced.
Entries use a matrix of the slope of 4 of 5 indicators being positive for longs and negative for shorts. I apologize to the programmer than provided the code (lines 565 through 569) as I have lost my record of who generously provided it to me.
Note that as elsewhere in the code I have left redundant code in place as examples of my thinking for improvements - examples in the entry trigger code are lines 580-1 and lines 594-5.
When Target1 is filled 9defaults at 20 ticks), the stoploss moves to +5 ticks above entry for longs and -5 ticks below entry for shorts. This protects the trade.
As noted above, there is a known bug located in the Exit rules section starting in line 355 where TrendQuality reversals trigger exits. I have been frustrated by my inadequate programming skills to correct this …