How to Build an Online Trading System With Technical Analysis

Building an online trading system can be a complex process. It can require customized programming, access to expensive data sources and extensive time commitments to maintain the system. However, there are a number of web sites that do the heavy lifting for free.

Web sites offer something for traders with any level of programming skill. If traders prefer to do all of their programming, specialized software packages like R and Python can be used to develop a strategy that is complex and complete.

Of course, there are many traders who would rather trade than program. In this article, we will address those traders and look at how to think about a trading system and provide an example of how that process can be implemented using freely available data.

Defining a Trading System

To begin the process, we need to clarify what a trading system is. Definitions can vary but at the most basic level, a trading system is a series of rules that covers what to buy and sell and when to take action in the market. Ideally, rules cover all contingencies.

To build a trading system, traders need to answer a few questions:

  • What will I trade?
  • When will I buy?
  • What will I do if there are more buy candidates than funds available for trading?
  • When will I sell?

The question of what to trade will vary for each trader. For this example, we will assume the trader is going to buy and sell stocks that are in the S&P 500. Any criteria could be used, and this group of stocks is chosen for simplicity. Smaller traders might consider using options on these stocks.

The question of when to buy involves defining a trading philosophy. In general, a trading philosophy could be trend following or mean reverting. Other philosophies exist but can almost always be tied to one of these two categories.

Trend following will usually involve longer term holding periods. For example, a trend following strategy might buy stocks when they are above their 200 day moving average (MA). This will generally identify long trends and require holding stocks for months at a time.

Mean reversion tends to be popular among short term traders. The idea for this trading strategies is to catch short term reversals. For example, a stock might sell off after a disappointing earnings report. Mean reversion traders would buy this stock to benefit from an expected short term rebound.

No matter which trading philosophy you adopt, there will inevitably come a time when there are too many trading candidates. This will require a filter to eliminate some of the possibilities. For example, a fundamental filter could be applied and the stocks with the lowest price to earnings (P/E) ratios could be bought.

Deciding when to sell requires having solutions for several different scenarios. Traders will need to decide on exit rules that maximize their returns and will need to consider how to handle winning trades, how to handle losing trades and how to address stocks that simply don’t move.

Rules for a Simple Trading System

Each of these questions could be the subject of a complete article. But, rather than completing a detailed analysis of question, we will provide an example of how a trading system could be built. The individual questions will be addressed in detail in the future.

For this trading system, the rules will be:

  • What will I trade? Call options on up to five stocks that are members of the S&P 500.
  • When will I buy? Buys will be made when the relative strength index (RSI) falls below 10 indicating the stock is deeply oversold and likely to rebound.
  • What will I do if there are more buy candidates than funds available for trading? The P/E ratio will be used to filter traders when more than 5 stocks are oversold. Stocks with the lowest P/E ratio will be bought.
  • When will I sell? This is intended to be a short term strategy. Therefore, stocks will be sold quickly and we will have three separate rules for selling:
  1. Winning trades will be sold when the RSI rises above 40.
  2. Losing trades will be sold if the price of the stock falls more than 20% below the initial entry price. This is a stop loss rule.
  3. Because we want to make money quickly, trades will be closed after 20 trading days even if the stock fails to meet one of the other two exit rules. This is a time stop.

We now have a complete trading strategy defined and can easily implement this strategy with free online tools.

Implementing a Trading System

Many online brokers have screening tools that allow traders to use rules like the ones defined here. If your broker doesn’t have a screening tool, there are simple ones available for free including one at The criteria for this simple strategy are shown below.


When more than five stocks pass the initial screen, the trade candidates would then be sorted by the P/E ratio. This can be done by simply clicking on the P/E column.


This quick process would find buy candidates. Although FinViz could be used to monitor trades, other sites such as could be easier to use. allows for plotting RSI along with price and makes it easy to spot sell signals.


In this example, which is actually using the default settings at the web site, the RSI is shown at the top of the chart and could be used to monitor open positions for sell signals.

The other two sell rules will require more work. The stop loss rule will require finding the stop level after the trade is entered. The buy price could be multiplied by 0.80 to find the stop level. A stop order could then be entered into your broker’s system for automatic execution.

If you do this, be sure to cancel any open sell orders whenever a trade is closed based on one of the other rules. This will avoid the order being executed in error later.

For the time stop, a calendar such as Outlook could be used. Calendar apps are available for free and can be used to time exit orders. The time stop is intended to avoid dead money. This is a problem where trading capital is tied up for an extended period of time.

Rather than using limited trading capital for a position that is not moving, a time stop allows traders to quickly move funds to the next position after waiting a reasonable amount of time. By quickly turning over trading capital, it is possible for small traders to rapidly compound their capital.

Although the process for building and implementing a simple online trading system is straightforward, many traders will be uncomfortable with the process. They may not want to commit to monitoring the system on a daily basis and it will be important to do so when the system is trading.

Rather than risking a missed signal because of time commitments or because a problem with one of the web sites that will need to be monitored, a trader may find it better to rely on a trading service which provides all signals in real time.

The Stock Trading Tips service, PPK System, is designed to exploit patterns associated with those market clues by looking for value and momentum in stocks. That’s the combination many researchers found beats the market. You can learn more about this trading service by clicking here.