31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3

Complete Trading

Algorithms

We ended the last chapter discussing one of the most famous trading algorithms

of all times. Figure 3.1 is a flowchart I used to program the famous

algorithm many years ago. The flowchart looks extremely complicated, but keep in

mind the complete Turtle system includes two trading systems, money management,

and a simulated trading module. If you break down the flowchart into its components,

you will see that it is not as complicated as it seems. Most of the calculations in

the Turtle system are used to determine market risk, capital allocation, market

selection, and position sizing. All these components are quite important, but the

meat of the diagram and the system are the two trading entry/exit algorithms and

the switch that determines which system is applied. Let’s go right to the heart of the

Turtle by breaking just the trade entry/exit algorithms out of the complete model.

The other components will be discussed a little later.

The first of the two entry/exit algorithms, let’s call it System 1, is the shorter-term

entry technique and is based on a very simple technique. Basically, it will buy/sell

short on a 20-day Donchian breakout and exit the trade by risking whichever is

closer: a 10-day Donchian breakout or a maximum of 2 percent of capital. System 1

(Box 3.1) can trade quite frequently in a choppy market. This type of start and stop

can lead to a long list of losses. This choppiness can be very devastating to a trader’s

account and psychology. Richard Dennis tried to help alleviate this by implementing

a trade filter. The Turtles were instructed to skip System 1 entries if the last trade

was a winner. If the last trade was a winner, then the next trade is not ‘‘actually’’

executed but it is simulated. In other words, the trader would paper trade the

system until a loss occurs.

77

The Ultimate Algorithmic Trading System Toolbox + Website: Using Today’s Technology to Help You Become a Better Trader. George Pruitt

© 2016 by George Pruitt. Published by John Wiley & Sons, Inc.

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!