Hello this is Mark from Tradinformed.com and welcome to this video on a Simple Way to test a Candlestick Trading
Strategy
In this video, I will be looking at Japanese candlesticks
and how we can apply them to create a trading strategy and
Then how we can use this strategy, and how we can test it using
Microsoft Excel
Before I go any further I would like to remind you that if you enjoy this video
Please hit the like button and also if you want to have more content like this. Please remember to subscribe
Japanese candlesticks are probably the most common way to view price action
They are visual they give a very quick feel for price action
And what has been happening in a market?
In addition to this we can use
candlestick patterns and
Probably the most common, most
talked about and the most used type of candlestick patterns are the ones that signify a
reversal or an entry in particular an entry and an exit point
However all of us know that throughout the internet, books,
Trading seminars there are literally hundreds if not thousands of candlestick patterns out there. So as
disciplined. as organized, as
Professional traders we need to be sure we need to have done our own research
and know our own analysis. We need to understand which of these patterns
Give us an edge in the market and which of them
which of them don't
How I'm going to demonstrate that we can do this today is a
Simple way as shown in the title and I'm going to demonstrate using
Microsoft Excel
So if I click over here we have a
Microsoft Excel spreadsheet and
Here on the left in yellow. I have some price data
Now this is nice. This is in a standard format
This is actually daily price data, and it is in the standard format of open, high, low, close
So we can take this price data, and we can use it to
We can use the spreadsheet to identify
candlestick patterns, and how we do this is using IF
statements, and these are logical statements and the basis, and they are the basis of all sorts of
programming
and this
you can see here in the column marked long hammer is an
example of an If And
statement in Excel
So, this is a nice simple candlestick test and I'm going to be looking at two of the most popular and
Probably widely most widely remarked upon
Candlestick patterns there just a single candlestick and that is the long hammer
where we have a long tail below a smaller body and
the shooting star when we have a high shadow above a
smaller body
So this is the formula that I have used to identify a hammer pattern
and if you see here in the formula bar I
used I started off with If And and identify the
bottom of
the main body
The bottom of the shadow, and I want to make this greater than what is above it
Finally I want to be using a factor here and this factor. Helps us control the length of the shadow
Purely because I want to understand whether having a longer or a relatively shorter shadow
Improves the strategy, makes it worse, or doesn't make any difference at all
So I've included this as an absolute reference, and I'll show you where that is in a moment
So if these conditionals are true. I'm telling Excel to enter a 1
And so we can see we've got a nice
little visual reference every time a long hammer meeting these conditions
appears in our data
Now for the short conditions, I'm using exactly the same, but in Reverse
These are exactly the same formulas, but just in Reverse
So I've identified I've used Excel quite quickly to identify candlesticks
But most of the time we're not going to expect in particular a single candlestick pattern to be
significant
So I'm adding a few other
Simple filters for the candlesticks.The first one of these is about as basic as it comes
and this is the 200 period
exponential moving
average
Now the data the price data that I'm using over here is the EURO/USD
euro, US dollar
Forex pair
Now historically the Euro USD has tended to be quite a trendy
Market, it has tended to move strongly in one direction and keep going in that direction
until it changes direction so the EMA is
often quite a useful filter for the Euro USD
And that's all these cells here identifying the EMA
Over here. I have the candlestick range, and this is simply by clicking here
It's simply telling us the difference between the high and the low divided by
The close what percentage is the high-low range of the closing price?
Okay, so these are all I'm going to use in this simple candlestick
demonstration strategy
The next thing that we've got over here is our long entry conditions
Now the spreadsheet that is on the screen is a Tradinformed backtest model
And it is a way of testing all sorts of different trading
strategies,
different markets, different timeframes and
different technical
indicators and entry and exit points
In a Tradinformed backtest model what you get is a format, a
pro forma that you can use to test
Different types of trading strategies and the advantage of this is you can start to use things like stop losses
trailing stops and
difference and if you like multiple different types of exit systems
There is a link on the screen if you like more information about Tradinformed backtest models
So the entry
conditions I've got here are
again, I'm using
an If And statement and
If I'm going to enter a long the first thing
I want is I want there to be a long hammer because that's what I'm testing for I
Want the EMA to be rising and
thirdly, I want the candlestick range to be lower than a variable which I can adjust and
have a look at
And finally we only want to enter one trade at a time, keep things simple
So this is what the results page of a Tradinformed backtest model looks like and
You can see we've got a number of different inputs
from
changing the starting capital,
adding a cost of trading and
Some preset profit target stop-loss and trailing stop
now
Profit target and stop-loss here, you can see here are based on the ATR
in this particular trading strategy
You can see what I'm doing here. I've given a fairly wide stop here five times the ATR
So once a trade is entered we do have quite a lot of slack
You can see what I've also done is I have made a very high profit target so that we have
it's going to take a lot of work from those trades to ever reach this target and
so
If we're not stopped out with our initial stop loss we have a wide
trailing stop that we're going to use to tag along with us and to take
Our to exit our position once we start to move definitely in the other direction so
Down here if I can skip down here what we have is the shadow length multiplier
Now I mentioned this earlier at the moment. I've got it set at one
If I was to set this to two
firstly you can see that the results over here change and
what this is doing is making sure that the shadow must be at least twice as long as
the rest of the candle
If I was to set this to three
quite obviously the shadow must be at least
three
times the length of the rest of the candle
and you can see we do change the effectiveness of the strategy at the expense of
reducing the number of trades
Now because I'm using a fairly high timeframe the
Daily time frame, daily timeframe. This is only quite a small number of trades and
it would take quite a lot of patience to be trading a strategy that only opens a
Trade a couple of times a year
I also mentioned that we have the candlestick range limiter here if I was to set this to 1
or 2 or
even
0.5%
You can see again. We are restricting the number of trades, and we are changing our profitability
Ok so
Another advantage that we have in using a Tradinformed backtest model is we can trade those we can test different types of
exits
Now I've already explained the main exit that I'm using here is the profit target and the trailing stop and the normal stop-loss
But one that I also like to use and can be quite effective
And in fact changes the nature of a trading strategy is a simple strength close now this can be
Any sort of strength close, but what I've done here is basically tell the strategy: if I
Have two consecutive
higher
closes for a long trade or two consecutive lower closes for a
Short trade then to close at that position. You know when I click here
You can see that it makes a significant difference to the trading strategy, I would even go so far as it actually
completely changes the trading strategy
What we had previously was a
Fairly typical trend following type of strategy what we've got here is something much closer to a shorter term
Momentum type results or a reversal strategy. We've got 70% winning trades
Which for those of you who like a nice high winning trade percentage is pretty decent
You might have noticed here that our compound annual growth rate has
Declined so we're getting lower profits overall
But at the same time we're getting a lower drawdown
half as much a drawdown and
I'm sure anybody any one of you will know if you've traded a strategy
Drawdown is the worst time to be in a trading strategy and the lower this can be the better
So what we can also do is just have a look and try and even up this drawdown by increasing our leverage
It's if I put if I doubled effectively doubled the leverage
We can see that our annual growth rate compound annual growth increases to just a little bit below 10%
Now this whole process is trying to identify the best trading strategy the best way that
you can think of to deploy your capital in the
Markets in order to earn the best return you can
Preferably with the lowest amount of risk you can
So we've got a potential nice little strategy here. We've got a load of trades. We've got 280 trades
we've got a
Should we say reasonable drawdown, and we've got a pretty decent
10% compound annual growth rate
So if I click this button here, and we can have a look over here at the strategy, so what we had here was
Two times leverage
And strength close
If I wanted to try something else I can reduce the leverage again get rid of that
Wait for the results to update and copy them across
Now here we have 1 times leverage
No strength close
So in the process of identifying the best strategy
We could simply look along here if we want percentage of winning trades, but it's quite obvious
This is a better strategy if we're looking for
Drawdown compound annual growth rate again. We can see we're gonna identify as many different scenarios as we like
So I hope you've enjoyed this video if you want to see more videos like this
Please click the Subscribe button, and if you want to learn more about trading the financial markets
Please go to www.tradinformed.com