Hi Guys,
I'm new here, so I'm going to try to commit some time on how I'm building an automated trading strategy using technicals within NinjaTrader. I consider myself a knowledgeable trader, yet there's always things to learn and discover every day.
These series of articles is to spur discussion and hopefully give some of my trading insights away to the community.
That being said, I'm going to begin with how I identify reversals.
Identifying Reversals
Nothing is easier than to identify amazing trading opportunities looking at a chart in
hindsight. As we all know, doing the same in real time is a different ball game. In the
chart below (showing the ES-mini of last Friday, March 19, 2013) I marked, in hindsight,
what would have been some good entry points, either on the long or short side. Wouldn’t
it be nice if we could spot some of those opportunities as they occur, in real time?
ES1 by TraderFrank, on Flickr
To find out, I employed my favourite tool for the past year or so, Bloodhound from Shark
Indicators. (Bloodhound runs on Ninjatrader).
I started out by trying to define what seem to be some of the common characteristics of
the situations marked on the chart in yellow. I’ve found the following:
most yellow circles contain candles with long tails and/or long candles with no tails at all
good long entries start with an up candle and vice versa
the candles in yellow are close to the opposite Bollinger (2,20) lines (lower line for longs, upper line for shorts)
the MACD is below 0 in the case of long signals and above 0 for shorts
Let’s see how we could define these rules in Bloodhound. (For our exercise, I’ll assume the reader is somewhat familiar with Bloodhound, and has a basic understanding of the Solvers and the Logic and Function nodes).
First, let’s define long bottom tails with the Indicator Comparison solver by comparing the Low to the Open of the current bar. More precisely, we’ll want to find candles where the Low is “much lower” than the Open. (Note: price data can be accessed through SIChameleon, a Bloodhound component, on the indicator list). A welcome suggestion from Zac White of Shark Indicators to use the ATR measurement unit to identify candles with long tails allows us to create a signal that will work on all types of charts, whether they’re range, tick, renko, or time charts. And by setting the ATR period to 1, we effectively tell Bloodhound to evaluate the current candle only. Very useful.
See the settings below.
Settings 1 by TraderFrank, on Flickr
Notice how we define “much lower”: while we could use the default Ticks as measurement unit, by using a 1 period ATR with a Value of 0.5 and the Long Output setting as shown, we are telling Bloodhound to mark any candle where the Low is at least 50% lower than the Open. (The 0.5 setting, of course, is not written in stone. E.g. a setting of 0.33 would mark bars whose tail is at least one third of the whole candle.)
After adding a Bar Direction solver to our logic, we would get this:
Settings 2 by TraderFrank, on Flickr
Now let’s say, I only want long candles with no top tail: no pullback, just sheer momentum. I can do that by adding another Comparison Solver with the setting Close=High (Opposite settings for shorts).
So far so good. But what if I also want to include long candles with no tail at all? They definitely indicate momentum. ATR, again, comes to our help: the Comparison solver with the Open<Close by 1 ATR setting will spot long green bars with no tails.
No let’s see how we could put all these ingredients into a logic.
Settings 3 by TraderFrank, on Flickr
Now, since we are interested in long bottom tails with a MACD<0 and Low<BollingerLower setting, we can add an If Then filter to the equation.
The logic, with the mirror code for shorts added, will look like this:
Settings 4 by TraderFrank, on Flickr
Looks complicated at first sight, but if we read the chart step by step, it’s quite easy to follow the logic.
Finally, let’s see what signals this code would give us for the ES on March 19, and compare it with the “ideal” signals above.
ES After by TraderFrank, on Flickr
Not bad at all. While a signal or two are clearly misses, the majority of the “racing lines” seem quite usable.
Now up to the next steps: fine-tuning and backtesting, then defining some sound money management, not to mention controlling nerves. But those must be topics of future articles.
Happy experimenting and successful trading to all!