How to create a custom technical ranking system

by | Jun 1, 2018 | All Articles, Technical Analysis, Education

In your studies you may have come across the ‘weight of evidence’ approach to investing which looks at prices and various indicators to help identify potential trading opportunities. Let’s say that as a momentum investor you look for opportunities by studying the price relationship to various moving averages, the positive or negative slope of the moving average, the RSI value, and the rate of change. You could save the indicators to a Page Layout and apply it to hundreds of charts and manually plough through them to visualise those that look good – or bad – whilst jotting the tickers down as you go, but that takes time – not to mention a toll on your eyes!

Another solution would be to use the Optuma scripting language to do all the work for you. By assigning values to certain technical conditions you can create your own technical weight of evidence methodology – or custom ranking system.

Here are five indicators that you may look for to determine whether further analysis should be undertaken:

  1. the price relationship to moving averages, eg is the current price above the 50MA?
  2. the slope of a moving average, eg is the 13EMA sloping up?
  3. the value of two moving averages, eg is the 33MA greater than the 88MA?
  4. RSI values, eg RSI(10) is above its 10MA
  5. positive recent gains, eg rate of change over last 3 months is positive.

By default, when a true/false condition is calculated by Optuma a true result is given a value of one, and zero if false. So if we build a formula containing those five conditions above and sum the results we will be able to easily see those stocks where all the conditions are true (the total will be five), where all are false (0), and everything else in between. Note that we won’t know which of the five conditions are true, just the overall number. However, we can adjust the values for each condition so those that you deem more important can have a higher weighting – more on that in a follow up article.

Here are the five true/false conditions based on the list above that can be added to a custom watchlist column. Remember when starting a line with // that the text that follows is ignored, allowing you to add comments or descriptions:

The last line calculates the sum of the results to display a value, so that the stocks where all five conditions are true will have a ranking value of five, whilst those scoring zero will obviously have no true results. In the example on the right a custom column has been added to a watchlist of the ASX200 with the above example ranking formula being used. This column can be sorted, grouped, and also displayed with a custom label and colour. As you can see in the snippet of the watchlist, BSL, BWP, and CAR have a ranking of five, whilst BOQ, BXB and CBA are all zeroes.

Creating a Time Series

Once the column has been added to the watchlist then a time series of the ranking value can then be added to a chart by clicking on the column heading and dragging it on to the chart to display it in a new view (tip: once added right-click on the line and change the Plot Style to Shaded Step).

 

Custom Bar Colours

Using the same ranking example you can also assign specific bar colours for each value. For example, those bars that have a ranking value of zero are red, ones are pink, two are yellow, etc.

To do this right-click on any bar and change the colour scheme to Custom and then create a formula for each value with the colour as required. All that needs to be changed for each colour is the last line, so for red bars denoting a rank of zero use the following, remembering to use the double equals sign (==) to denote equality (single equals signs are used to assign variables).

The next colour for those with a ranking of 1 would have this as the last line:

V1+V2+V3+V4+V5==1

Once all the colours have been added the chart would look like this:

Next Time

In the next article we’ll take it a step further and look at changing the weightings of the ranking components and how to create a custom Breadth Measure to show, for example, the percentage of fives every day for on a universe of stocks, indicating the internal strength.

Share Link
Darren Hawkins, MSTA

Darren Hawkins, MSTA

Senior Software Specialist at Optuma

Darren is the senior Software Specialist at Optuma. He joined the company in 2009 after attending an introductory technical analysis course. Darren now instructs users all over the world, from experienced Wall Street traders and professional money managers to individual traders drawing their first trendlines.

Darren grew up in the UK and attended college in the USA where he earned a BA in Economics from St Mary's College of Maryland. He went on to spend a few years working at the Nasdaq Stock Market in Washington DC. Going on to live and work in Australia, the US and currently the UK, Darren has a broad understanding of the individual needs of traders, portfolio managers and investors utilising a wide range of methodologies.

In 2014 Darren passed the UK-based Society of Technical Analysts diploma course, and hopes to have passed Level 3 of the CMT Program in December 2018.

When not looking at charts, Darren keeps a keen eye on England's cricket team - especially if they are playing against Australia. He lives in the Essex countryside in England, with wife Wendy and their labrador, Gabba.

2 Comments

  1. Hi Darren,
    Where i can find the script ?

    Reply
    • Darren Hawkins, MSTA

      Hi Ciro, the script examples are in the article (the coloured text) and can be copied and pasted in to the Script Editor.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Blog Signup

Recent Posts

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close