Lets build a trading system

Discussion in 'Strategy Building' started by wdbaker, Sep 7, 2002.

  1. wdbaker


    I thought that maybe I would start with something simple and then everyone could pile on with ideas. Also need someone to code and backtest this as I do not have the software but should be easy I hope for one of the pro's.

    Here it goes...

    Preferred vehicle S&P E-mini 2min
    trade times: first 2hours and last hour of day

    Entry: when the close is greater than the 5sma and the 5sma is greater than the previous 5sma then go long.

    Possible variables to add to the system:
    1. the close must be less than x percent or stdev above the 5sma (thought: this would keep us from getting in if over extended) (ex: 3% or below)

    2. the close must be greater than x percent or stdev above the 5sma (thought: this would keep us from getting in if the 5sma is acting as resistance.) (ex: .05% or above)
    Exit: when the close is less than the 5sma or the if the close is less than the previous Low.

    Possible variables to add to the system:
    1. if the run is greater than five bars possibly the 10sma
    2. if the price exceeds 2 or 3 stdev's
    Do the exact opposite for short

    Just thought that maybe we could have a little fun with this, if it works out great, if it doesn't then we hopefully learned something in the process.

    If you decide to trade this for real post your results thats why I am setting this up on the trading thread.

    Have fun :D
  2. Let's write a program that gives you a green light every time the close is higher than the 5sma etc., call it "E-mini-S&P-WizeTrade" and sell it for $2000 per copy!
  3. :D
  4. Even though I am not a "system" trader, per se, I have a few ideas that could perhaps enhance the basic premise set forth...Instead of keying all of the trades off of the 5 min chart, why not use the 5min chart as the "execution" time frame, once a larger time frame has triggered...

    I say this for 2 reasons. First, trading purely based on the micro time frame without any scaling from a higher time frame will underperform in trending environments and have too much exposure during high volatility whipsaw environments...You need a filter, especially nowadays when there are days or even weeks at a time that would just chop to death any short term mechanical system...Second, a longer time frame adds clarity to the picture and some robustness as larger money will be moving in and out of the market when certain longer term(say 3-5-10 DAY Line Support/Resistance) is penetrated...

    So, my idea is simple(and many can disagree, remember this is just guys philosophy on the market)...Use a multi-day line support/resistance penetration...Filter this down to the 5min chart...Enter on a break above/below this 5 min bar(call it the hook bar)...Then find an acceptable stop, perhaps based on the ATR of the 5min chart...Trade in units of 3-5 contracts and set an intermediate fixed target of x points...Then trail the remainder of contracts until the ultimate price target is hit or the trailing stop is hit...

    These are just some thoughts to play with...I realize this is a pretty generic concept, but I am a big believer in scaling time frames if only to avoid the temptation of finding patterns on the short term price charts that will lead into "traps" on the larger time frames...

    for what its worth...
  5. Brandonf

    Brandonf ET Sponsor

    The biggest thing to keep in mind is to keep it simple if you want it to work. Make sure it relies on natural market tendancies.

  6. wdbaker


    Lobster already has us selling the system that we haven't built yet :D

    Vulture has some good adds, we need to get someone to code this and get some backtest stats so we can see where we are and where we need to go.

    This will make lobster happy as he already has several packages sold. I guess we have a big ET party with the money?? :D

    Definitely need to keep this as simple as possible.

    Anyone want to volunteer to start the code on this, probably should be done in easy language so that we can get the greatest amount of participation? Once it is going I wouldn't think it would be to hard to get others to contribute because they won't be starting from scratch.

  7. Beautiful guys. This is the essence of ET. I am going to try to backtes baker's ideas with Tradestation. The code should be fairly simple. Brandon, you are a TS user also. Give it a go.

    I am going to presume that the first two hours and the last hour means 9:30 - 11:30 am and 3-4 pm.
  8. William


    Yeah, I know exactly what you mean. I have to cringe every time pass by a channel showing that cheesy commercial.
  9. ges


    I don't have access to intraday data or intraday system development tools...yet. But I'm following along and if I see an opportunity to contribute, I'll jump in. I'm very interested in the topic.

    I know TS is the standard for intraday stuff, but I understand that WealthLab is also intraday capable. Anybody used WL for intraday system development? It's more in my price range.

  10. Okay this wasn't so bad coding. But so far I have only the most basic concepts in. After all, College football is on.

    So far the Baker Method consists of this: If the time is between 930 and 1130 inclusive and 3-4 inclusive, and the 2 min 5sma for the current bar is greater than the 5 sma of the previous bar, and the 2 min close is greater than the 5 sma, and we are flat, then BUY. Once long, if the close is less than the low of the previous bar, or the close is less than the 5sma, then SELL.

    Okay so far? Only the BUY is coded. Obviously the SHORT will be similar. Any objections? Very basic framework. Am I missing the jist?

    Before I forget...I was thinking that to define a true uptrending 5sma we should require the current 5sma value to be greater than the previous one, and the previous one be greater than the one before that. That way, you have two points moving higher, rather than one, which is what you get in a chop. But I did not run it that way yet.

    I did however run it BUYing on the close of the bar that triggers the signal, and on the OPEN of the next bar after the signal.

    And one more thing, I did not put in any commish or slippage. That is very important to remember. Okay...here it is so far...

    Buying on the next bar at the OPEN for the last 50 days:

    Total Net Profit: $3, 937.50
    Gross Profit: $23,962.50
    Gross Loss ($20,025.00)

    Total # of Trades: 497 Winners: 198 Losers: 299
    %Profitable: 39.84%

    Largest Winner: $850 Largest loser: ($262.50)
    Avg Winner $121.02 Avg loser: (66.97)

    Max Intraday Drawdown: ($1,687.50)

    I think you have to be happy so far. Fifty days goes back to June 25. Look at the daily chart to see what it has done. And this only includes the buy side. Lets see what happens when we add in the short side. And we haven't added in entry parameters that are intended to keep us from getting in on an extended bar.

    Look at the number of trades. Tradestation reports traes as R/T's. So you must add round trip commish x 497. Also, even 1 tick of slippage per trade gives you a big loss.

    For the BUY at the close of the trigger bar:

    Total Net: 3437.50

    # trades were the same as were winners and loser.

    No other significant differences.

    Okay...lets keep working.

    I'm grabbing a beer and watching some football for a few.

    #10     Sep 8, 2002