How to Create an Indicator (using Ninjatrader)…

by Mark Williams on May 4, 2009

Okay, so here is the scenario.

You have just read a paper by some famous mathematician. In the paper, he talks about using a formula to calculate some thingamabobjiggy, and you, for some strange reason, have an epiphany, and decide to see if what was written in the paper would work for trading.

So, you put on you thinking cap, and decide to go about creating this wonderful formula, and try to see if it can help you gain an edge in the market.

So, how do you go about creating this fancy, schmancy indicator?

Well, like your strategy from lessons before, you need to flesh out your idea.

Using mind maps helps, but in the case of making THIS indicator, we already have the math available, so need to really think about what we are creating.

So, we skip to the next stage, which is flowcharting/paragraphing our idea. In today’s example, we are going to do the paragraphing method.

So, what are we creating?

Well, we are going to create an indicator called CANDLE BODY MOMENTUM.

Where’d I get this thing? Well, I found some information about it in Perry Kaufmaun’s book “New Trading Systems Methods.”

Now, before you rush out to get this thing, I have to warn you: the book weighs like 10 pounds, and you could literally kill someone with it.

It is jammed full of technical information on almost every indicator that is currently out there, and I DO RECOMMEND that you check it out, but I had to warn you…

What I used this book for is to look at what indicators to avoid, but that will be another lesson for another day.

What is CANDLE BODY MOMENTUM?

Well, it is the comparison of up candles (when the closing price of a period is higher than the open price), versus that of down candles (where the closing price of a period is less than that of the open).

Here is the equation we are working from:

CandleBodyMomentum = Number of Up Days/ (Number of Up Days + Number of Down Days)     

The period that he starts off with was 14.

So, out of 14 past bars of data, we take the number of UP days (Close > Open) during that 14 day period, and number of DOWN days (defined as Close < Open)

Once I have the number of UP days, I divide by the period (since UP days + DOWN days = Period) to get the momentum.

So, as Candle Body Momentum goes up, expect positive price action.

As Body Momentum goes down, expect negative price action.

Once the number is released and charted, we update to the next bar, and repeat

Now that we have this information created, we will create the code.

At this point, if you are not a programmer, then you could turn this project over to you handy dandy programmer from Elance, Rent-A-Coder, or your cousin with too much time.

If you are a programmer, then you should be able to handle this yourself…

And, if you can not afford a programmer, then it is time to grab a book, or you charting software’s manual.

One of the many things that I have learned on my journey is that if you have no time to learn something, then you had better have money…

If you have no money, then you had better have or make time!

In part two, we will go over how to take the above from it’s current form, to code.

Continued on in Part II…

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

{ 4 comments… read them below or add one }

1 Arby22No Gravatar 06.22.09 at 4:28 am

Well……

2 VishalNo Gravatar 10.05.09 at 2:54 am

Where is part II?

3 Marcelo gaisNo Gravatar 02.18.11 at 4:06 am

Hei where’s the part II ? This text should be continued on in part II but i couldn’t find it ….

4 matigerNo Gravatar 01.10.12 at 9:04 am

ahm, where is part II? can’t find it.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site is using OpenAvatar based on

Disclaimer | Privacy Policy © 2007-2008 YouSuckAtTrading.Com All Rights Reserved.