This information should hopefully take you from complete and utter novice, to being able to understand the terminology we use on this site. Hopefully you'll also be able to start using our software.
We're going to focus on currencies, because generally people know how stocks work. But this should also be helpful if you don't know about stocks.
The trap for young players is to think you need to understand how everything works. The truth is, there's some stuff that just happens behind the scenes that you don't need to worry about.
Side note: I normally write 1,000 to mean "one thousand", and 1.000 to mean "one point zero zero zero". This is the direct opposite of some parts of Europe, so where possible I will instead use "K" to represent the thousands. E.g. 1K = 1000, and 10K = 10000. But note that I'm still going to have to occasionally use "," for thousands and "." for a decimal point.
When you think the price is going to go higher, you buy. This is called going long.
When you think the price is going to go lower, you sell. This is called going short.
The practicalities of going short is exactly the same as for going long: Choose an option. Click a button. There's really no mystery. Once you've done it once, you're a master.
Forex brokers have game or demo accounts, where you can practice all you want without risking real money. In these demo accounts, you can buy and sell and watch charts just as if you were doing it for real. The only difference is that you're not using real money.
Take for example the price of the Euro vs the US Dollar. This is written EUR/USD, or just EURUSD.
EUR is the 3 character symbol for the Euro. USD is the 3 character symbol for the US Dollar.
AUD is the Aussie Dollar, NZD is the New Zealand Dollar, GBP is the Great Britain Pound, JPY is the Japanese Yen, and so on and so forth.
Normally currencies are quoted against the US Dollar. E.g. AUD/USD, NZD/USD, GBP/USD, USD/JPY.
When we compare two non-US currencies, they are called cross-rates. E.g. AUD/NZD, GBP/JPY.
The ordering is important. When you buy GBP/USD, what you are actually doing is buying GBP using USD.
If you buy AUD/NZD, what you are actually doing is buying AUD with NZD.
Or, more correctly, you are buying GBP and selling USD. Or buying AUD and selling NZD. But don't worry if that confused you.
The smallest price movement is referred to as a pip.
For example, the price of EUR/USD has 4 decimal points - 1.2345. A pip is therefore equal to 0.0001.
The price of USD/JPY has 2 decimal points - 123.45. A pip is therefore equal to 0.01.
There are some brokers that let you trade so-called pipettes, which add another decimal point. It makes no difference to how the calculations take place.
The lowest denomination in currency is a unit. 100K units = 1 contract.
Different brokers have different rules on how many units you have to buy.
Very rarely do brokers allow you to buy just one unit and in multiples of 1 unit, although Oanda allows this.
It's becoming more and more normal for brokers to allow purchases in chunks of 1K units. i.e. the minimum you could buy is 1000 units. Or you could buy 2000 units, or 10000 units. And so on. But not 1697 units.
A lot of brokers trade in chunks of 10K (10000) units.
Some brokers are still clinging to 100K chunks. 100K units is equivalent to 1 contract, and was the standard when it was pretty much just banks involved in this currency trading thing. But now more and more private citizens are getting into it, and we aren't going to buy millions of dollars of currency at a time, so brokers are getting smart and letting us buy in the 1, 1K, 10K chunks.
Currency trading is possible whenever there's somewhere in the world that's not currently in a weekend. That means when the time becomes Monday morning in some part of the world, currency trading starts. And when the time becomes 5pm on Friday afternoon in the last part of the world to do so, currency trading ends.
The result is that currency trading is possible for 24 hours per day, about 5.5 days per week.
But just because trading is possible, it doesn't mean that everybody is trading for 24/5.5. Instead, the days are broken up into sessions. There's the U.S. session, the European session, and the Asian session. Each session is roughly from 8am to 6pm on the local time of whatever part of the world it is. These sessions do overlap a little, and it's when they do that you have the most number of people trading.
Is the time when the most number of people are trading an important thing? Not sure. The markets are certainly more liquid. But it would be impossible for me to be able to determine the impact on your particular trading style.
Most brokers offer both a demo account along with their live account.
Demo accounts are where you can experiment and practice without risking real money. Everything else should be the same as the live account.
Some brokers offer 3 types of accounts:
For such brokers, live accounts would be where you have to buy in lots of 1 contract, whereas the mini account is where you could buy in lots of 10K. You could still buy 1 contract or more in the mini account, but to buy 1 contract it would probably be referred to as "10 mini contracts".
FXCM goes a step further and has:
In the micro account you can buy in lots of 1K.
Some brokers don't have the concept of a mini account, and just let you trade in lots of 1K or 10K or 100K in the live account.
Oanda lets you buy in lots of 1 unit in their live account, so you could buy 12,345 units if you wanted to.
A whole bunch of things make the price go up and down. Exceeding expectations. Not meeting expectations. Mergers that seem like a good idea. Mergers that seem like a bad idea. Anything. Nothing. Somebody thinks the current price is cheap buys from somebody who thinks the current price is expensive.
Analysing, or trying to guess if the market will go up or down, falls into two broad categories - fundamentals and technicals.
Fundamental analysis is when you make trading decisions based on your knowledge of a company (or country).
Technical analysis is when you make trading decisions based on your interpretation of the movement of that company's share price (of of the currency).
While fundamental analysis and technical analysis can be mutually exclusive, they don't have to be. You might have decided through fundamental analysis that a company's share price is severely overvalued, but you can then use technical analysis to decide when to actually open the trade.
When significant announcements take place, it often causes a currency's price to spike in one direction or the other, and sometimes both.
It's not really a good time to be in an open trade. (Unless you're specifically trying to "trade the announcement").
So, we find out when they are going to happen by going to the Forex Factory Calendar. Major announcements have the red icon next to them.
Let's say China needs a lot of steel. And they sign a new contract with a company in Australia that makes steel. Theoretically, the share price for that Australian steel company should go up. You read about that deal in the newspaper, then call your broker and buy some of that company's shares. That's a trading decision based solely on fundamental analysis.
Another example might be that the company hires a new CEO, and that CEO did very well for the last company he/she worked at. You'd expect the share price to go up.
If a company is expected to announce $5m in profit for the year, that's also a good thing. So the share price should go up. But if actually everyone was expecting $10m in profit, turns out $5m in profit is not so good, so the share price will go down. It's not that $5m in profit is actually bad - it's that it's bad compared with peoples' expectations.
This is the bit that makes fundamental analysis a little tricky - not only do you need to know about the company, you also need to know what other traders' expectations are about that company. If everybody already knew about that deal between China and the Australia steel company, it has already been factored in to that company's share price. Buying when you read about in the newspaper is probably too late.
For currencies, there are a range of things which make the price fluctuate, which normally revolve around the flow of money.
Think of a currency like any other commodity - it responds to supply and demand. Too much supply and the price goes down. Too much demand and the price goes up.
Demand increases when people want to move their money into that country.
A simple example is when you travel to a country, you exchange your money into that local currency. What you've done is sold your currency and bought the local currency. If there was a natural disaster almost wiping out the tourism industry, less people want to travel there, so less people will want to buy the local currency, so it becomes weaker.
When a country's interest rates go up, so too does the interest that banks give on deposits. With higher bank interest comes more money flowing into the country, i.e. more people want to buy the local currency. That's good for that country's currency, and so it becomes stronger.
When a country's economy is strong, and an announcement is made by a government agency that it's going to get stronger, more people will want to invest in that country. Once again, they want to buy the local currency, so it becomes stronger. The Non-farm payrolls (NFP) announcement seems to shake things up a lot - a good announcement means the economy is doing well.
However, it's one thing to know what should happen, or to know why a price is going up or down. It's another thing completely to take advantage of that knowledge.
Technical analysis means simply looking at a chart of prices. The prices might be of a particular company's shares, or of a currency, or of an index like the NASDAQ or FTSE.
Technical analysts believe that all the fundamental information known to-date is already in the price. Further, we don't actually need to know why the price is moving, all we need to know is that the price is moving and respond accordingly.
The price of a share or currency bounces all over the place. If the price of the most recent transaction was higher than the transaction before it, that has very little weight in our trading decisions. Maybe it means the price is going up. Maybe that was just noise. It's impossible to tell by just comparing 2 transactions.
What you want is a clearer view of what the price is doing. The simplest way to do that is to convert a bunch of transactions into a candle or price bar.
A price bar is the summary of all transactions over a particular time period - whether that be 5 minutes, or an hour, or a day, week, month or year. A bar takes potentially thousands or even millions of individual transactions as input, and gives you these 4 prices:
Here's an example chart:
But how are trading decisions made by looking at that? Basically, by finding patterns in the chart, and knowing from past experience how likely the price is to go up or down when a particular pattern appears.
At the very heart of it, trading comes down to just 2 things:
Each bar is a possible entry. But that gives us an infinite number of choices. We need to filter the number of possible entry bars down to a manageable number. Moreover, the bars we enter a trade on are preferably the ones that give us the greatest profit opportunity.
So how do we filter the bars? By using indicators, overlays, candlestick patterns, and chart patterns.
Both indicators and overlays are simply extra lines on the chart; the result of a mathematical equation applied to the price bars. Price bars remove the noise of all the individual transactions. Indicators and overlays help us make sense of the price bars.
The only difference is where these are charted:
It is the mathematical formulae that make overlays and indicators statistically relevant. That is not to say they are fool-proof. Before too long you will hear of the "holy grail" indicator, which is a mythical creature that works 100% of the time and in all trading conditions.
More realistically, each overlay and indicator (henceforth "indicator" will refer to both) will work in certain conditions; be that when the price is trending strongly or when the price is ranging, but not in both.
The names of the indicators in the chart above are not important at this stage. You should simply come away knowing that indicators are just lines on the chart; you can make trading decisions from them; and none of them work perfectly in all conditions. But they can tilt the balance of probabilities in your favour.
So let's make a quick trading rule based on the lines above. I'll just refer to them as the blue and pink line.
Trading rule attempt #1. Open a long trade when:
Following that rule you would have one great trade starting about the middle of the chart. But look to the left in that ranging section and the same rule gives you a lot of dud trades. So this rule did filter out a lot of the bars, but not enough.
The solution then, is to find a combination of indicators that work together. Most likely one main indicator for your trading decisions, and another (or others) which lets you know when it's okay to rely on that main indicator.
Trading rule attempt #2. Open a long trade when:
There are only 3 places where the pink line forms a higher trough:
In the first instance, the close of the bar is not above the blue line, so we don't open a trade. Good thing too. In the second instance, that is exactly where we want to open a trade. And in the third instance, again, it's all good. The second indicator has done a very good job of filtering the trading signals of the first.
And what we have demonstrated above is, very simply, how to make a trading system:
A guy called Steve Nison made popular in the West trading techniques that had been in use in Japan for centuries. These are candlestick patterns, and that's why a lot of them still have Japanese names.
Candlestick patterns are completely similar to indicators in that the interpretation is the same - find a pattern and decide where the price is most likely to go based on past experience. There are patterns which most likely indicate a reversal of the price, and patterns which most likely indicate a continuation of the current trend.
Candlestick patterns are completely different to indicators in that there is no maths involved. It's simply finding patterns amongst the bars themselves.
The theory is that the bars tell a collective story of traders' moods. Imagine a long white candlestick, where the open equals or is near the low, and the high equals or is near the close.
We can deduce that during the period of that bar, buyers kept pushing the price higher and higher. In such a buoyant atmosphere, you would expect the price to continue rising.
Now imagine a long candlestick where the open equals the close, somewhere in the middle between the high and low.
In this bar there are 2 possibilities. Either (a) buyers pushed the price as high as they could, only to be overcome by sellers who pushed it as low as they could, only for buyers to come back and eventually they finished back where they started; or (b) sellers went first, were overcome by buyers, but then came back and eventually they finished back where they started.
Both scenarios highlight 2 things:
There are about 100 candlestick patterns available for use in our automated trading software. A good explanation of some of them can be found at Incredible Charts.
Follow these links for explanations of the head and shoulders pattern, triangles and wedges, triple tops. There's a bunch more.
These are similar to candlestick patterns, although chart patterns normally involve a whole lot more price bars, and a whole lot more discretion. That is to say, these kinds of patterns are better spotted by humans than computers. They are not used in our automated trading software.
What we have shown above is just a small part of what is needed to make a complete trading system. In essence, we only showed you how to decide on entry rules. Entry rules are important no doubt, but they are only one part of the whole.
Once you have decided when to enter, you then need to know where to enter. You also need to know where you want to put your initial stop loss. And so on. After you have finished reading this "trading basics" series, please head over to this FAQ on how to set up trading systems.
A stop-loss is the most important tool in your trading survival kit.
Not all trades are going to be winners. You need to prepare yourself mentally for that. You are going to lose money sometimes. Maybe often.
It doesn't matter though, if you win more than you lose.
In one sentence, all other nonsense removed, that is the aim of the game - win more than you lose.
Because as I said, you are going to lose. This is important. Have I stressed this enough yet? :-)
When you open a trade and the price starts to go against you, the question is always "do I get out now, or is it going to come back?"
And the answer is always "it's going to come back" :-) Because we hate to lose, we hate to lose money, and we hate to admit we made a mistake.
But there has to be a point where you concede you made a mistake. This is a price that you have worked out before entering the trade. How this price is calculated will be talked about later.
What's important is that you have the entry price X, the stop loss price Y, and that you tell your broker both of these when you open the trade.
The stop loss should definitely not be just tucked away in your head. You don't want to wake up in the morning and find that the price has gone well past your mental stop loss.
So if the price does keep going in the wrong direction, while you are saying "it's going to come back", your broker will automatically execute the stop loss when it reaches the price you specified.
It's a method of enforced trading discipline. Emotions are going to muck with you, and we just got around the problem of staying in a losing trade too long.
Never move a stop loss to where it would be risking more money. Stop losses can be moved in order to lock in profit, or to risk less, but never to risk more.
In this first example, we're going to purchase 1 contract (100K units) of EURUSD. The current rate is 1.2345.
Remember that in "EURUSD", the ordering of first "EUR" followed by "USD" means that you are buying EUR using USD.
The real question is then, "how many US dollars is it going to cost me to buy 100K units of EUR?" And because the Euro is a little stronger than the US Dollar at this time, it's going to cost you more than US$100K.
If you buy 1 contract (100K units), and the current EURUSD price is 1.2345, the purchase price is:
1.2345 x 100K = US$123,450
So the contract value is US$123,450.
If the price of EURUSD then went up 1 pip to 1.2346, the new contract value is:
1.2346 x 100K = US$123,460
We can therefore come to the conclusion that, if you buy 1 contract (100K units) of EURUSD, you gain US$10 for every 1 pip move upwards, and you lose US$10 for every 1 pip move downwards.
And in fact, this rule holds true for any currency that ends in USD. E.g. AUDUSD, GBPUSD, NZDUSD.
For AUDUSD, the Aussie Dollar is currently weaker than the US Dollar, so you would expect it would cost less than US$100K to purchase 100K units of AUD:
0.6789 x 100K = US$67,890
To summarise, when USD is last in the pair, and you are purchasing 1 contract, simply multiply the rate by 100K to get the contract value (the purchase price in terms of USD). And remember that each pip is worth US$10 to you.
If the currency starts with USD, such as USDJPY, then remember that you are buying USD with JPY. So now the contract value is in JPY.
123.45 x 100K = 12,345,000 Yen
What does that mean for you if your account is in USD? Well, you know the USDJPY rate - it's 123.45 in this example. So to work out how much 12,345,000 yen is in terms of USD, just divide it by the rate:
12,345,000 / 123.45 = US$100K
Which should not be surprising. Because we were purchasing 100K units of USD, and 100K units of USD tends to work out to cost US$100K :-)
What fluctuates though, is how much each pip is worth to you.
Remember that when you buy 1 contract, and USD comes last, each pip is worth US$10. When USD comes first, each pip is actually worth $10 of the other currency (1000 Yen in this case):
1000 Yen / 123.45 = US$8.10
That result hopefully makes sense. If the USDJPY rate is 123.45, it means the USD is stronger than JPY. So 1000 Yen should work out to less than US$10.
If the Yen was stronger, e.g. at 95.67, then the USD per pip (when you buy 1 contract) becomes:
1000 Yen / 95.67 = US$10.45
So how much you win or lose per pip actually changes as the rate changes, when USD comes first in the pair. But the contract value in terms of USD does not change.
Let's go with AUDNZD for this example, with the rate being 1.2345.
With AUDNZD, you are buying 1 contract of AUD with NZD. The contract value is going to be in NZD:
1.2345 x 100K = NZ$123,450
So it costs more than NZ$100K to buy A$100K. Which makes sense because the Aussie Dollar is currently stronger than the New Zealand Dollar.
To get that contract value of NZ$123,450 back to USD, now you also need the NZDUSD rate. Let's say it's 0.5678. USD is second in the pair, so the contract value in terms of USD is therefore:
NZ$123,450 x 0.5678 = US$70,094.91
With USD being stronger than NZD, it makes sense to me that NZ$123,450 is about $US70K. And I have to let you in on a little secret here - while I've been writing this article that's always how I've checked if what I'm doing is correct or not - "does the result make sense?".
The end result is that to buy 1 contract of AUDNZD at 1.2345, it costs US$70K.
Why are we converting back to USD? Because most people have their currency accounts denominated in USD. If yours is not, you would hopefully take the knowledge gleaned from above, and work out how to convert the contract value from NZD into whatever currency you use.
Should you buy 10K units instead of the full contract, divide both the contract value and how much you win or lose for each pip or down, by 10.
Should you buy 1K units instead of the full contract, divide everything by 100. So yes it only costs US$678.90 to buy 1K units of AUDUSD, but also you only win US$0.10 for every pip gained.
Because you can only buy as much currency as your account balance allows.
With shares it's easy - 1000 shares at $50 each means you need $50K in your account if you want to buy that many.
With currency, as demonstrated above, there's a bit more to it.
The good part is you don't really need to do the calculations if you are not so inclined. You could simply try and place the order without checking your account balance first. If you don't have enough in your account, you're broker won't let you place the trade. A bit lazy, but sometimes there's just not enough time.
Because you need to work out how much you're going to lose if your stop loss is hit.
You don't want to place your stop loss based on how much you're going to lose though. Prices move up and down all the time, and as such you need some wiggle room between the entry price and the stop loss. If you place the stop loss based on how much you are going to lose, it may well end up in striking distance of an average-sized "wiggle".
Instead, you should calculate by some other means where the stop loss should go (in broad strokes, determine the normal wiggle size and put it just outside that range).
Essentially, it's a loan.
You can trade shares on margin as well, but you probably need to take out an official "margin-lending loan" with a bank. They'll give the money for the express purpose of buying shares. And maybe they'll give rules on which shares you're allowed to pick from.
With currency, when you open an account with a forex broker, you are automatically granted this "loan".
What it means is, you can buy a lot more currency than you have actual dollars of your own.
From the example above, it cost US$123,450 to buy 1 contract of EURUSD. Maybe you don't have US$123,450.
But if your forex broker let you trade on a margin of 1:10, it would cost you only $12,345 of your own money to buy that contract.
If your broker let you trade on a margin of 1:100, it would cost you only $1,234.50 of your own money to buy that contract.
Yes, a bit over a thousand dollars of your cash can buy US$123,450 of Euro.
It's very easy to lose all of your money :-)
Remember how when you buy 1 contract of EURUSD, one pip up makes you US$10, while one pip down costs you US$10?
You spent $1,234.50 to buy that 1 contract of Euro. How's this calculation for you:
$1,234.50 / $10 = 123.45 pips
That's right - if the EURUSD rate dropped by 123.45 (let's say 124) pips, all your money is gone.
I just pulled up a chart of EURUSD and am looking at daily bars. I picked an average-looking one. It opened at 1.2867, and closed at 1.2752 - a drop of 115 pips in one day in an average-looking bar. Your 124 pips could easily be taken out inside a day.
Well, let's say that all you had was $1,234.50, and you purchased the 1 contract of EURUSD at 1.2345 using a margin of 1:100. It used up all of your account balance.
When the rate came down by 123 pips, you now have only $4.50 of account balance left. When it fell the next pip, now you owe $5.50. As the rate continues to fall, you continue to owe more and more. That's the catch with margin lending.
About the owing-money-thing, that's actually only theoretically possible - it's not possible practically. If you owed money to your broker, they would have to be able to get that money from you somehow. When banks lend money so you can buy a house, they can take the house off you if you don't make the repayments. But with currency trading, you could be, and probably are, in a completely different part of the world to the broker. They don't want to be in the debt-collecting game. So they will have procedures in place to sell your 1 contract for you, automatically, if your account balance falls to zero (or close to zero).
So, practically, you're only able to lose 100% of your account balance. I'm sure that's a big relief for you :-)
The mistake we made above that made us lose our 100% was that we bought 1 contract when we only had $1,234.50. We should have gone for something a lot smaller, like 1K or 10K units.
Using a stop loss, and by purchasing the correct amount of units, you can ensure that if your stop loss does happen to be taken out, your monetary loss is limited to a particular percentage of your account. 2% is often quoted as a good figure to risk on any one trade. Risking 2% is not risky at all in terms of your trading survival.
I have to conclude then, that currency trading is not that risky, compared to other types of trading. We can limit our risk on a trade to 2% of our balance if we want. But if you're an idiot then sure, you could lose all your money quite quickly. I'm not sure how this any different though to the stock market. Even walking across the road is risky if you do it wrong.
For the exact method to keep your risk to 2% (or whatever percent, which should be decided by you and you alone), you need to keep reading.
Once you know the price where you want to enter a trade, and you have calculated where you want to put the stop loss, do this:
So, you want to risk $52.50, and there are 15 pips between the entry price and stop loss price.
From these numbers you can work out how many units to purchase.
It varies though between currencies. It goes back to the calculations above of how many US$ a pip up or down is worth.
Those calculations were when 1 contract (100K) was purchased. What you need to do is alter the actual number of units to purchase until you are risking a maximum of $52.50.
Taking the simplest example - where USD comes second in the pair - buying 1 contract means 1 pip is worth US$10.
If we bought 1 contract of EURUSD, say, then losing 15 pips would be losing $150. That's too much. We have to buy less than 1 contract.
Instead we go like this:
$52.50 to risk / 15 pips = $3.50/pip
We want to risk $3.50 per pip. It's $10 per pip when you buy 100K units, and so in this case it's the ol':
$3.50/pip is to ? as
$10/pip is to 100K
And the answer is 35K units. The numbers are not always so nice though - just make sure you're risking a maximum of 2% (in this case).
At Oanda, you can buy 35K units. You can also purchase 35K units at brokers that offer 1K unit purchases.
But if the broker only allows purchases in chunks of 10K units, then you can only purchase 30K units. Because you want to risk a maximum of 2%, so you can't buy 40K units.
If the broker only allows purchases in chunks of 1 contract, then you cannot take this trade - you'd be risking more than your maximum % if you did so.
When we calculated the number of units to purchase, we didn't actually use the margin rate anywhere. (The margin rate being the "1:100" thing).
To say it another way, the margin rate is therefore not important when calculating how many units to purchase. It is also not important when calculating how much we will win or gain on a trade.
It is only important when calculating how many units we can purchase.
Because we bought 35K units of EURUSD, we will win or lose US$3.50 per pip regardless of if our margin rate was 1:10 or 1:100.
But margin rate tells us "can we buy 35K units?". The separate question of "should we buy 35K units?" is between you and your life-partner :-)
A margin rate of 1:100 is only risky when you abuse it and buy too many units relative to where your stop loss is.
How many units you purchase, and the distance between your entry price and the stop loss, are all important.
It shouldn't take long to create an Excel spreadsheet or something to help you do these calculations.
With shares, the price of a particular stock is the same regardless of the broker you use. Because there's a central clearing house. You send the order to your broker, they then send it to the central clearing house. Buyers and sellers are matched up, and shares transferred. The price at which the transaction took place is reported back to all brokers.
You paid brokerage/commission to your stock broker. That's how they make money.
With currency, each broker is its own clearing house. You send the order to your broker, and they go off to the wholesale market and buy what you asked for.
You may not have paid any brokerage nor commission to your forex broker. The question is then, how do they make money?
And the answer is perhaps three-fold (although I'm happy to be corrected):
You have to buy at the highest price (the ask), and sell at the lowest price (the bid). The difference, which is called the spread, is what the forex broker gets.
What keeps this spread low is competition. If one broker has high spreads, and another low spreads, generally people flock to the one with lower spreads.
What keeps this mark-up low is the competition between forex brokers.
There are often stories of disgruntled customers who say they won big initially before their broker "noticed them" and started trading against them. What this suggests is that winning traders make the broker lose money, so they are targeted. Because the broker knows the customers' stop loss, and because the broker essentially sets the currency prices, they can manipulate the price to take out somebody's stop loss. (But I have to think that there is more to it than that, surely? Otherwise these brokers would be relying on a constant influx of new customers).
This verges on conspiracy theory stuff, so don't take it as gospel. But the issue is big enough for some brokers to offer no dealing desk, or straight-through, or ECN trading. They all mean the same thing - that orders are routed directly to the wholesale market so there is no chance (little chance?) of manipulation by the broker. You would probably pay brokerage/commission to such forex brokers, just like when you buy shares.
Hopefully you can see, especially from points #1 and #2, why the price of a currency might be different at different brokers. It's just like the price of lettuce between one grocery store and another - the prices will be roughly the same, and often exactly the same, but sometimes there will be differences.
Some people try to take advantage of these minor differences. This is called scalping.
Actually, scalping has two definitions.
One is where you try to take advantage of the minor differences in the prices of the same currency between two or more brokers.
This is expressly disallowed by all brokers (I'm pretty sure). It's written in their terms and conditions.
The other definition is where, using the one broker, you try to take advantages of small movements in the price of a currency. As far as I know, this practice is fine. The only downside to it is that you are trying to capture a movement of a couple of pips, and each time you open a trade you have to at least beat the spread, which is also a couple of pips.
You don't need to own stuff before you sell it. And seriously, you don't even need to understand how that works. So you could skip the next couple of paragraphs.
Take for example GBP/USD. This is the Great Britain Pound (GBP) vs the United States Dollar (USD). Remember that the ordering is important. When you buy "GBP/USD", what you are actually doing is buying GBP using USD.
Let's change the example a little, to bring it back to something we do everyday. Instead of "buying GBP using USD", let's say we are "buying food using money". When you buy food, you hand over cash. You keep the food. You lose the cash. You are essentially buying food and selling cash.
Now think about it from the store's perspective. They sell the food, and get the cash. They are essentially buying cash with food.
So originally we had:
You - buy - food - lose - cash
They - sell - food - get - cash
And that can be changed to this:
You - buy - food - sell - cash
They - sell - food - buy - cash
And if we revert that back to our currency example:
You - buy - GBP - sell - USD (which is going long GBP/USD)
They - sell - GBP - buy - USD (which is going short GBP/USD)
When you go long, there is always a counter-party going short, and vice-versa.
And that is why you can sell (go short) a currency without owning it first. Because to go long GBP/USD is buying GBP with USD, and to go short GBP/USD is buying USD with GBP. You're actually buying in both instances.
Now you're going to say "But the money in my account is in Aussie Dollar! How do I use USD to buy GBP, or GBP to buy USD??". And the answer is, don't worry about it :-) Your broker will do some magic behind the scenes.
You can sell shares without owning them, but this is only possible on some exchanges, and only if your broker already owns those shares.
What your broker does is lend you those shares, and then you sell them. That's how you can sell shares without owning them - you are actually selling someone else's shares!
Hopefully for you the price goes down. Later you buy the shares back so you can give them back to your broker.
The normal order of events is of course to buy shares, then sell them at a higher price.
When you think the price is going down, however, you still do the buying and selling, but you do it in the opposite order. First sell, then buy. This probably sounds weird, but remember that you are selling someone else's shares. So really the order of events is:
In both cases you want to do the buying at a lower price, and the selling at a higher price.
Hopefully you now understand that you can make money whether the currency or share price is going up or down. You should no longer care when the news tells you that the share market crashed, or if it's booming. All you need to do is be on the right side of the trade. If you think the price is going up, you buy (go long). If you think it's going down, you sell (go short).
You need two things for a backtest:
What you do, bar by bar of the historical price data, is use your trading system to determine whether you would have entered a trade, how much you would have bought, at what price, with what stop loss, and at what time.
You then work the trade through to its completion, at which time you start looking for the next time your trading system said you would have entered a trade.
At the end of the backtest you would have a list of theoretical trades. Each one would win or lose money. Remember these are trades you would have taken in hindsight.
Add up the win/loss amounts, and decide whether those trading system can be tweaked in any way to improve the theoretical performance. If you do tweak the system, go back and do the backtest again to see if the changes were actually better.
Doing backtesting is by no means a guarantee of future earnings though - markets can, and do, change personality.
Take this scenario though - you come up with a trading system, backtest it, and find that it consistently lost money. Would you use that trading system to trade real money?
If the trading system seemed profitable, the next step is trading it in real-time in a demo account.
All forex brokers' prices are slightly different to each other. So it's best, if you can, to backtest using price history from that particular broker.
You should also be careful of indicative price data. This is price data that can be described as "this is roughly what you would have paid". Currency prices are quoted in terms of both a bid price and an ask price. Indicative prices just take the average (I think). If you backtest using indicative prices, the spread would not be taken into consideration, and your backtesting results would appear more profitable than they actually should be.
When you buy some currency, you will either be paid or have to pay interest. Remember with going long EURUSD, you are in fact buying EUR and selling USD. Well, as it turns out, each of those has an interest rate attached to it. As a very simple example, let's say buying EUR means you are given 10% interest (on the total amount you bought - not just on the margin you used). And let's say selling USD means you have to pay 8% interest. You get the difference: 10% - 8% = 2%. So you get 2% interest on about US$123K of currency. And you get that regardless of if you lose or win money on that particular trade.
But if you went short EURUSD, you are doing the opposite. So, and remember this is just a simple example, you would have to pay 10% interest on the EUR, and you would get 8% interest on the USD. You get the difference: 8% - 10% = -2%. In other words, you have to pay 2% interest, regardless of if you lose or win money on that particular trade.
The interest rates are not symmetrical like that though. Banks never pay the same interest that they ask for. So if you were given 10% for EUR and asked for 8% for USD (making a difference of 2% which you get), then the opposite would probably be more like pay 12% for EUR and are given 6% for USD (making a difference of 6% which you have to pay).
Here's the good part - sometimes the difference in interest rates is so great that you can get a WHOLE LOT of interest. Like 250%!
And this leads people into a type of trading called carry trading.
Basically, buy and hold. The trader earns their money from the interest. If the currency goes in their favour, they will get the profit from the trade plus the interest. If the currency doesn't go in their favour, their loss from the trade will be offset somewhat by the interest.
Which currencies are best for this? It changes when a country's interest rate changes, and in the recent economic climate many countries have been lowering their interest rates dramatically in order to boost spending. You're looking for the biggest difference in interest rates, so you want a country which has a high interest rate versus one with a very low interest rate (normally Japan, so check out GBPJPY, AUDJPY, etc).
A trading system is just a set of rules which very basically tells you the following:
Here's an example:
In this case, either the price will go up 50 pips and we'll exit at market for a profit, or the stop loss will be hit and we'll take a loss.
That is a trading system. A very simple one, but everything we need is laid out in black and white.
Moreover, the rules are not subjective at all. There's nothing in there that says "if it's in a down-trend", or "if the simple moving average looks like it's about to turn down". Each rule could be calculated by a computer, which is what you want.
(n.b. sometimes it's very easy to tell when a stock or currency is "in a down-trend", and sometimes you're just guessing. I don't like guessing).
How about we try to increase our chances of a profit? What we're going to do is modify our trading system so that we use a trailing stop loss.
A trailing stop loss means that instead of just setting the stop loss at the time we place the entry order, what we're going to do is move the stop loss up until eventually even if it was hit we would still make money.
The trading system becomes:
Which might be something like:
And trading systems grow like this to be as simple or as convoluted as you think necessary.
The main points about trading systems are that:
No interpretation of what you've written should be required, nor indeed should it be possible for one person to interpret your rules differently to another person. If you can do computer programming, or you know a friend or next-door neighbour's kid who can do it, you or they should be able to program the rules into a computer.
This makes the rule "in a down-trend" an invalid rule. Instead you have to specify an objective way of calculating a "down-trend". And that might be as simple as saying:
Which of these rules works best, if any, takes us back to backtesting :-)
Perhaps the easiest thing to do is open a demo account at a forex broker.
Opening a demo account at FXCM is extremely simple:
They'll send you an email with your new demo account details. Inside that email are instructions on how to download and use their software.
Click around in the software and make some trades. It's a demo account so you can't do anything wrong. After a while you'll be a pro at buying and selling.
You've probably already read some books. Or a bunch of websites. Or maybe you bought some trading system for $49. Write down your rules. At this point just choose anything, because trading in a demo account has no risk. If the trading system doesn't work, change it. If it does, please send it to us :-)
Make sure you follow your rules.
Made some money in your demo account? We all do :-) Rush off now and open a live account and put some of your savings into it.
Yeah... hopefully you stuck to your 2% rule and didn't lose too much. But how was it possible you lost so consistently? Puzzling.
You went through all the emotions, right? Fear, greed, anger, paranoia (was someone watching you, or what?!), and so on. Good.
And so you opt to buy some software which can do the trading for you, following your rules, but using none of your emotions. Moreover, you don't need to be a programmer to use this software, because all the setup is done with your mouse.
Congratulations. It takes years for some people to come around. You have taken a giant shortcut.
Here's more information about our Automated Trading Machine. And you can download it from here. It'll even do the backtesting so you can experiment and come up with new and exciting trading systems. Read how to get started.
Trading, for us, is about minimising risk. And to minimise risk, we follow an incremental approach. The very last step being full-on trading. I mean it makes sense when you say it like that, but it's amazing how often people just jump straight in. (Don't do that).
These steps below will help to minimise your risk. And these are the steps to success:
You've probably read a number of trading books and websites, and in each one there'll be some kind of disclaimer such as "past performance does not guarantee future results".
If this is the case, which it is, then what is the point of backtesting?
Firstly, backtesting can show to you that your idea was an outright dud. I mean, if backtesting shows that your trading system would have lost hundreds of thousands of dollars over the course of a year, surely you aren't going to use that trading system in the real world.
Secondly, you can rank your different ideas against each other, and choose the best of them.
Most importantly, I think, is that while you aren't going to be able to use your backtesting results to predict exactly how much money you'll make in the future, it should be a rough guide. (But only if your backtesting mimics the real world as closely as possible). Sometimes markets do change personality overnight. Most of the time, however, they behave as they did before. Looking at charts for just a brief time, you should be able to see that EUR/USD behaves differently to USD/JPY behaves differently to USD/CAD. They all have their own unique personality, and it's only a matter of working out how to profit from what you can see.
Now that you've settled on a trading system to use, the job of proving to yourself that it is actually profitable is not yet over.
Sometimes your trading system will actually not be physically tradeable in the real world. Maybe it relied on your broker filling your orders at specific levels during major announcements. Maybe the results were skewed heavily by one or two fantastic trades, with all the others break-even or worse.
So, the next step is to Paper Trade. This means one of two things: (a) you do absolutely everything the same as if you were really trading, except instead of placing the order you just write it down on paper; or (b) utilising a demo account where you can place real orders, but no actual money is at stake. Currency trading has this advantage that most brokers offer demo accounts.
Now you can see if the backtesting results match reality. If not, then you start at the beginning. If so, you move on to trading in small volumes.
The amount of time spent paper trading is up to you. Essentially you're just verifying that your backtesting was correct, this is a profitable trading system, and you are actually able to trade it yourself.
A word of warning though. After your backtesting has shown good results, you are likely to believe this trading system works. You are therefore going to pay more attention to evidence that backs up what you already believe. And I can almost guarantee that you are going to get a fantastic result from one of the first trades you do on paper.
When that happens you are going to kick yourself that you didn't actually use real money on that trade. You hop straight into real trading, and then come the losers. A dangerous place to be. You believe the trading system works, so you put up more money to win back what you lost. And still the losers come until your trading bank is all but gone. It's very difficult to recover emotionally from this. And that's where the trading life of most people ends.
Don't do just 1 or 2 paper trades. A minimum of 20 paper trades seems to be recommended by the experts. Do not fall into the trap of considering the profits you made while doing those 20 paper trades as "money lost". Most businesses need money paid up-front before the store can open its doors. The money you won while paper trading, which you didn't actually get to put in your bank account, is your startup fee.
After paper trading has gone successfully, now we can move to trading with real money. However, we are going to start very small.
Now that you are using real money, suddenly our old friends fear and greed come to town. Suddenly you're tinkering with the rules after each loss, based solely on that one trade. "Oh, if I add a 5-day EMA I wouldn't have gotten in on that one!". Tinker, tinker, tinker, and suddenly your trading system doesn't resemble the one you backtested. You lose more money and tinker further. It's a downward spiral.
This is why the paper trading is so important. Without fear nor greed you have demonstrated to yourself that your trading system works. It should cement in your mind that sure, losses do happen, but your rules are solid and the winners are bound to come. Therefore there is no need to tinker.
And, because we are trading in a mini account, or with very low volume, actually we aren't losing so much money if the trading system turns out to be a dud after all. Or perhaps the trading system is solid, just you can't trade it when real money is at stake due to psychological problems. It happens.
You backtested. You paper traded. You traded in small volume. Everything went well. This last step continues forever. If you always risk 2% of your trading bank on each trade, and if your trading bank continues to grow, then you are incrementally increasing the size of your trades. And with increased size of trades comes increased profits. And so on, and so forth. Congratulations. Depending on the website you read, you are amongst the 5-20% of traders who have made it. The other 80-95% probably didn't follow the steps here.
Adding automated trading software (or a "trading-bot") does so many wonderful things for your trading, most notably the removal of the fear and greed part. However it also adds another risk area. You are entrusting this trading-bot with your money. Surely you want to ensure that it's going to do the right thing. So during paper trading, not only are you ensuring that the trading system is profitable, you must also ensure that your trading-bot handles a variety of situations.
Does the trading-bot buy when you expect it to? Does it sell when you expect it to? Does it move your stop loss like you told it? What happens when the Internet connection is broken? Power goes out? When the power comes back and the Internet connection restored, does it open another trade when really it should just be managing the one that's already there? Does the trading-bot always use stop-losses? What happens if it doesn't set a stop-loss, the power goes out, and you're at the beach drinking beers?
Test these scenarios while paper trading. If the trading-bot passes all tests, you can let it go in your real trading account with little worry. And then go to the beach and drink beers.
Obtaining lots of money in a short time is very possible with trading. If, that is, you want to risk all your capital on a couple of trades and get lucky.
But staying in the game for a very long time, which is hopefully your goal as well as ours, requires that risks are reduced as much as possible. Everything in the software tries to decrease your risk.
Because the software is, well, software, it has no fear nor greed. The results of the previous trade, wildly good, or wildly bad, will not affect the decision-making for the next trade in any way.
If you read this article on Opening and Closing Trades In The Same Bar, you'll see that there are a couple of outcomes possible while backtesting. This software assumes the worst, giving you the peace of mind that the backtesting results aren't too good to be true.
This software forces you to use a Stop Loss. This means that at the time the order is set, your total risk is known and limited. It also means if your Internet connection is cut for any reason, the worst that can happen is your stop loss is taken out (i.e. your entire account balance will not be at risk).
For a long trade, that is, stop losses never move down. For short trades, the stop losses never move up. Doing so would mean your risk would increase.
What's required to get a computer to do the trading for you
Firstly, let me say that I am interested only in mechanical systems. "Mechanical" as in "no interpretation possible".
Secondly, you shouldn't just take some advice you read on the internet and apply it to your particular situation. You should experiment first. Does what I say make sense? Does what I say make sense for you? Does what I say bring you increased profits? Decreased losses? Lower risk? The opposite?
This information is free. Do you get what you pay for? Or are the best things in life free? That's your decision. In short, I can't be held responsible for what you do with the information I give. I'm just some guy with a website. *You* decided to take action based on what *you* thought was the best way forward.
Finally, I won't be giving "rules" per se. I'll be giving ideas. Ideas for you to play with. To experiment with. To add to your portfolio if you think they're better than what you've got now.
I've bought other people's rules on two occassions. I couldn't get either of them to work for me. I don't consider myself to be unintelligent - quite the opposite. But what I now realise is that trading rules are completely individualised and thus purchasing them is a fallacy. At least it is for me. Other people have probably made quite a bit of money trading those same rules that I couldn't get to work.
So what I think should happen when you go to a seminar, etc, is that you are given a bunch of ideas. Then you mix and match to suit your personality. Of course, it helps if the system you decide upon is profitable :-)
A quick recap of terminology:
A trading "rule" is something like "RSI in overbought".
Many rules combine to form a trading "system".
However, a system is not just about the rules for when to buy and when to sell. There's also rules for how much money to use, times of day you shouldn't buy, and so forth. These extra bits are so very incredibly important, and these are the things which prevent the loss of all your capital.
Briefly, a complete system should have:
Entry Rules specify exactly when an entry signal is generated.
"Buy when the high of the most recently finished price bar is higher than the previous bar" is an example. On a daily chart, this rule would translate to "buy when today's high is higher than yesterday's".
Note that the entry price has not been specified - that's for the next post. At the moment we are dealing with "Yes we can enter a trade" and "No we cannot" only (and maybe a direction for the trade, but sometimes the Entry Price we use does this for us. I'll explain about this more next post).
You might have a whole bunch of Entry Rules: "Buy when the today's close is above the 20-day moving average" "Buy when 20-day moving average is above the 30-day moving average"
Etcetera, getting more and more complicated.
ALL of the Entry Rules must be satisfied for a trade to be allowed. If you have the word "OR" in your system, essentially you have more than one system.
For example:
"Buy when the today's close is above the 20-day moving average"
OR "Buy when 20-day moving average is above the 30-day moving average"
That is actually two systems - one where you can buy when today's close is above the 20-day MA, and another where you can buy when the 20-day MA is above the 30-day MA.
There's no problem with this, but I'd split them out to 2 systems so you can better judge each rule's effectiveness. If you kept it as 1 system and things go wrong, how can you tell if it's the first Entry Rule that's stopped working, or the second?
The result of adding all the Entry Rules together is a simple Yes/No answer (again, and maybe a direction for the trade). Yes - we are allowed to enter the trade. No - we are not allowed.
Sounds simple, but if it is so simple, why are we sometimes in the state of "I'm not sure"?
Your system might even specify a further rule to cover this case: "when you're in doubt - don't trade". But if the Entry Rules are specified clearly, how can there be doubt? It could only be if the system was not mechanical - if there was some subjective aspect at play. Mechanical systems have rules that you, me, your neighbour's kid, would all come up with the same answer. Systems with some kind of subjectiveness often have this "if in doubt get out" clause.
Support and Resistance (SR) lines are often the culprit.
SR lines look objective at first, but they can be placed at different prices by different people. They can be placed at different prices by the same person on different days. Unless there are mechanical rules on how to determine the location of SR lines (unlikely), they are subjective.
"Divergence" of the price from a specified indicator is also rather subjective. Divergent over what time period? Divergent by how much? If the stock price goes up a lot, but the indicator goes up only a little, is that divergence?
"Only trade in the direction of the trend" is another good one. In one of the systems I bought, a rule was "the trend is defined by the 3-month chart looking at daily candles". Easy to judge if the chart starts at the bottom left and ends at the top right. But what if it goes down for 6 weeks, and then up for 6 weeks, kind of finishing flat over the 3 month period? What's that trend - flat or up? What decision would you make if all of your other rules were screaming out for a trade entry?
The next system I bought clarified this - "If the close is above the 20-bar MA, it's an up-trend. If below, it's a down-trend". And there you have why I gravitate to mechanical systems - two systems involving "the trend", one was subjective, the other objective. One leaves you in doubt when things aren't clear cut, the other makes things rather simple.
You (well, I) need a trading system that is written down somewhere. Kind of like a checklist. Exactly like a checklist. Before entering a trade, all the Entry Rules *must* be satisfied. All of them. You can't ignore Entry Rules. If you've got 10 of them, and just 1 fails, there is no trade. There is no point to have the 10th rule if you're going to ignore it. If you want to drop it then backtest your system with and without that rule. If you get better results without it, then you can remove it. But you can't remove it just because it's in the way of a trade you want to take.
Because the rules are mechanical, there will not be much thought required. You've already backtested the system and the results were good. Now just tick off each rule. One rule not satisfied is enough to prevent the trade. All ticks means you can enter.
But at what price? That's next time.
You'll need to experiment. You can come across possible rules on websites, at seminars, in books, in lots of places. The short of it is though, that you have to experiment yourself so you can be satisfied.
Here's the thing - each and every indicator is included in someone's profitable system, somewhere. Guaranteed. It doesn't actually matter too much whether you stick with simple moving average crossovers, or you want to use Bollinger Bands, or Stochastics, or whatever. There'll be a way to squeeze whatever indicator you want into a profitable system. The key, I think, is experimentation and backtesting.
Here's another thing - some people swear by trend-based systems, and others believe break-out systems work, and others think everyone else is wrong and only scalping works in today's market.
It's similar to how some people swear by stocks, and others by real estate. Actually both work, but some people are more suited to one than the other. If someone tells you why real estate is so much better than stocks, it simply means they couldn't get stocks to work for them. Maybe you can. A lot of money is made everyday in both.
And so I can guarantee that there are profits to be made using all three methods - trend-following, break-outs, and scalping. If someone says one is better it means they couldn't get the other two to work. Maybe you can.
The test for Entry Rules is done by placing arrows on the chart. How close to peaks and troughs do they signal entries?
Unfortunately, your Entry Rules will probably give you a chart filled with arrows. You'll really need to combine your Entry Rules with your proposed Entry Price in order to really get a picture on what your system would do. More on Entry Prices next time.
This page displays all currently available trading rules in our Automated Trading Machine. We're always adding more. Mix 'n' match.
Okay, so you've got Entry Rules, and they say "yes, you may enter a trade", or "no". Yes or no. If there's a "not sure" in there, "maybe", "it could be", it's not an objective trading system. I'm only interested in objective trading systems (due to my inability to trade subjective ones).
Now we need an exact price at which we will be entering the trade. These are pretty easy. Normally.
For example, "the high of the most recently completed bar". Your Entry Rules say "enter the trade", and your Entry Value says "...when the price hits the high of the most recently closed bar".
Some people like to add a bit, so they know the price has a bit of momentum. For example, "the high of the most recently completed bar, plus 1 tick". Or plus 2 ticks, or 5 ticks, or whatever.
Notice though, that we don't have a direction for the trade yet. Sometimes your Entry Rules will specify the direction, like "enter a long trade if the bar closes above the 20-bar moving average". And then the Entry Values specify exactly where to open that long trade.
Or, sometimes the Entry Rules simply allow you enter a trade, and the Entry Values specify the direction. For example, the Entry Rule is "enter a trade when the RSI with period 14 goes above 70". And if the price hits the high of the most recently completed bar, you enter long at that price. If the price hits the low of the bar, you enter short at that price. In this case your Entry Rules have told you that the price is about to move, but it doesn't know in which direction. Your Entry Values answer the direction question.
Sometimes though, the price is already above (or below) the price that your Entry Values say to enter. What to do then? Do you pass on any trade where you can't get your intended price? Do you get in at any cost? Do you get in, but only if the price hasn't gone "too far"? In that case you need to specify what "too far" means. 20 pips? 50? 100? Backtest.
This page displays all currently available trading rules in our Automated Trading Machine. We're always adding more.
Alrighty, Entry Rules say "yes or no", Entry Values set the price to enter, now we need an Initial Stop Loss Value. That is, at what price do we admit that the trade did not do as we thought? At what price do we cut our losses?
I've heard some people don't trade with stops. They reason that the stops are too restrictive, and are actually more likely to make people lose money. But I couldn't do that. First, too scary, and second, they'd be relying on some kind of intuition as to when to get out. I don't do intuition.
Stops also allow us to define in exact terms, how much are we risking on this trade. Sometimes there is slippage though, and so you might lose a bit more than you thought.
Anyway, the beauty of forex is that the stops are automatic. The worst trade I ever did was with Options. The price was already below my Initial Stop Loss Value. But I just couldn't call the broker to get out. "It'll come back" I kept saying, as the price kept falling. Automatic stops take away that problem. When the price hits your stop, you're taken out of the trade. Perfect.
So, where are we going to put that puppy? We need to give the price enough wiggle room. On the other hand, we don't want to risk too much. It's backtesting time.
Possible values are essentially the same as for Entry Values. High, Low, Close of current bar, the value of a moving average, the lower bollinger line, low of the last X bars, etc. You can also use a specific number of pips below (or above) the entry price.
This is optional. You don't always need an Initial Take Profit Value.
There are two ways to exit the trade - either your stop is taken out, or the take profit is hit.
Your Initial Stop Loss Value will always be, for long trades, below the Entry Value. Obviously.
Sometimes you rely on your Trade Management Rules (next article) to gradually move your stop loss from that loss position, to a break-even position, and eventually to a spot where even if your stop is taken out, you will make a profit.
Or, you can have a Take Profit set. Your trade will be closed at a profit if that level is hit. Or you could do both. Anyway, Take Profits are optional, but only if you have Trade Management Rules which will eventually move your stop to a profitable position.
Initial Take Profit Values are exactly the same as Initial Stop Loss Values, which are essentially the same as Entry Values. High, Low, Close of current bar, the value of a moving average, the lower bollinger line, low of the last X bars, a specific number of pips above (or below) the entry price, etc.
As I said in a previous article, to obtain profit from a trade, you either have a take profit set, or you gradually move your stop loss to a position of break-even (if you want), and then to positions above your initial entry.
When you are relying on the stop loss being moved above the initial entry point, that's where Trade Management Rules come in. As with everything else, I believe they need to be explicit and objective.
In the example trading systems I gave, you'll notice the Trade Mgmt Rules I gave were something like:
Long - S/L Mgmt Rules: Every Bar
And the Trade Management Value was (for example):
Long - S/L Mgmt Values: Low Of Previous 50 Bars
If we are trading a system manually (i.e. no computer involvement), then the rule for setting and moving the stop loss would probably be written something like "The stop loss is, and remains at, the low of the previous 50 bars".
But when you're making a computer do this for you, it must be specified exactly what that means. And what it means is "every bar calculate the low of the previous 50 bars. Use that as the new value of the stop loss". So I made a "Every Bar" rule, which of course evaluates to "True" at every bar. Without it, the stop loss would be set initially, but wouldn't move after that.
Some systems have more complicated Trade Management Rules than that. For example, and assuming of course the period and standard deviations for the bollinger setup are specified, "When the price closes above the upper bollinger line, move the stop loss to the value of the upper bollinger line". In this case, the Trade Management Rule is "close is above upper bollinger line", and the Trade Management Value is "the value of the upper bollinger line".
A close above the upper bollinger line isn't going to happen all that often. But when it does, this system is going to move it's stop to the value of the upper bollinger line. Given that there aren't too many bars that have their low above the upper bollinger line, that trade would probably get closed out the following day, but this is just an example.
Now, while I haven't exactly been thorough on Trade Management Rules and Values in this article, because the possible rules to pick from would be a lot like the Entry Rules and the possible values a lot like Entry Values, they are very, very important.
This is, after all, how we decide when to exit the trade. And exiting is when the profit is made, regardless of how we got in the trade in the first place.
There are some people who believe spending a lot of time on the Entry Rules is futile, that even random entries would work, because it's all in the exit. The thing about systems that you buy is that they focus mostly on the entry. Personally I think it all adds to your probability of success, but certainly the exit is where it either fills your wallet, or empties it.
You enter long and the price goes higher. Do you sell now? Is the price going even further, or is it about to turn around?
You enter long and the price goes lower. Do you sell now? Is the price going even further, or is it about to turn around?
Guess-work. It's why you need a solid trading system, proven over a long-ish period (which varies depending on the timeframe you trade), with clear, objective rules.
When you enter a trade and the price goes against you, that's where your stop loss comes in. You've already set it, hopefully, at a spot where you decided that if it went there, you are prepared to admit you got it wrong this time and take the loss.
When you enter a trade and the prices goes in your favour, your Trade Management Rules now specify when to move that stop loss to lock in some profit. When we set the stop loss initially, we gave the price some wiggle room. Because the price wiggles. We have to keep doing the same thing when we move the stop loss. Set it relatively close and yet relatively far.
And therein lies the problem. Exactly when and where to move the stop loss? Here's where experimentation and backtesting comes in. Buy some of those $49 systems to get some ideas. Try them out. Add rules of your own.
By this time you should have everything needed to specify entries. Look on the chart to see what normally happens after your system entered a trade. If the price continues on in your favour, then retraces 20 pips, then goes on, then retraces 20 pips, then you can't move your stop loss closer than 20 pips away from the price.
If the price seems to always retrace through the 0.382 fibonacci retracement level before heading further north, but it hardly ever breaks the 0.618 except when it's a reversal, then it stands to reason that your stop loss should be just below the 0.618 fibonacci level and not the 0.382 one.
And this is why your Entry Rules can't be random. Because probably your Trade Management Rules are going to change based on what normally happens to the price after you've entered. Random entries aren't going to allow you to work this out.
So, backtest. Experiment. Work out when the price is *most likely* just retracing before continuing on, and when it's *most likely* reversing. Difficult to do, but a worthy task. And then tell me :-)
I've completely neglected this kind of trading systems, sorry. That's where your system is always in the market - if it's not going long then it's going short. In this case you wouldn't need either a take profit or (strictly speaking) rules which move your stop loss.
But, I include to "Exit At Market", which is what you do with your long trade in the stop-and-reverse system when you want to go short, as a Trade Management Rule.
Sure, in forex, if you have 100,000 going long, you could purchase 200,000 going short, which would effectively close your 100,000 long and leave you with 100,000 short. But I prefer to keep my trades distinct.
And so if I create a stop-and-reverse system in my software, I set the entry rules for going short to match exactly the Trade Management Rules of the long, and vice versa, with the Trade Management Value set to "Exit At Market". That way the long trade is closed, and the new short trade is opened.
So now your system has:
You can also have Take Profit Rules and Values, if you use a take profit and you want to move it from its original position.
Anyway, that's what you need for a trading system. Pretty much. Not really rocket science. On the other hand, far better than buying because the newspaper said so and having no defined point of exit.
But there's a couple of bits left. One is Money Management - how much money to risk on a particular trade.
There is also When Not To Trade Rules, which I refer to as holidays. Even if your Entry Rules are signalling a trade, there might be specific times of the day, week, month, or year that you shouldn't get in.
And then there's equity curve analysis - is this just a normal drawdown the system is having, as all systems do, or has the system stopped working altogether? If it's still there, have a look at this chart on the Collective2 website. Gained 500% in a couple of months. But now? It's fallen back to a 100% gain. Is that a drawdown or failure? Stop using the system and bank the 100%-odd profit, or stick with it? Get this right and it won't really matter what rules you use for everything else.
[Edit: That system had a 100% profit at time of writing, then a few weeks later it had gone to a roughly 50% loss.]
I sometimes get suckered into paying the $69 for an e-book detailing a "fantastic" trading system. Each guarantees to tell me why 90% of traders (or 95%, depending on the website) fail, and promises to show me how I can become part of the 10% (or 5%) that succeed.
And there's always a $20 discount if I act within the next 10 minutes, or before midnight, or whatever.
And there's always free extras "worth hundreds of dollars", but only for the next 17 people, or 47 people, or whatever relatively smallish-largish prime number they've decided upon.
Anyway, when I do purchase these books, I do it with the hope that they'll introduce something new to me - a new idea I can play around with. I don't hope beyond hope that the system they describe will do me any good without change. As I said before, I think trading systems have to be individualised for them to work. In my case at least.
Here are the rules for the most recent one. I won't go in to explaining everything. Buy the book. Anyway, this system uses points to determine if a trade is allowed or not. You don't need each item to be true - if you can get 36 points it means you can enter the trade. My theory is, that actually the below describes a whole bunch of different systems - one for each way the rules can add together to equal 36 or more.
Entering on the long side (buying)
This could be made to be objective. You can obviously give a True/False answer as to whether today's volume is more or less than yesterday's. But, you would need to specify for how many days the volume should be increasing. Also, what if the volume is increasing, but is still less than the "average" volume? Is that a buy? To answer yes or no, it needs backtesting.
Ah my old friend, the Support and Resistance lines. I also like the words "bouncing off" and "moving through". What, exactly, do these mean? Oh sure, these are very easy to work out looking at a chart of historical data. But in real-time? Tell me how to program this into a computer and it becomes objective, otherwise, this rule is very very subjective.
Trendlines are just as bad as Support and Resistance lines. If you look at a chart, any chart, you'll see that sometimes there does seem to be very clearly defined places that you can put these lines. You'll also see that the price completely ignores these lines whenever it feels like.
Again we have the words "bouncing off" and "moving through". Look at your chart again. The candles aren't always exactly above or below your lines, right? So how do you decide when a candle has "broken through"? Hindsight allowed you to put that line where you put it, and to ignore the times when the candle moved below the line. The rules change when you're doing it real-time. You don't know if it's breaking through, or if it's another of those candles that doesn't fit neatly with the line.
Wait... does it say *about* to cross?? Oh my god. This rule relies on future knowledge.
Hooray! An objective rule.
Dude. Seriously. "Easily recognizable"??
Price *approaching* the upper Bollinger Band. What the hell does "approaching" mean?
You could make this rule objective though, by using the %b indicator. It gives a value of 0 if the price is at the lower bollinger line, less than 0 if below it, 1 if the price is at the upper bollinger line, more than 1 if above. 0.5 should therefore be right in the middle of the two bollinger lines. So you could say if the %b value is 0.8, then give your 6 points. Or is it 0.9? Who knows? Backtest.
Hooray! Another objective rule.
Most of the candlestick patterns can be programmed into a computer, and are therefore objective.
So there you have it. I guess there are people that can use this system effectively, but I guess my $49 investment is the cost of the preparation to write this article.
A lot of stuff to read, perhaps some examples will make what I'm trying to say clearer.
| 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 |
Reverse for shorts.
Explanation: Whenever the close is below the high of the previous 100 bars, an order will be placed at that high of the previous 100 bars. If the order is taken up, i.e. the price goes above the intended entry point, the initial stop loss will be set at the low of the previous 50 bars.
On the completion of each new bar, the stop loss is re-set at the low of the previous 50 bars. Often this means the stop loss will not be moved, but when it does, it will only move to a position of decreased risk. Eventually, hopefully, the stop loss will be moved to a spot above the original entry price, and that's how this system would make it's money.
| 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 |
Reverse for shorts.
Explanation: Whenever the close is below the high of the previous 100 bars, an order will be placed at that high of the previous 100 bars. If the order is taken up, i.e. the price goes above the intended entry point, the stop loss will be set at the low of the previous 50 bars. The stop loss will not be moved from that point. The take profit will be set at 50 pips above the entry.
This system puts barriers on either side of the entry, and doesn't move them. Either we get our 50 pips profit, or we take the loss.
| Rule Type | Description |
| Long - Entry Rules | Close Above Simple Moving Average (Period=50) |
| Long - Entry Rules | %b (Period=20) Value Must Be Below 1 |
| Long - Entry Values | Price Where %b (Period=20) Would Equal 1 |
| Long - Init. S/L Values | Simple Moving Average (Period=50) |
| Long - S/L Mgmt Rules | Every Bar |
| Long - S/L Mgmt Values | Simple Moving Average (Period=50) |
Reverse for shorts.
Explanation: The %b value specifies where the price is in relation to the bollinger bands. A value of 0 means the price is at exactly the lower bollinger line. A value of 1 means it is at exactly the upper bollinger line. 0.5 is in the middle, etc. I could have just used the "Upper Bollinger Line" value in this case, but %b allows greater flexibility when it comes to experimentation.
This system has two Entry Rules. Firstly, the price must close above a moving average with period 50. It must also be below the upper bollinger line with period 20. When both of those rules are true, an order will be set at the upper bollinger line.
Should the price rise above the upper bollinger line, our order will be taken up, and the initial stop loss will be set to the value of the moving average.
With the completion of each new bar, the stop loss is adjusted so it remains at the same price as the moving average. However, my software does not allow stops to be moved to positions of increased risk. Therefore, if the moving average went down, the stop loss would not follow it.
This system relies on the moving average to eventually rise above the entry value.
By the way, these are just example systems, and may or may not be actually useful in real trading. My point is to simply give examples of purely objective trading systems.
In my previous articles, I seem to be fixated on exactly how many different trading systems a set of rules specify.
I've talked about having the word "OR" in a system effectively creates more than one system. If you've got a system which a whole bunch of rules, but one that specifies an entry when the close is above the 20-bar moving average, OR when the 14-bar RSI is above 70, then actually you have two systems - one which enters when the close is above the 20-bar moving average, and one which enters when the 14-bar RSI is above 70.
Then, in that system with the points (where any combination of rules adding to more than 36 points signals an entry), I said that effectively those rules made X number of different systems - one for each combination of adding the rules together to get more than 36 points. In that particular case, where there were 9 rules, with respective points of 8, 8, 8, 8, 6, 8, 6, 6, and 4, I did start to work out exactly how many different combinations could add to more than 36, but I quickly realised there were going to be many. Maybe about 20 or so. 20 different trading systems.
Why is this important?
Because one day the markets going to change its "personality", and the system you've used for years isn't going to work anymore.
When that happens, you need to find out what's wrong and fix it.
Is it the close above the 20-bar moving average that doesn't work anymore, or is it the 14-bar RSI above 70? Or both? Keeping track of them as one system will not tell you.
Trying to find out the problem in that points-based system would just be a joke.
Dare I say it, but knowing when to use a trading system and when to stop using it, is probably more useful than entry rules.
We all want equity curves that start in the bottom left, and end in the top right. But what if it starts bottom left, goes to middle top, and is currently working its way to bottom right? Is this a temporary drawdown, or catastrophic failure?
Much like we need exact, written-down, objective rules for when to enter, where to set the stop loss, when and where to move the stop loss, when to exit, how much money to use, etc, we also need such rules for when to stop using a system.
Without objective rules set out for when to stop using a system that's in a drawdown, we have essentially moved our "oh, I'll stay in a bit longer - it'll come back" thoughts from the price chart to the equity curve chart.
The reason these rules would be more important than entry rules, is because these rules would stop us using a poor-performing system - it wouldn't matter what rules made up that system.
So, what might be an example of an objective "This is not just a drawdown, but rather a catastrophic failure of your trading system" rule? I'll talk more about this at the end of the series.
Money Management rules tell you exactly how much money to risk on each trade. They also tell you when to add more capital to your trading bank.
In short, these money management rules keep you trading even if your trading rules stop working (or didn't work in the first place).
For example, let's say your trading system used to make a profit 80% of the time. So, because of the great strike-rate, you start using more and more money in each trade. You decide to use a fixed amount of $10K on each trade, even though you only have a $50K trading bank.
Well, 5 losers in a row and you are dead in the water. Even systems with 80% strike-rates can have 5 losers in a row. Very quickly. That's not good money management.
So let's change it and use 20% of your trading bank on each trade. First losing trade you risk and lose 20% of $50K, which is $10K. Now you have $40K.
Second trade you risk and lose 20% of $40K, which is $8K. Now you have $32K.
Third trade you risk and lose 20% of $32K, which $6400. Now you have $25,600.
Fourth trade you risk and lose 20% of $25,600, which is $5120. Now you have $20,480.
Fifth trade you risk and lose 20% of $20,480, which is $4096. Now you have $16,384.
So, you can see that using a fixed amount of money lost us everything in 5 trades. Using a percentage of your trading bank adjusts itself each time, so that 5 losses in a row still leaves us with money.
And there aren't too many people that suggest you risk 20%. Most people seem to say between 1% and 3% of your trading bank is all you should have at risk on any one trade. Even if you had a string of losers, risking just 3% of your trading bank is going to keep you trading for a long, long time.
The downside, of course, is that by risking so little, your profits aren't going to be so big. Frustrating if you're just starting out. But let's not forget the oft-quoted 80% (or 90%, or 95%, whatever) of traders who quit or lose their money. Perhaps, expecting only to profit, they risked too much of their bank.
So that's Money Management. Do you use a fixed amount of money on each trade? Do you use a percentage? Easy.
There's some other stuff about when to add money to your trading capital. I remember "pyramids" and other things in a book I read by Daryl Guppy (his books started me off on the technical analysis journey). For me, I just use 2% of my trading bank, and the trading bank fluctuates as I make and lose money. Essentially it means I add the money to the bank straight away.
For currency trades, the calculation is:
A. Get total trading bank.
B. Get 2% of A. This is how much money we want to risk.
C. Get pips at risk in the trade to be opened.
D. Get $ per pip of the currency of the trade ($10/pip for currencies ending in "USD", variable for others).
E. Multiply C with D. This gives us how many dollars would be at risk if we traded 1 contract (1 contract = 100,000 units).
F. Divide B by E. By dividing the amount of money we have to risk, by the amount of money risked if we traded 1 contract, we can get the number of contracts that we are able to trade.
We now have a figure like 0.869 or 1.342. It's up to you and your broker what you do now. You should always round down so that you are actually risking less than the maximum amount you said you wanted to risk.
If you use Oanda, then you can actually trade 0.869 or 1.342 contracts, which equate to 86,900 and 134,200 units respectively.
If you use FXCM's mini account, you need to round it to the nearest lot of 10,000 - 80,000 and 130,000 units.
If you use a broker that allows only whole-numbers of contracts, then 0.869 means you can't trade until you get more money from somewhere, or you find a trade risking less pips. 1.342 means you can trade with 1 contract.
There are some times when you don't want to be in the market. At all. Even if all the signs say "GET IN!". And normally these times are around announcements. "Major" announcements.
When major announcements happen, the price quite often spikes. In fact, it quite often spikes in one direction, then the other, then reverts back to where it was before all that happened and continues on as if nothing ever happened.
Only something did happen - one of the spikes took out your stop. Very frustrating, especially in the times when the price does revert back its previous price and course.
And, because brokers quite often cannot guarantee your stops in extremely volatile times, such as when major announcements occur, perhaps you incurred a bit (or a lot) of slippage as well.
Some people trade the announcements by putting entry orders on either side of the current price action just before the announcement, and probably cancelling the order that doesn't get taken up. And probably they do well out of it. But for me, no broker guarantees your order or your stop loss around announcement time. Slippage is a big risk factor.
Anyway, I don't get into it, so I need rules to tell me what to do when this is about to occur and what to do about it.
First, define "major". Not all announcements move the markets. There are some economic calendars you can use for this. There's the Forex Factory one, which specifies whether an announcement is of the "Volatility Expected", "Volatility Possible" or "Volatility Unlikely" variety. Choose which ones you want to avoid and do it. There are other calendars about also.
Other times to avoid trading might be around public or national holidays, weekends, Christmas, Easter, Thanksgiving in the US. Because we always want to be able to get in and out of a trade when we want to get in and out, liquidity is important. And liquidity might be affected around these days. Might be. Up to you.
Once you've defined the times you don't want to be trading, now you have to answer a couple of other questions.
If you don't have any trades open, it's simple - just don't open any new trades in these times. But you should specify, exactly, when these "holidays" start and end. Is it 2 hours before an announcement where volatility is expected, or is it 1 hour? Or 5 minutes?
Does your trading systems Christmas holiday start when the clock ticks over to Christmas day, or does it start at 1pm on December 23rd? Does it end when the clock ticks over to December 26? Or does it end at 10am on January 4th when the New Years festivities have also died down? This stuffs not hard, just write it out and follow it.
Further, if you have an open trade, what do you do with it? Close it? Move the stop loss to lock in as much profit as possible? Leave it alone if you've already locked in a certain amount of profit? Write it down. Follow it. Easy.
Browse through the Collective2 website and have a look at the differing equity curve charts.
When your equity curve is looking fantastic - starts in bottom left and ends in top right - there is nothing to think about. Keep doing what you're doing.
But, during drawdown time, what to do? All systems have drawdown times. But is it just a drawdown, or has your system stopped working?
I gave the example of this chart on that Collective2 site a few posts ago. That system gained 500% over just a few months. Fantastic. And a few months after that it was in 100% loss territory.
The question is, if you were the person using that system, when do you stop using it? When it fell back to a 400% gain? When it fell back to a 300% gain? 200%? 100%? At zero?
So here again, we need some clearly defined, objective rules. It's not good enough to erase the "I'll just hold on for a bit longer - it'll come back" way of thinking from the trade exit, if you're going to be doing the same thing here.
In fact I think it's more crucial here than anywhere to be clear about when to stop using the system.
Now, there is this thing called Profit Factor. Here's what I've said about Profit Factor in a blog entry:
Profit Factor is (Av Win / Av Loss) * (Pct Winners / Pct Losers). If it equals 1, the system has neither lost nor made money. If it's less than one then the system is losing money, more than one and the system is making money. The bigger the number, the "better" it is. But this calculation falls down in that it doesn't take into account the total number of trades, or the total amount won/lost.
(5/4) * (55/45) equals (500000/400000) * (55/45).
It does.
Really.
Anyway, you could use the Profit Factor of the last 5 or 10, or however many, trades to determine if you will continue to use your system. Once the Profit Factor falls below your set level, you continue to track the trades, but do not actually trade them. When (if) the Profit Factor comes back above that level, you can then start making real trades again based on that system.
I dare say that poor "500% gain to 100% loss" chap could have benefited from something like this.
On the other hand, here's something I also said about this method in a previous post:
...just because the last 5 trades have a Profit Factor of 2, doesn't mean the next trade is going to be any good. In fact, a scenario of events could take place where this rule keeps you out of the good trades and let's you get in on all the bad trades.
In the scenario I'm talking about, you have some bad trades, so the Profit Factor falls below the set level. Then, while you are paper trading, you get some good trades, so the Profit Factor comes back up. You now start real trading again, but have some bad trades. The Profit Factor falls below the set level. Then, while you are paper trading, ... repeat.
This Profit Factor idea is not bad, but it's not perfect. More research is required.
So, we're all done.
I haven't given you a trading system - I've explained what a trading system needs to be complete.
Hopefully I also gave you some ideas for some rules to experiment with.
Hopefully if you purchase a trading system from somewhere you can now validate that it's a "complete" system.
Hopefully if you read something and profoundly disagree, you'll get in contact with me so that I can learn further.
Our automated trading machine of course implements the concepts talked about in this series. Download it and give it a shot :-)
There are some traps you need to be careful of when doing a backtest. Most can be overcome though.
Backtesting, I think, is essential. You've probably heard over and over again that past performance does not necessarily reflect future results. And that's very true - essentially the future prices would need to be exactly the same as the ones you tested it on for you to guarantee the system's performance. Which won't happen. Probably.
But surely you wouldn't trade with real money on a system you knew to be a dog for the last couple of years?
So I guess backtesting lets you filter your list of systems to a just a couple that have been performing well up to now.
This should all tie in with your Equity Curve Analysis. You only trade real money on the systems that meet your criteria for allowing real money to be traded. If you're just starting off, then the only way to know if it meets your criteria is to backtest and found out.
Or you could paper trade every system you have thought of in real time, until one or two of them meet your critiera. But I don't think anyone has the patience for that. So it's off to backtest town for us.
But, and here's the thing, you can do backtesting the wrong way. And when that happens you're in possession of faulty results, and you'll be making your decision to trade a system on faulty information.
Whenever you read a forum post saying they believe backtesting to be a waste of time, that person has done just that. And most of the time they'll go on to explain what it was they did wrong while backtesting. (Yet still fail to realise it was them doing the backtesting incorrectly, not backtesting per se, that was the problem).
Here's a tip - whenever you create a system that has mind-boggling results - results which would make you rich beyond your dreams in about 6 months, and leaves you kind of giddy with excitement - you've got a bug in your backtesting process. For sure. It's happened twice to me. The good part is, after you get over the depression brought about from realising you're not going to be rich in 6 months, you've found your bug and your backtesting process has become that little bit better.
The following articles will outline the common mistakes people make when backtesting, along with some of the things that backtesting just can't do.
[PWB = Problem With Backtesting]
Yes, yes, forgetting about the spread (in currency trading, or forgetting about the commission for traders of other things). Essentially, forgetting about any miscellanous costs of trading.
Simply, if you can make $5 each and every time you trade, you'd become rich very quickly. Unless... it costs you $10 in spread/commission/other each and every time you trade. And sometimes people forget that $10 in spread/commission/other bit.
Here's an example. A while ago I thought I'd stumbled onto the world's most simplest yet profitable trading system. I couldn't believe others hadn't thought of it. I was giddy with excitement.
The system I thought of, on the 5 minute chart, was to set a long entry order at the high of the last 5 bars, with stop loss at the low of the last 5 bars. Each bar move the stop loss to the low of the last 5 bars. Eventually, hopefully, the low of the last 5 bars would rise above the initial entry point, and I'd make a profit. Reverse for shorts.
You are laughing because that's a simple breakout system, and it's been around since the dawn of trading. I know that too... now.
Anyway, I was looking at the EURUSD 5 minute chart of the bid (in Oanda's charts you can chart the bid or ask or the average), and "backtested" over about 2 days worth of data. The end result was faaaantastic: 112 pips profit. 112 pips in that short time! If you trade 1 contract and make 112 pips profit, that equals US$1120. All I could see were dollar signs.
80 trades were executed in those 2 days. The problem I had with the fantastic system that I'd "created" was that I wouldn't have been able to sleep - the system required constant attention as it traded so often. (Hmmm, might need a trading-bot to help me out, I might have thought at the time :-)
And the other problem was that I'd forgotten all about the spread. The prices I worked off were all bid prices. Take the spread into account, which was 1.5 pips at Oanda, times 80 trades = 120 pips. 112 pips profit minus 120 pips spread = -8 pips.
Excitement... giddiness... fading...
Let's say you have only interval data (open, high, low, close) on which to perform your backtesting (i.e. no tick data).
And let's say your system wants to enter long at the high of the most recently closed bar, and it wants to set it's stop loss at the low.
And let's say the following bar has a higher high than the one used for the entry and stop loss calculations, and a lower low. There are three possibilities here:
Firstly, the price may have first risen above the high of the previous bar, thus triggering the long entry. We're in the trade. And then the price dropped below the low of the previous bar, thus trigging the stop loss. We're out of the trade at a loss.
Secondly, the price may have first dropped below the low of the previous bar, thus triggering nothing because the stop loss doesn't come into effect until we're in the trade. Then the price rose above the high of the previous bar, thus triggering the long entry. We're in the trade.
Thirdly, the price may have first dropped below the low of the previous bar, thus triggering nothing because the stop loss doesn't come into effect until we're in the trade. Then the price rose above the high of the previous bar, thus triggering the long entry. We're in the trade. And then the price dropped below the low of the previous bar, thus trigging the stop loss. We're out of the trade at a loss. While unlikely, in fact the price could have rebounded many times between the high and low of the bar during the time the bar was formed - there's no way to know if tick data is not available.
This third scenario forces us to have a policy of once being stopped out of a trade, we wait for the bar to complete before calculating a new entry point (as opposed to using the old entry price calculation to get back into a trade if the price rises to that level once more). That's my policy, anyway. Backtesting would be impossible without it as we would not be able to predict the results in this situation.
Anyway, the first and second scenarios alone highlight a problem with backtesting using interval data. Two completely seperate outcomes are possible. And so, I think there is no other option but to either (a) track both possibilities and show two sets of results at the end of the test; or (b) always assume the worst case - that the price first went in a direction in order to get us in to the trade, and then went in a direction that took out the stop loss.
Feel free to ask questions if I didn't explain that very well.
All that means some valid trading systems cannot be backtested. (These are different to Impossible Trading Systems which can be backtested, but can't actually be traded).
For example, scalping techniques are generally always exiting their trades in the same bar that they entered the trade. Unfortunately this means any scalping techniques have to be backtested using tick data, rather than interval data.
But, if you're looking to enter the scalping business, it's probably worth your while to go through the extra steps necessary to backtest using tick data.
Once you've set your entry price, it's the Ask price that determines if your order is taken up or not. Or if you place a Market Order, you get in at the Ask price.
Once in the trade, the Bid price determines if your Take Profit or Stop Loss is hit. Or if you Exit At Market, you exit at the Bid price.
Once you've set your entry price, it's the Bid price that determines if your order is taken up or not. Or if you place a Market Order, you get in at the Bid price.
Once in the trade, the Ask price determines if your Take Profit or Stop Loss is hit. Or if you Exit At Market, you exit at the Ask price.
That's for currency anyway - with stocks and such the price is the price is the price. But don't forget the commission/brokerage.
I hope everybody knows what a "gap" is.
Well, sometimes your backtesting routine will determine that it needs to set a long entry order at a particular price. And probably your backtesting routine will say "ok, our intended entry price is at this level, did the price go above that point? If so then we're in the trade". Or something like that.
And your backtesting routine will record that it entered long at that price:
21-Nov-2005 18:00:00, Entered long trade at 1.2995.
Problem is though, that just because the price went higher than your intended entry price, it doesn't necessarily mean that you were able to open the trade at that price. Because of gaps.
You can't just assume that you were filled at 1.2995 - you have to check if the open price of the bar was below your intended entry first. If it was, then you can say you entered at 1.2995. If it wasn't, that's where your last gasp entry price comes in - was the open below that? If it was, then you can say you got in at the open price. If the open was above the last gasp, you didn't enter the trade.
What if the price was higher than your last gasp, and then came lower after the open? Did we enter the trade or not? Well, I tend to think that if the open is higher than the last gasp, then we cancel the order. We don't know what's going to happen in the future. And if you enter long while the price is going down, that seems to me to be the wrong thing to do.
The same rule applies for exits, although we don't have a "last gasp" here. The rules say we want to move our stop loss to 1.2995, for a break-even setting. The next bar opens above that price, and drops through it, then we can say we exited at 1.2995. But an open below our stop loss means unfortunately we just have to get out at whatever the open price was. There's no waiting for it to come back. That's praying. Maybe it will and maybe it won't. Stop losses are about risk management, and must be followed.
That's why in a system where you set the stop loss to be exactly 50 pips below the entry, you might still end up with a loss of 55 pips or something.
So that's gaps covered. There's also this thing called slippage. You might like to include a standard slippage of a number of pips just to be on the safe side. You want your backtesting results to be more negative rather than more positive. Slippage is where you want to get in at 1.2995, but your broker fills you at a higher price. Common with stocks and options. Less so with currency, but still possible.
Essentially, whatever your profit/loss was, just deduct the slippage from that and calculate a new profit/loss.
If you create a trading system that buys and sells about 80 times a day, essentially that system is impossible for a single human to trade. Either you would need to automate it, or have a group of people so you could get some sleep at some point.
If you can only guarantee you can be at the computer between the times of 2pm and 4pm, then your backtesting cannot scan data over the entire 24 hours of the day. It must only use data available between 2pm and 4pm.
If your account does not allow hedging (that is, holding both a long and short position in the same currency in the same account), then backtesting a system that hedges is pointless. (Although you should be able to set up two accounts - one for your long trades and one for your short).
A post over at Trader Eyal shows another type of situation where your backtesting might not reflect the reality - he wanted to go short on some stocks, but the broker he uses did not have any of that stock available. This is for stocks, I'm not sure currency would have the same situation, but there it is.
I heard a common mistake when creating a backtesting program, is to use the close price of a bar for decision making during that same bar.
The problem is, until that bar is finished, you don't know what the close price will be. You know it while backtesting because it's historical data. But not in real-time trading, and real-time trading is what backtesting is trying to emulate.
And it might not be so obvious that this is going on. If you're explicitly using the close price, then sure, it's obvious. But if you're using an indicator value that is calculated from the close, you might not realise.
Anything related to the close of the bar, can only be acted upon in the next bar.
Thanks to Trader Eyal for this one.
The holy grail of backtesting is to get it as close as possible to real life trading. Should you have true and accurate tick data, backtesting can be very close to reality. But, most people have just daily data. Sure we know the open, high, low, and close, but assumptions need to be made about what happened during that day. As long as your assumptions are reasonable, and lean more towards the pessimistic than optimistic, then accurate backtesting can still be done.
Inaccurate backtesting is a waste of time. And will probably end up a waste of your money, too.
When we have accurate backtesting, we can start to filter the good trading systems from the bad. And then start trading the good systems in a demo account. Testing your system in a demo account requires no assumptions. Do well there and you should do well in real trading (forgetting for a second about trading psychology and emotions and all that, if you're trading manually).
Our automated trading machine of course takes into consideration the issues highlighted in this series. Download it and give it a shot :-)
So you're looking to use a so-called "trading-bot", eh? And that leads to riches then does it?
No, not necessarily.
A trading-bot is good in that it does stuff automatically.
A trading-bot is not so good in that it can only do automatically, what you tell it to do.
Let me expand.
You need to make sure your automated trading system always uses a stop loss, and can send alerts to your email address or mobile/cell phone so you know how it's going.
So there you have it. A trading-bot does not guarantee riches. But a lot of benefits to be gained nonetheless. A lot. Download our automated trading machine and give it a shot :-)
I've been to two trading seminars. Both of them talked about support-resistance (SR) lines being very important. "If the stock is moving up, and everything looks fantastic for a trade but there's an SR not too far away, don't get into the trade. Most likely it will hit it's head on the SR line and drop back," they would say.
It all works fantastically at the seminar - even if they have a live data feed (i.e. not pre-arranged charts). And I come away from the seminar just with a "knowing" kind of feel about me - like everything's going to be okay from now on.
I get home, put the lines on my chart, and those lines keep me out of what would have been fantastic trades. So I start taking lines off the chart - only keeping the *major* SR lines, where the price has reacted to that price level many, many times - so many times it's obvious that everyone in the world has drawn a line at exactly the same spot. That means I'm free now to get in on trades where, sure, the price has reacted there before, but only a few times.
Whenever I open a trade like that, the price *always* hit its head and dropped away.
So I put the lines back. I'm more cautious again. Now I only get in on trades where there is a decent amount of room to move before the next SR line.
Even after having done that, though, as soon as I open a trade it seems to hit its head and drop away. I ask myself "oh, should I have put an SR line there? ... Yeah, oh, I see, there's a couple of times there it did the same thing. Silly me. Be more careful next time."
I add that SR line so it doesn't happen again. I go through and add SR lines wherever they might just even have the smallest possibility of being an SR line. Now my chart is so covered with lines that it's impossible to trade - there is not enough room anywhere between lines for a decent profit, and I am therefore not able to place any trades.
And this, dear reader, is what happens to me time and time again when I try to use SR lines. I start off with a couple. I end up with hundreds. Seemingly impenetrable lines are broken without effort if I'm not in the trade. Places where the price reacted just once before become impenetrable if I'm in the trade. "Oh dear, that didn't seem like an SR line to me", I might say (but probably with many swear words thrown in), when that happens. Then I go to the next seminar. Repeat.
So the placement, and how many SR lines you put on your chart, are subjective. Different people will put different numbers of lines, at slightly different places, to the other people. It all depends on their past experiences, their recent experiences, and how they felt when they got up in the morning.
I've discovered that I absolutely suck at subjective things. Way too left-brain for that. Using trend lines and SR lines to trade is, for me, a losing combination.
Moreover, trend lines and SR lines work exceptionally well, except when they don't. From before, there were seemingly impenetrable SR lines that get broken in an instant when the market feels like it.
The above is a 5 minute chart of the Euro (EUR/USD). (Click the image to see it in full-size). I've drawn what I think are all reasonably valid support and resistance lines, and trend lines.
You can't trade with all those lines on the chart. There's no room anywhere for a decent profit between lines.
So maybe you won't agree with my placement, and that's one of my points - these puppies are mostly subjective.
It doesn't really matter anyway. Sure, on occasion the lines act as valid support and/or resistance levels. But when it feels like it, the price justs busts through them like they weren't even there. Because there not actually there, I just drew them on my computer.
Your (well, my) trading systems need to work without considering these "lines". Or at least create a way to identify the major ones mechanically.
Bruce Willis went to Japan while I was living there, to promote his movie "Hostage". Nothing so special about that, but it's the other thing he did in Japan that got me thinking...
I've been to two seminars about trading. One was about trading options on the ASX. The other was about trading currency on the forex markets.
Both were very informative, although attending them has not made me a successful trader. Following the rules I bought from these people only seemed to make me do exactly the wrong thing.
Many of you are scoffing now - of course the rules don't work, because if they did, those guys wouldn't need to give seminars. They'd be rich already.
On the other hand, Bruce Willis must make about $10 million per movie. And maybe about one movie every year or so. That's a decent income. I'm willing to guess that $10 million is a lot more than the people that gave the trading seminars have. Anyway, Bruce Willis went to Japan, and aside from promoting his new movie, he did a car commercial.
Huh? But if he's so rich, why did he do a car commercial? Isn't $10 million per year enough?
Sports stars also earn millions per year. Why do they keep accepting new sponsorships?
U2, The Rolling Stones, and any number of pop stars have tens of millions of dollars in their bank accounts, but they keep touring. Aren't they tired of playing the same songs over and over and over again?
Bill Gates and Warren Buffet rock up to work even though they are billionaires.
Of course people who don't have money want more money. But here's the thing - people who have money also want more money. We live in a capitalistic society, and in capitalistic societies there is no such thing as having too much money. If you make more than you can use, you find something useful to spend it on like Gates, Buffet, Bono, and so on are doing now.
So when I hear the question "if their trading system works so well, why would they need to sell it?", I feel dumbfounded. To ask a trader, or anybody, why they want more money, is seriously one of the most bizarre questions I can think of :-)
The reason, you know, that Bruce Willis did the car commercial was threefold:
The last point is especially important for traders (and sports stars, and most rock stars I guess). The economic crisis at the end of 2008 shows how markets can change personalities. A trading system that's profitable today may not be profitable tomorrow. A trader must make hay while the sun shines, as a change in the market is more likely than Bruce Willis becoming unpopular.
So if they are a successful trader, why would they need to sell their trading system? The better question is why WOULDN'T they sell it??
If you have no problem with an actor doing a car commercial and earning a million dollars for a weekend's work, then please give the trader a break for wanting to earn a little extra cash.
Those two seminars didn't turn me into a pro-trader, but they sure did set me on the path. You don't become a pro-anything after one weekend of tuition. The question is, does the seminar provide you with your moneys worth of information? How much money would you have to lose in the markets before you come to the same conclusions as taught to you in the seminar? And that varies from person to person.
Oh, and then there are some shonks. So be careful :-)
If you need further convincing, please read these blog entries where I essentially repeat what I just said above:
First, I came up with this independently, but if you know someone else has already published it or something very similar, please let me know so I can give the appropriate credit.
Second, if you publish it then give me the appropriate credit. A link to this page or website certainly couldn't hurt.
Third, I've given you this indicator and how to calculate it for free. In the spirit of "you get back what you give out". If you come up with a decent way to trade with it, or a way to change it to make it better, you must tell me about it so I can add the information to this page. There's no being a Scrooge. In fact, it doesn't make sense - more people following your system will result in more people buying when you are buying, which should theoretically mean better results.
Fourth, comments and criticisms are welcomed. Please contact us.
I was looking into using some aspect of the previous bar's range as a stop loss. And then I thought I should calculate exactly how far the price normally dips back into the previous bar on an upward march.
On an upward march, the price normally does dip back into the previous bar's range, doesn't it? And that's perfectly normal behaviour on an upward march, so you don't want to bring your stops too close.
And sometimes the price actually goes lower than the low of the previous bar, only to continue its upward march. So blindly using the low of the previous bar as a moving stop, while still a solid rule, could potentially be made better. Or just more complicated - that's where your backtesting comes in to decide if these extra calculations are worthwhile.
But, sometimes the price goes lower than the low of the previous bar, and then continues going down. That's the turning point of the trend.
Anyway, I think I discovered that the amount that the price dips into the previous bar's range while continuing an existing trend jumps around all over the shop.
But, what I stumbled across, was an indicator based on how far the price "pulls back" into the previous bar's range.
A pullback into a previous bar's range depends on whether this is an uptrend or downtrend.
In an uptrend, the pullback is determined by how far the low of the current bar went below the high of the previous bar.
In a downtrend, the pullback is determined by how far the high of the current bar went above the low of the previous bar.
Make sense? Look at a chart. I've been a bit lazy and not provided one.
So we don't have to work out if we are in an uptrend or downtrend, we calculate both.
Ok, so first get:
1. Current High
2. Current Low
3. Previous High
4. Previous Low
Then calculate "Upward" as equal to Previous High minus Current Low. That's how far the low of today pulled back into the range of the previous bar.
5. Upward = Previous High - Current Low
This number will be positive if in fact the low did indeed pull back into the previous bar's range. And the more it pulled back, the bigger the number.
And calculate "Downward" as equal to Previous Low minus Current High, and then multiply that result by -1. This is for how far the high of today pulled back into the range of the previous bar.
6. Downward = (Previous Low - Current High) * -1
This number will be positive if in fact the high did indeed pull back into the previous bar's range. And the more it pulled back, the bigger the number.
You want these numbers in terms of pips, so if it's a currency with 4 decimal places like EUR/USD, then multiply both of those numbers by 10000, and if it's a currency with 2 decimal places like USD/JPY, then multiply both of those numbers by 100.
Now, one calculation of Upward or Downward really doesn't give us much to go with. As I said, they'll be all over the shop. So get a whole bunch of such calculations, and take an average. An average of period 20 sounds good enough. Or 10. Or whatever.
7. So the average of Upward becomes UpAverage.
8. And the average of Downward becomes DownAverage.
And here's where things become kind of hazy. I made this so long ago (but haven't actually used it, instead focusing on finishing the software) that all I can remember is that charts of those averages were very bumpy indeed. They needed to be smoothed.
So smooth them, by taking an average of each of the averages. Again, the period could be 10 or 20 or something.
I probably lost a lot of people just then :-) "Averages of averages!? Why I never". If it works then who cares?
9. The average of UpAverage becomes SmoothedUp.
10. And the average of DownAverage becomes SmoothedDown.
Then, we calculate what I will call the Main Line, and this equals SmoothedUp minus SmoothedDown. That's where the "histogram" part of the name comes in. Which could be incorrect terminology, but again I'm not much of a caring sort.
11. Main Line = SmoothedUp - SmoothedDown
But, here's where I lose some more people, because that line was again too rough. So *gulp* smooth it by taking an average of the Main Line.
12. The average of the Main Line becomes the Average Pullback Histogram.
These calculations are very roughly similar to the MACD Histogram, only the MACD starts off with taking averages of the closing price instead of averages of the pullback amount, and I have one more smoothing step than the MACD.
All that gives us a single line which rises above, and falls below zero (the top chart is the actual price).
If you remember, the bigger the pullback, the bigger the Upward and/or Downward calculation becomes.
And also, if you remember, we calculate the Main Line by subtracting SmoothedDown from SmoothedUp. So if SmoothedUp was very big, and SmoothedDown small, then the Main Line would be a positive number. And hopefully you can see, because this is the tricky part, that a positive number means we are in a downtrend.
Because the bigger the pullback, the bigger Upward, therefore the bigger SmoothedUp, therefore the bigger the Main Line value. And a big pullback into the upward direction means the price is heading down.
And in reverse, if SmoothedDown was much larger than SmoothedUp, the Main Line will be negative, and it means we are in an uptrend.
The basic idea is that when the Upwards pullback overtakes the Downwards pullback, the trend has changed to a downtrend (you've wrapped your head around the fact that Upwards pullback means going down, right?).
The following are just ideas, and the charts just examples. On the charts provided you can see that some ideas work, and some don't. But, that's just for that particular currency and timeframe. You would need to experiment yourself with a stop-loss technique, and with your financial instrument and time-frame of choice.
---
The point at which we can say that one pullback has overtaken another in strength is where the chart equals zero. So, one trading idea is to go long when the Average Pullback Histogram (AVPBH) goes from above zero to below zero. Go short when the AVPBH goes from below zero to above.
---
Instead of zero, you could say go long when the AVPBH falls below a certain point on the chart. And go short when the AVPBH goes above a certain point on the chart.
---
Instead of going long when the AVPBH goes from positive to negative, just allow a long entry whenever the AVPBH is below zero. And allow short entries whenever the AVPBH is above zero. And then use some other entry rule to decide the precise time of entry.
---
Instead of rising and falling above zero, it could also be argued that one pullback is overtaking another in strength when a peak or trough is formed.
Go long when a peak is formed, short when a trough is formed.
You can see that the lines are just a little the right of the peaks and troughs. It's because you don't know if it's a peak or trough until the peak or trough has actually formed.
---
Not just a peak, but go long when a peak is formed and the AVPBH is negative. And go short when a trough is formed and the AVPBH is positive.
---
Or, go long when a peak is formed and the AVPBH is positive. And go short when a trough is formed and the AVPBH is negative. Yes, the opposite of above! Who cares! Backtest to see which one works!
---
Or, go long when a lower peak is formed. Go short when a higher trough is formed. [Edit: one "higher trough" line is missing at the very start of this chart]
When I first posted this on my blog, I received some feedback that indicators should always give buy signals when they are near the top of the chart, and sell signals when they are near the bottom.
This makes everything standard, and easy to understand when looking at a screen full of different charts.
In fact, this change has been incorporated into TS already. All you have to do is multiply the result by -1 to flip the indicator on its head.
While a little convoluted, this indicator will hopefully show when a trend has turned in a new direction. This either signals to get in on the new trend, or get out of trades you have in the opposite direction.
Don't forget the rules of use at the top! Enjoy.
First, I came up with this independently, but if you know someone else has already published it or something very similar, please let me know so I can give the appropriate credit.
Second, if you publish it then give me the appropriate credit. A link to this page or website certainly couldn't hurt.
Third, I've given you this indicator and how to calculate it for free. In the spirit of "you get back what you give out". If you come up with a decent way to trade with it, or a way to change it to make it better, you must tell me about it so I can add the information to this page. There's no being a Scrooge. In fact, it doesn't make sense - more people following your system will result in more people buying when you are buying, which should theoretically mean better results.
Fourth, comments and criticisms are welcomed. Please contact us.
I came up with this indicator after reading about "Market Profile".
Essentially, when a new bar has closed, that close price fits into price area. For example, a USD/JPY price of 114.23 fits in the price area of 114.20 to 114.24.
114.23 also fits in the price area of 114.20 to 114.29, 114.00 to 114.49, 114.00 to 114.99, etc. It all depends on the number of pips you decided upon for each price area.
A number of other close prices also fit within that price range. You add up the total number of "hits" that each price range gets, and that number is what you chart.
I don't think there's anything new yet.
Here's an example of a Box of Shark:
114.00 to 114.04: 1
114.05 to 114.09: 0
114.10 to 114.14: 0
114.15 to 114.19: 2
114.20 to 114.24: 2
114.25 to 114.29: 4
114.30 to 114.34: 8
114.35 to 114.39: 2
114.40 to 114.44: 0
114.45 to 114.49: 1
In total, the above example plots 20 close prices. That's the period for this Box of Shark. And the box size is 5 pips.
When you chart this kind of thing, the chart has 2 dimensions.
When all the prices are grouped together in a small range (i.e. congestion), the number of price ranges used becomes small, and the average becomes big. In the example above there are 10 price ranges, with 20 close prices used, so the average is 2. But if the last 20 close prices fell between 114.10 and 114.19, then there would be just 2 price ranges, with the average becoming 10.
The number of price ranges, or the average, could therefore be used as some kind of warning - either the number of price ranges shrinks (and average grows) and therefore we are in congestion, or the number of price ranges grows (and average shrinks) and therefore the prices have become quite spread-out and volatile.
The other dimension is the total number of close prices that fall in a price range. In the example above, 8 is the maximum, and 2 is the average. This could be used as a replacement for support and resistance lines - any price range containing more than the average (or more than a multiple of the average) could be considered as an area of support or resistance.
You can use a rising average as signs of congestion, which might keep you out of a trade you might have otherwise entered.
Conversely, you might want a declining average, as a sign of increasing volatility, before you enter a trade.
In either case, I don't think those two signals could be used independently to make trading decisions - more likely they would be used as a further confirmation before entering a trade based on your other rules.
---
As I mentioned, the number of hits in each price range could be used as an alternative to support and resistance lines. In our example, the price range of 114.30 to 114.34 has 8 hits, so if the last close price fell in the price range of 114.25 to 114.29, and you were looking to go long, perhaps you wouldn't.
I was just looking at the rules I've already coded into TS to handle the Box of Shark. And I saw these two - "Box of Shark Histogram positive" and "Box of Shark Histogram negative". It was so long ago that I made this indicator up, and I had completely forgotten where the Histogram part came from.
Well, seems like I caught a MACD craze. The Box of Shark Histogram is calculated by taking a slow and fast average, of the average, and subtracting the slow from the fast.
Let's say the box size is 5 pips, and the period (number of close prices to chart) is 20, slow average has a period of 20, and the fast average has a period of 10.
Thus:
The Box of Shark Histogram is going to be positive when the Fast average is higher than the slow average.
What this means is the most recent averages are getting bigger. And averages getting bigger means the price is heading into congestion. All in all, not too much different to above, but perhaps a better signal than just using "one average is higher than another", because we are basing our judgement over many averages.
I also have rules such as "Last X B.O.S. Naturalised Average(s) Falling". A naturalised average just means rounding the average to a whole number. The average changing from 8 to 7, say, is a stronger signal than the average changing from 7.8 to 7.7.
Grouping the prices into boxes lets you step back a bit from the absolute detail of the price chart. This kind of thing is nothing new. It's used in Market Profile, and also P&F Charts, etc.
It's unknown whether the techniques above are going to be useful or not. Only backtesting will tell. At the least, they give objective ways to determine times of congestion and volatility, and of support and resistance levels.