|
|
|
|
|
|
This page shows example trading systems. They won't necessarily be very profitable, however they will hopefully give you a better understanding of what it takes to make a complete trading system.
As far as we are concerned, a trading system without a stop loss is not a complete system.
|
|
|
|
|
|
|
|
|
|
|
|
Below is the absolute minimum rules required to make a system "complete":
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | Low Of Previous 50 Bars |
You can see that this system has only rules for going long. That's perfectly fine.
Also the timeframe is not specified. It could be 5-Minute bars, or Daily bars, or whatever. It's not really important for this example.
A new bar is completed. If the close is below the high of the previous 100 bars, then a limit order is placed at the high of the previous 100 bars. The initial stop loss is set at the low of the previous 50 bars.
Now, either the price moves up far enough to get us in the trade, or it doesn't.
Let's say we're in the trade. Well, now we see something is missing. There are no rules to move the stop loss anywhere. We set the Initial stop loss value and nothing else. And because there is no take-profit set, the only way for us to exit this trade is for the stop loss to be taken out. At a loss.
So, this is a simple, but silly trading system. Albeit a "complete" one. Although, you could then do the trade management yourself. Perfect for people who struggle to pull the trigger, but are then fine to do the trade management themselves.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Complete Trading System #1
|
|
|
|
|
|
This system is the same as the "Simple But Stupid" one above, except that it adds Trade Management Rules & Values. Once in the trade, these rules take over to take care of the placement of the stop loss.
It is hoped, that eventually the stop loss will be moved above the original entry point, thereby locking in profit by the time the price takes out the stop loss.
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | Low Of Previous 50 Bars | | Long - S/L Mgmt Rules | Every Bar | | Long - S/L Mgmt Values | Low Of Previous 50 Bars |
In fact, all the Trade Management Rules & Values do, in this particular case, is keep the stop loss at the low of the previous 50 bars. In an uptrend, this low should gradually move higher and higher.
Note, however, that this software will never move a stop loss to a position of increased risk. So, for long trades, the stop loss will only ever move up. For short trades, the stop loss will only ever move down.
Should, in this case, the low of the previous 50 bars move to a position of increased risk, the stop loss will stay where it is.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Complete Trading System #2
|
|
|
|
|
|
The other way to make a complete trading system that might actually result in a profitable outcome, is to have a take profit.
So, as before, we have the "Simple But Stupid" system, but we add an Initial Take Profit.
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | Low Of Previous 50 Bars | | Long - Init. T/P Values | 50 Pips Above Entry |
Either the price will go up and our take profit will be hit, or the price will go down and our stop loss will be taken out.
Once set, neither the stop loss nor take profit are moved from their original positions.
|
|
|
|
|
|
|
|
|
|
|
|
This time we have both Trade Management Rules & Values to gradually move the stop loss upwards, *and* we also have a take profit set.
This way we gradually reduce our risk, and if the price jumps up, we take the money and run.
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | Low Of Previous 50 Bars | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Every Bar | | Long - S/L Mgmt Values | Low Of Previous 50 Bars |
The stop loss will move, but the take profit doesn't.
|
|
|
|
|
|
|
|
|
|
|
|
With any of the Values you can set a Pip Offset. Here's the Combination #1 & #2 again but using Pip Offset values. Explanation below.
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Entry Values | Pip Offset of 1 | | Long - Init. S/L Values | Low Of Previous 50 Bars | | Long - Init. S/L Values | Pip Offset of 5 | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Every Bar | | Long - S/L Mgmt Values | Low Of Previous 50 Bars | | Long - S/L Mgmt Values | Pip Offset of 5 |
The Pip Offsets of 1 used for the Long Entry Value is going to add 1 pip to the High of the previous 100 bars. Essentially:
Long Entry Value = High of previous 100 bars 1 pip.
But, for the Long stop loss, it is going to *subtract* 5 pips:
Long Init. S/L = Low of previous 50 bars - 5 pips.
For a Long take profit, a Pip Offset would be added. And for Shorts you need to reverse all that.
You need other values to add/subtract the Pip Offset to/from - you can't just have a Pip Offset value by itself.
Now, with TS you can have as many Rules as you like, and you can have as many Values as you like. The question is, what if you put multiple Pip Offset values for, e.g. Long Entry Values? Like this:
- Long Entry Values - High Of Previous 100 Bars
- Long Entry Values - Pip Offset of 1
- Long Entry Values - Pip Offset of 10
- Long Entry Values - Pip Offset of 5
I'm not sure why you'd do this, but it is possible. In this case, TS will use the biggest Pip Offset (10 in this example).
|
|
|
|
|
|
|
|
|
|
|
|
Technically, keeping the stop loss at the value of the lowest low, or at the value of an SMA, (and never letting the stop go to a position of increased risk) are examples of trailing stops for Long trades. As they go up, so does your stop loss. Eventually (hopefully) the stop loss rises above your entry price, so when it gets taken out, it's at a profit.
TS also has other rules which you can use for creating what you might think of as more traditional trailing stops. E.g. [OHLC] Minus X Pips, and [OHLC] Minus X Percent (and the reverse for Short trades).
Here's an example:
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | [OHLC] (using the Low) Minus 1 Percent | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Every Bar | | Long - S/L Mgmt Values | [OHLC] (using the Low) Minus 1 Percent |
|
|
|
|
|
|
|
|
|
|
|
|
You can use any of the following Rules in combination with the "Exit At Market" Value:
- Stop Loss Management Rules
- Stop Loss Management Rules #2
- Take Profit Management Rules
- Take Profit Management Rules #2
Using the "Exit At Market" Value in combination with any of the above will have the same effect, i.e. the trade will be exited.
| Rule Type | Description | | Long - Entry Rules | Close Below High Of Previous 100 Bars |
| Long - Entry Values | High Of Previous 100 Bars | | Long - Init. S/L Values | Low Of Previous 50 Bars | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Every Bar | | Long - S/L Mgmt Values | Low Of Previous 50 Bars | | Long - T/P Mgmt Rules | Relative Strength Index (RSI) In Overbought | | Long - T/P Mgmt Values | Exit At Market |
Here we used the Take Profit Management Rules & Values to Exit At Market, but as I said, we could also have used the Stop Loss Management #2 Rules & Values, or the Take Profit Management #2 Rules & Values.
This system now has 3 ways of exiting. First is the price goes up and the take profit is hit. Second is the price goes down and takes out the stop loss. Third is the price moves in such a way that the RSI moves into overbought territory. If that happens, the trade will be exited at market.
The question is, what if the RSI was already in overbought territory when the original order was placed?
In this case, actually the order will not be placed. The software first checks if any of the reasons to Exit At Market are currently true before placing the order. If any are true, the order will not be placed - there is no reason to enter a trade if we then want to exit it straight away.
|
|
|
|
|
|
|
|
|
|
|
|
| Rule Type | Description | | Long - Entry Rules | Close Below Simple Moving Average (Period=100) |
| Long - Entry Values | Simple Moving Average (Period=100) | | Long - Init. S/L Values | 10 Pips Below Entry | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Close Above Simple Moving Average (Period=100) | | Long - S/L Mgmt Values | Simple Moving Average (Period=100) |
If the close of the most recently completed bar falls below the SMA of period 100, then an order will be placed at the value of that SMA. The initial stop loss is set 10 pips below the entry, and the initial take profit is set 50 pips above.
Let's say the price moves up far enough to get us in the trade. Should the close of that bar end up still above the SMA, then the stop loss will be moved to wherever the SMA currently is (remember it was 10 pips below it when the trade was opened).
From then on, whenever the close ends up above the SMA, the stop loss will be adjusted so it remains level with the SMA (remembering that the stop loss will never move down, to a position of increased risk though).
Should the price ever fall below the SMA, then the stop loss is taken out, and we are out of that trade.
A Trap For Young Players
This trading system is perfectly fine. I have no idea how profitable it is, but it is valid.
However...
Due to the restrictions placed upon us by backtesting using interval data, this system is not a good one in terms of the quality of backtesting results.
The reason is that the initial stop loss is too close to the entry, and most trades done in backtesting will most likely end up as being thought of as opened and closed in the same bar.
Because the software takes the pessimistic approach and assumes the worst possible sequence of events, each trade that is opened and closed in the same bar is thought of as having lost money. You can read more about this in the " Problems With Backtesting - Opening & Closing Trades In The Same Bar" article.
The backtesting results show a "Pessimistic Trades" value in the summary. If this number is too high - close to, or equal the number of trades placed - then the backtesting results can not be relied upon.
|
|
|
|
|
|
|
|
|
|
|
|
Adding to the Moving Average Example above, we add a bunch of other rules that must be met before we place the order.
| Rule Type | Description |
| Long - Entry Rules | Close Below Simple Moving Average (Period=100) |
| Long - Entry Rules | Slow Stochastics In Overbought |
| Long - Entry Rules | ADX Is Rising |
| Long - Entry Rules | ADX Is Above Both D And -D |
| Long - Entry Values | Simple Moving Average (Period=100) | | Long - Init. S/L Values | 10 Pips Below Entry | | Long - Init. T/P Values | 50 Pips Above Entry | | Long - S/L Mgmt Rules | Close Above Simple Moving Average (Period=100) | | Long - S/L Mgmt Values | Simple Moving Average (Period=100) |
Absolutely all of the Entry Rules must be true for an order to be placed.
You can have as many Entry Rules as you like, as many Stop Loss Management Rules, as many Take Profit Management Rules. But remember - all of those rules must be true for that particular action to be allowed.
|
|
|
|
|
|
|
|
|
|
|
|
All the examples so far have had Long rules only, the theory being that you're smart enough to understand how to apply the same techniques for Short trades as well.
This example shows a mirrored system.
| Rule Type |
Description |
| Long - Entry Rules |
Close Below Simple Moving Average (Period=100) |
| Long - Entry Values |
Simple Moving Average (Period=100) |
| Long - Init. S/L Values |
10 Pips Below Entry |
| Long - Init. T/P Values |
50 Pips Above Entry |
| Long - S/L Mgmt Rules |
Close Above Simple Moving Average (Period=100) |
| Long - S/L Mgmt Values |
Simple Moving Average (Period=100) |
| Short - Entry Rules |
Close Above Simple Moving Average (Period=100) |
| Short - Entry Values |
Simple Moving Average (Period=100) |
| Short - Init. S/L Values |
10 Pips Above Entry |
| Short - Init. T/P Values |
50 Pips Below Entry |
| Short - S/L Mgmt Rules |
Close Below Simple Moving Average (Period=100) |
| Short - S/L Mgmt Values |
Simple Moving Average (Period=100) |
If the close of the most recently completed bar falls below the SMA of period 100, then a long order will be placed at the value of that SMA. The initial stop loss is set 10 pips below the entry, and the initial take profit is set 50 pips above.
Let's say the price moves up far enough to get us in that long trade. Should the close of that bar end up still above the SMA, then the stop loss for the long trade will be moved to wherever the SMA currently is (remember it was 10 pips below it when the trade was opened).
Also, an order to go short will be placed at the value of that SMA. The initial stop loss is set to 10 pips above the entry, and the initial take profit is set to 50 pips below.
That's right - we're in a long trade, and we also have a short order set.
Whenever the close ends up above the SMA, the long stop loss will be adjusted so it remains level with the SMA (remembering that the stop loss will never move down, to a position of increased risk though).
Should the price ever fall below the SMA, then the long stop loss is taken out, and we are out of that long trade. Also the short order is taken up, and we are in a short trade.
Be very careful
You need to make sure that your system can not want to be in both a long trade and a short trade at the same time. It's ok to have a long trade and a short order, or vice-versa, but not 2 open trades at once.
This is because (a) most brokers do not allow hedging in the one account; and (b) Thinking Stuff can't handle hedging in the one account. You can get around both (a) and (b) by having 2 accounts - one is used for short trades only, and the other is used for long trades only. Please read the "How To Hedge?" section of the "Trading Systems Window" help page.
When the stop loss of the long trade is at the same value as (or higher than) the short order's entry, that means the system is "safely" mirrored.
But you can see in this system, the initial stop loss for the long trade is set 10 pips below the SMA, whereas the entry value for the short order is at the SMA. It's only when a bar closes above the SMA, that the long stop loss is moved up to that SMA.
Here's where some thinking is required. Is there any possibility that this system could be in both a long and short trade at the same time?
Let's start with a blank sheet. And assume that the prices are currently below the SMA. So, at the start, only a long order will be in place.
The price then rises through the SMA, and the long order turns into a long trade. The initial stop loss is 10 pips below the SMA. The bar which got us in to the trade then closes above the SMA, so the stop loss is moved to the SMA, and the short order is also placed at the SMA.
Ok, that scenario checks out. But what if the bar that gets us in to the long trade, reverses and closes below the SMA?
In this case, the stop loss will not be moved, so it remains 10 pips below the SMA. On the other hand, no short order will have been placed. This scenario checks out as well.
So, fortunately for us, this system seems "safe". But be careful. If there's any doubt, I think you should use the 2 different accounts - one for long trades, and one for short trades.
From my backtesting, I have found that prices rarely behave the same going up as they do coming down. So it's entirely feasible that you would have different settings for your long and short trades. In this example, the SMA of period 100 is used throughout. More likely it would be something like an SMA of period 100 for the longs, and an SMA of period 80 for the shorts. This leads to an even greater chance that you could be in both a long and short trade at the same time, and therefore you should use the 2 accounts method.
|
|
|
|
|
|
|
|
|
|
|
|
Stop Loss Management has Rules & Values #1 to #9, and Take Profit Management has Rules & Values #1 and #2. This gives you 9 different settings for when and how to move the stop loss (10 if you count the Move To Break Even Rules), and 2 different settings for when and how to move your take profit.
For example, let's say your initial stop loss was set to "The Lower Bollinger Line". You might want to use the Stop Loss Management Rules to keep your stop loss at the same value as the lower Bollinger line, as that lower Bollinger line moves around.
So you set as following:
| Rule Type |
Description |
| Long - Entry Rules |
Close Above Lower Bollinger Line (Period=20) |
| Long - Entry Rules |
Close Below Simple Moving Average (Period=20) |
| Long - Entry Values |
Simple Moving Average (Period=20) |
| Long - Init. S/L Values |
Lower Bollinger Line |
| Long - S/L Mgmt Rules |
Every Bar |
| Long - S/L Mgmt Values |
Lower Bollinger Line |
You would probably add a whole bunch of other Entry Rules, but when I use a value like the Lower Bollinger Line, or a Simple Moving Average, etc, as the stop loss, I tend to put the equivalent rule in as a Long Entry Rule to make sure the price is actually above that line before trying to set a stop loss there.
That's all fine, but as well as keeping the stop loss at the Lower Bollinger line, sometimes you expect a reversal to be imminent, and therefore want to jump the stop loss up to lock in as much profit as possible. Let's say that if the price goes in the wrong direction for 2 bars in a row, you want to move the stop loss to the upper Bollinger line.
Well, you'd do something like this:
| Rule Type |
Description |
| Long - Entry Rules |
Close Above Lower Bollinger Line (Period=20) |
| Long - Entry Rules |
Close Below Simple Moving Average (Period=20) |
| Long - Entry Values |
Simple Moving Average (Period=20) |
| Long - Init. S/L Values |
Lower Bollinger Line |
| Long - S/L Mgmt Rules |
Every Bar |
| Long - S/L Mgmt Values |
Lower Bollinger Line |
| Long - S/L Mgmt Rules #2 |
Wrong Direction (for 2 bars) |
| Long - S/L Mgmt Rules #2 |
Close Above Upper Bollinger Line |
| Long - S/L Mgmt Values #2 |
Upper Bollinger Line |
See how I made sure the price is actually above the upper Bollinger line before I moved the stop loss there?
Or you could just Exit At Market:
| Rule Type |
Description |
| Long - Entry Rules |
Close Above Lower Bollinger Line (Period=20) |
| Long - Entry Rules |
Close Below Simple Moving Average (Period=20) |
| Long - Entry Values |
Simple Moving Average (Period=20) |
| Long - Init. S/L Values |
Lower Bollinger Line |
| Long - S/L Mgmt Rules |
Every Bar |
| Long - S/L Mgmt Values |
Lower Bollinger Line |
| Long - S/L Mgmt Rules #2 |
Wrong Direction (for 2 bars) |
| Long - S/L Mgmt Values #2 |
Exit At Market |
It's the same with take-profits. Generally take-profits don't move so much, but again you have 2 ways to move them if you want.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"Interesting stuff."
- S.V. (Netherlands)
|
|
|
|
|
|
|