Improving The Simple Gap Strategy Part 3

About the Author Jeff Swanson

Jeff is the founder of System Trader Success - a website and mission to empowering the retail trader with the proper knowledge and tools to become a profitable trader the world of quantitative/automated trading.

follow me on:
  • Maverick says:

    Dear Jeff,
    Do you think the reason why the result is as it is is because the market inherently has upside bias?

    • Maverick, that could be the reason. It’s hard to say for sure, but there is no doubt there is a longer term bias to the upside. For shorter time frames, like what the gap strategy uses, I’m not so sure this bias comes into play.

  • Paul Mayer says:

    Jeff, I am using Multicharts (compatible with Tradestation Easylanguage), and when I copied and pasted the text version of the code into the “Powerlanguage editor” and attempted to save the code, it generated an error, saying that _C_E Expectancy was an unknown function. The error it generated was this:
    —— Compiled with error(s): ——
    Unknown Function
    line 47, column 9

    And line 47 was this:

    Value1 = _CE_Expectancy( “Gap Fade #1”, value2, value3, true );

    I have been really interested in gap fading for years and would love to have this code working to experiment with it. Can you by chance send me or post the CE Expectancy Function? Or build it into the Strategy code?

    • Paul, you can simply delete that line and it should compile fine.

      • Paul Mayer says:

        It did compile, but won’t run — I turn it on, and then Multicharts automatically turns it off. That will normally happen if the Max Bars Back is insufficient, but that’s not the case here, as it should only need 101 bars for the trendfilter and I set the MaxBarsBack to 501 just to be safe. I am assuming the ES futures should be set to US stock regular trading session. Anything else you can think of that would prevent Multicharts from running this strategy?

        • Paul, sorry I won’t be of much help as I don’t use Multicharts. The workspace I use does use a custom session which is 830 – 1515 central time. The compatibility of some of the functions may be an issue. I would see if you could get any of the older versions of the gap strategy to run from other articles in this series. This might help isolate the problem. Maybe someone else reading this who is familiar with Multicharts can help?

  • Marco says:

    Great article Jeff, I think the main problem in adding more filters is that we cut the trade frequency. I think also the gaps following up days can be considered adding other filters. Collecting everything together would result in a strongly reliable fading strategy.
    https://nightlypatterns.wordpress.com

    • Thanks Marco. I was wondering on the up-days going with the breakout, instead of fading, might improve performance. Something else to test.

  • Scott says:

    You should really look over at MasterTheGap.com and how they trade gaps. I used to follow their site a few years ago so they may have changed things now, but here are some of the things I liked when trading gaps

    – stop = 30% of 5-day ATR
    – you have to look at which “zone” the market opens in relative to yesterday’s close and whether or not it was an up or down day – http://www.masterthegap.com/public/Gap_Zone_Map.cfm
    – market conditions are considered, like position of moving averages relative to each other
    – seasonality also matters, day of week, month of year, day of month, others
    – price patterns, like 3 down days, or price is down after just making a 10-day high, things like that

    • Thanks Scott for the link and for the ideas! I did look at that site many years ago and remember vividly the gap zones. It’s something I’ve not looked at in a long time. This makes me a think an entire series of gap articles, which go beyond the current gap strategy, may be a great addition. I’ve really not looked at gap trading in many years.

  • Ryan says:

    Jeff, take a look at my (free) site under the special reports section for more gap testing ideas.

    https://daxgaptrading.wordpress.com/special-reports/

    Ryan

  • Rich S. says:

    Jeff, Extended the Data to 6/30/2015 so as to get a look at OOS data. Not encouraging, appears to be rolling over. Typical of most algo systems, unfortunately, frustrating.

    • Rich, I won’t look at the OOS until I test some more concepts on the in-sample data. I don’t want to contaminate my in-sample data more than necessary.

  • >