Tuesday, April 24, 2007

Acceptance

  • I'm just a very small trader!
  • I don't trade a Multi-Million Dollar Account
  • I trade with the back against the Grand Canyon
  • One step back and I'm out

Still I like to trade. It's a passion. I don't mind thinking about new ways to display the information needed to gain insight into the markets. I like to trade Futures, but that means taking higher risks, than my account allows for. One futures contract is worth something between 45,000 and 150,000 USD. I would feel fine having 50% of that amount in my account for trading to be on the safe side. I have not and it keeps me on my toes. It also means I have to focus my attention on the small details. Mike (see last post) suggested going down from daily to 5 minute charts for signals. I can't trade futures on a daily chart, the risks are too high. So for me, who is trading intraday only, that would mean going from 9 minute charts downto 30 second charts. Clearly in the chop zone where signals tend to get blurry. At the open of a market I now tend to trade from a 2 minute chart switching to 9 minutes later in the day.

But having survived a 5 year learning curve always trading real I have gained some insights and I've come to a point where I do trust the implementation of a new idea. I said in my last post I'm looking for ways to be 1 bar early on a signal. What signal? First let's define, what I look for when taking a trade.

I trade reversals. I can't afford buying the break of a top or selling the break of a bottom. If it's a fake it's just too expensive for my small account. But how do reversals develop in real time?

Going down: You have lower lows and lower highs for a few bars. Then you get one or more bars, where no new lows are made, the highs might still come down as sellers are not yet giving up.
What is volume doing? The farther down we go the less sellers are there, still buyers are not yet convinced it's worth going into the market. Suddenly you see Volume increasing again, the lows are holding and we get a higher high. Relying on Volume alone that's no signal, but if there is a signal on the oscillator as well, it's worth taking the trade.

Hmm, but didn't I just one article before tell you that these dumb oscillators are always one bar late, that I want to be in at the open of the signal bar not the close.

Mike triggered the thought process leading to a new way to calculate the CCI. The standard way to calculate the CCI is using (H+L+C)/3 as the typical price. Replace that with the High or Low respectively. Do the same with the Stochastic 6,3, which I use a Turbo instead of the CCI 6, as the Sto is a lot better pointing out Slings than the CCI.
Now look at this FTSE chart

The CCI in the first subwindow is based on the High, in the second subwindow based on the Lows of a bar. Same for the Stochastic (green line) The blue dots on the zero line are Volume spike indicators. Volume decreased for 3 bars and increased on the bar with the dot. Obviously Volume alone does not give you any directional indication, but with price and the CCI it does.
As you can see, the CCI's are very similiar, but not identical. And this in itself gives me information. Both CCIs going up or down at the same time tells me we have higher highs and higher lows or vice versa, a trend, and you don't trade against a trend if you love your account. Stochastic at the bottom or at the top tells me we have just made the highest high or lowest low for the last 6 bars. Sure it can stay there for a while, but if volume is decreasing and suddenly you get a volume increase with %K reversing, you have a possible reversal at hand.

I marked one trade on the chart. A ZLR on both oscillators, a volume spike, a trade worth taking. Entry was 6490 compared to 6494 on a regular CCI.

Next steps to be done will be validating the results seen on the charts this morning with my Ensign tradesystem. Will see what that gives me for the longer picture.

Friday, April 20, 2007

Automatic Tradesystems

Why do I bother?

  • Because I want to define my trading rules.
  • Because I want to be able to get statistics with the press of a button.
  • Because I want to know, if I have an edge

I'm not a mechanical systems trader. I take trades before a signal is present. I take trades, when I get a feeling, that a trade setup is present. Some of these trades work great, other explode right into my face. The trades which work great in hindsight show a nice setup on the chart, the ones which are BE to -5 tick trades usually show no setup at all on the chart at the close of the day. But the worst trades are the ones, where a tradesignal is present and ultimatly fails. These are the ones which are really expensive.

Sure, I have a lot of screen time, sure I am able to pay for my commissions and for now I make enough to stay in business. I have good and lean periods. I have not been able to make riches in the market. I want to change that, because I see the trades, I see the opportunity, I "just" don't take it.

Why?

Because deep within myself; I'm not convinced I really have an edge. I think in probabilities, I know, that not all trades need to be winners to make me a very profitable trader, but all attempts at defining the rules for a profitable tradesystem did not really work. Yes I can design profitable automatic tradesystems, but these are profitable due to the Money Management rules, not because of the trade entry or exit rules. That doesn't give me the proof I'm looking for. I want an automatic tradesystem with >70 to 75% winners. I can achive these results in discrete trading, but I'm unable to define rules giving me these results in automatic tradesystems.

Why?

Maybe the design process I'm taking is wrong. Maybe when designing an automatic tradesystem I'm looking for something I don't look for in my discrete trading.

What is the most important rule for an automatic tradesystem design?

  • Trades are taken at the open price of the bar following the bar giving the tradesignal

Only if your tradesystem follows this approach you can be sure, that a tradesignal will be present in backtesting and in realtime. If you take the trades intrabar a tradesignal might be present in realtime, but be gone at bar close. In backtesting only the valid tradesignals will be seen, while all the intrabar tradesignals will be gone.

Let's look at a chart

I've marked areas, where I would like to see a signal, just because the move following on the chart makes it a move worth taking.

Let's see where exactly convential automatic trade systems might trigger a trade.

The first trade is a kind of breakout reversal trade. A test to the downside failed, even if the market was downtrending during the period I marked as Flat market. So the market reversed to the upside. An automatic tradesystem might look for a zeroline cross on the CCI or the first retest of that zeroline on the CCI, which was the bar I marked in my example. And in this case such rule might work. Unfortunatly such a rule will  not be profitable in itself as CCI zeroline crosses usually are not followed by 50 tick moves as in this example here. Over the long term trading CCI zeroline crosses will let you die the death of a 1000 stops.

The next trade looks good, but when following CCI pattern trading rules, it's no CCI zeroline reject as these are to be ignored, if they happen above the 100 line or below the -100 line on the oscillator. The reason being that the retracement is just to shallow to warrant a trade in the direction of the trend already. But assume we trade with laxer rules and trigger a trade, you can clearly see the chop following the long entry bar making it probable, that you will get stopped unless you really trade automatic and get the open price of that long bar.

And the third trade: Well that's a real nice zeroline rejection on the CCI with a nice sling on the Turbo. CCI going to 0 and being rejected, Uptrend intact. But that's also the signal which is clearly failing, giving you a Breakeven exit, if you are on your toes. Otherwise it's a stopped trade as this trade started the trend reversal.

What is the common theme in all these signals?

  • Confirmation

See what you get with confirmation on the HSI. (This market is actively traded right when I'm writing this)

The first trade  is right into the afternoon session open and i usually avoid it, as the market is extremly illiquid then showing spreads of 10 ticks or more. Besides it's again the zeroline CCI cross type trade, which I know has no real edge. The next 3 longs are valid CCI-Signals and all 3 are stopped. Trading these will get you frustrated and you will for sure start questioning the whole approach you take in trading, when your day starts with 3 losers in a row on signals which are supposed to give you good returns.

Why do all these signals fail?

The market needs to turn in the direction of the trend before you get the signal and then take the trade. But in my daily trading, that's not the approach I take. I often anticipate a signal, because I know from experience, from long hours of screentime, that a market will most likely react at a certain level.

Is it possible to design an automated tradesystem with this kind of anticipation?

Well I have to admit I have not yet done it, I'm writing this to structure my ideas and to force myself to take the time think about it.

One bar makes all the difference.

One bar makes the difference between a system barely profitable and a system placing you smack in the middle of the road to riches.

You don't believe me? Try this approach, if you have the ability to backtest your tradesystem. Instead of taking the open of the bar following the bar giving the tradesignal let your tradesystem take the open of the bar giving the tradesignal itself.

I tested that on some systems I developed. 1 contract, 10 trades and the profit jumped from 700$ to around 5000$. The clear sign you just developed a hindsight trading system. Btw: Don't get the idea, that you should only take the trade, if the next bar goes back to the open of the previous bar, giving you the entry there. That usually backfires, as then the probability of the tradesignal failing increases by a very high degree. No, we need an automatic tradesystem giving the tradesignal one bar earlier, giving the tradesignal when there is not (yet) confirmation.

I see ways to do that. It's not so simple as looking for a zeroline rejection on the CCI, but the rewards are sure worth it.

Still there will be a price to pay. When waiting for confirmation, we know for sure there is a signal present, which meets all our criteria, we defined for say a long signal. What we don't know is whether that signal will bring money into our account or not. That's the probability we usually deal with.

What I propose to do is introducing probability to the signal level itself. What will this approach bring us?

Instead of being sure whether a signal is present, we don't know until the next bar closes whether a signal will be present or not.

But what will the reward be?

A trade which is for sure profitable when the signal materializes for at least 1 bar. We don't know how profitable, but we know the trade will be profitable as otherwise the regular tradesignal (eg the CCI zeroline rejection) will not be present.

Look at the HSI example above. Tradesignals at the open of the bars marked with the Long arrow would have given you about 60 ticks.

The CL M7 chart shown above would have netted about 35 ticks more and the third trade would have been a winner instead of a Breakeven or losing trade.

The goal is designing a system with 70% to 75% profitability and the question to be asked is no longer: Is there a trend reversal, is there a rejection of the 34ema or a CCI sling, but : What are the conditions, what are the rules making a rejection, a CCI sling a trend continuation or trend reversal likely.

Will see if that is possible.

Tuesday, April 17, 2007

Test it

Arrows on your chart. They look so good!

And in hindsight you see all these great trades that were marked on the chart but somehow discount the losing trades.

But why do I have that warning voice in me asking me before I take a trade: Is that really a valid signal? Yes, there is that arrow, but .... You know not all of these signals work. Do you really think you're smarter than all these other geniuses out there designing tradesystems for big firms for 6 to 7-figure salaries.

So another signal is not taken.

Enough!

Before I take one more trade I will have a very very long look at my charts and confirm the validity of all these signals I now place on my charts by cold hard facts. I need numbers, I need statistics about the arrows on my charts. And I can't do these by hand as I would never again make a trade, if I need to rely on handwritten statistics for say 10 symbols in 6 different timeframes for the last 3 months alone.

I need tradesystem analysis. Yes I know the Tradestation guys are laughing as that's one area that program is excelling in. But

  • I don't have Tradestation
  • I don't intend to switch and learn it only to come back to Ensign after my statistic is finished
  • I'm used to Ensign Software for 6 or more years and
  • I'm convinced I can do everything TS can in Ensign as well.  

Fortunately Howard, the developer of the Ensign Chartprogram is really great guy and always willing to help, if you have a question. Even making adjustments and additions to Ensign, when you have a reasonable suggestion, which fits into his development plan.

First I wrote an eMail to Howard asking about tradesystem analysis in Ensign and Howard answered me with 3 good resource links, which got me started.

Hi,
You would use ESPL logic to implement your ideas and when you have a trade signal to either enter or exit a trade you
would use the ESPL commands for the trade system.   A ledger of your trades is made and some statistics provided by that ledger.
See these examples.
http://www.ensignsoftware.com/tips/tradingtips42.htm
http://www.ensignsoftware.com/espl/espl119.htm
http://www.ensignsoftware.com/tips/tradingtips21.htm

Then I ran into some design problems and he added a new statement to the ESPL programing language making the task I set for myself a lot easier. Thank's a lot Howard!

What did I do?

Designing Chart-Templates which paint an arrow once certain conditions are met is simple in Ensign. The power of the Do-it-yourself study is really unmatched when it comes to designing your own charts with bells and whistles. But the tradeanalysis needs to be done in ESPL. So I adjusted Howard's ESPL code, found in the resources he sent me, to link with my chart template, added some trademanagement I normally do in my own trading and here is the result:


(doubleclick to enlarge)

The Tradesystem is a simple trendfollowing system, which goes long or short on a retracement with the trend. Nothing sophisticated and actually an example how trade management can turn a profitable tradesystem into a losing one and vice versa.

I have designed the ESPL code in a way, that you can enter the Tradetarget, the Stop and a trailing Stop in ticks, which makes this code applicable to a wide array of symbols.

The Charttemplate itself needs to have 3 DYO Studies:

  • One named "Buysignal" which goes True in Line J when a Buy is triggered
  • One named "Sellsignal" which goes True in Line J When a Sell is triggered
  • and one named Variables where you can transfer Numbers from the chart to the ESPL program. Currently it needs to tell the ESPL program only the minimumticksize of the symbol to be analyzed, which is available in the $Q variable in Ensign.

Here is an example of the BuySignal DYO

The Tradesystem analysis is done in ESPL.

First you need to place the code in your ESPL directory [\Ensign\ESPL], then you need to load it in the ESPL script editor and adjust the variables according to your needs:

(You need to enter the chartname, if you have more than one chart open when testing. I have made myself a Tradesystem Workspace with one chart only, so I don't need to change the code, when switching symbols) 

Clicking the Number 1 Button will clear the output window and will clear your chart from any markers left from previous tradesystem runs (if any).

Click Button 2 and the Tradesystem analysis is running

If you have Ensign and are interested in testing your own system, here are the links to the

Chart-Template and the ESPL code (right click the links and select Save Target.. to download directly in the correct subfolders)

I wish you a profitable tradesystem analysis

Monday, April 02, 2007

Enough is enough

I just finished reading Enhancing Trader Performance from Brett Steenbarger. If you own the book, but haven't read it, do yourself a favor and read at least Chapter 8 and 9. You will find something there to enhance your trading performance.

It sharpens your awareness and will let you question what you take for granted. You will have the tools to identify the source of trading problems you might have and you will be shown the way to start solving them. But before you can do that, you need to know where the problem really is.

I have developed a tendency to jump into trades without thinking consciously. There is a signal present somewhere, I might have missed it, but it's moving, it's moving fast and it will move a few more ticks allowing me at least a Breakeven exit. In a trending market, that's basically correct. But there is the point of enough being enough.

And then it goes maybe 2 ticks in my favor and reverses. It reverses fast when momentum is stalling and no fresh buying or selling comes in. We know that all. And such trades can be expensive, as in the blink of an eye they run into your stop, which you never really intended to get hit, as you said to yourself: I'm out long before that Stop is hit.

So I developed an Alert telling me when enough is enough. Sure you need to know what you trade, sure it's timeframe dependant, but so what? I want something which tells me in the 2 minute timeframe I use for my trading charts, when there is a big risk going with the trend regardless of the signal.

I decided that going 45 ticks or more in 14 minutes and closing 6 or less ticks below the low warrants such a label. Why? Because 45 ticks is something between 450$ and 750$ per contract traded (using the 10 US$ to 12.50 € tick value the majority of the contracts I trade have).

Above you can see the alert in action. Sure I might miss an occasional trade, which might mean that I need to adjust the parameters for that particular contract, but it seems for the majority of contracts where I applied this indicator, it looks quite good.

That's what COIL did after the warning, which was given at 68.46. A new high at 68.62 followed before a retracement in the trend materialized

I don't intend to use that warning as Countertrend indicator. As you saw there was still upside potential. It just was limited because COIL had been going quite a distance already in the short and medium term timeframe's.