Algorithmic Trading Tips 01.



Investing in the top performers might be a good and profitable strategy. But how can you find good momentum stocks? Don’t worry; it is not a difficult task to set up a Market Scanner and find profitable opportunities from hundreds of stocks.

Momentum trading is a popular method for selecting a portfolio of investments. The traders’ main concern is for stocks that are moving significantly in one direction on high volume. Momentum traders don’t fall into any prescribed pattern and maintain trades from a few minutes, to a few days, depending on how quickly the stock moves and if it changes direction.

One identification of a good momentum stock is one making highest highs. It is also a good indication that the fundamental traders believe the stock is very good. Now, by identifying these stocks we can continually alter our investment strategy and trades to match the best performing stocks. It should also give us a great and quick way to introduce something of interest, of fundamentals and new highs to our clients.

From a common quote list it is hard to tell what is near its high. I could of course set up charts for each and draw lines from previous highest highs, but this is time consuming, and possibly erroneous to rely on if not updated on a regular basis. But don’t worry; it is not a difficult scenario to set up either if I take the following code. You may ignore my green comments in brackets. It’s just for your explanation.

Meta:​​ DisplayUnit(​​ DisplayUnitHundredths​​ );

{Displays the value with a 2 digit decimal}


Variables:​​ HH,dd;

{HH means Highest High. dd means distance}


if​​ h​​ >HH​​ then​​ HH=h;

if​​ HH<>0​​ then​​ dd=100*(HH-h)/HH;

drawline(dd,"% to HH");

This is my own indicator I’ve written in Tradesignals’ build-in programming language. I saved it under the name ‘% Dist. from Highest High’. Applying that to a Scanner list produces an extra column which will tell me how far away my stocks are. Here is a scanner I have of the DAX Index. I clicked the header to sort column.

So here with the DAX, I sort my list according to the percentage difference from the highest high. In this case I am using Monthly data and a view back to highs in the last 12 months. To alter this I just need to alter the properties of the Market Scanner:
My stock selection of the month may be Fresenius. Looking at the chart I can see immediately that we already exceeded the 12-month high. I can see the indicator charted below the stock which gives me a useful graphic of how far away this stock has been from its highest points. The closer the line is to zero the more highs this stock will have made.

Applying this to a scan including the EuroStoxx50, FTSE 100 and S&P 500 reveals far more stocks that are worth a closer look. Investing in the top performer might be a good and profitable strategy. Next time I will develop this idea a little further. Why do we not start to compare the relative performance with the underlying performance of the index? Are there any further secrets we can tease out of the numbers to help us trade profitably?