Turtle Trading System The Source Turtle trading system is relatively early trading system, is also a world-famous mechanical trading system, for the investors who want to learn the programmatic system trading is a good introductory learning material. A complete set of mechanical trading systems have clear and unique trading signals, such as two moving averages that make up a trading system, but it's better to say
The Turtle trading system is a relatively early trading system and a world-famous mechanical trading system, which is a good introductory learning material for investors who want to learn how to deal with programmatic systems.
A complete set of mechanical trading systems have clear and unique trading signals, such as two moving averages, which constitute a trading system, but it is better to say that it belongs to the category of technical indicators. While the complete trading system holds position (position) adjustment and risk control is the core of the trading system, and the turtle trading system is such a set of trading systems.
Introduction to the Turtle Trading system:
Trading signals: Turtle trading signal is actually very simple, when the price hit 20 or 50 days to buy, when the price hit 10 days or 20 days low on the sale, the time of the specific parameters users can adjust themselves.
Position management and Risk control strategy: The Turtle trading system is determined by the total capital risk percentage and the N volatility factor strategy to determine how much the trading position is, N determines when to add, how much, and uses 2N to determine the protective loss of the position. N adjusted once every 7 days (five trading day). This is the trading strategy of the Turtle trading system, which belongs to a complete set of trading systems. Below is the program code of the Turtle Trading system test version I wrote.
Buy (BB) is the number of stocks bought (with a total of up to 4), Sell () is the total number of shares sold. The total funds take 1 million as an example.
Turtle Trading System Revision:
The main improvement of this version is to use the statement directly on the n algorithm, because the first n of the SMA function is the PDN value is the 20th simple moving average of the turtle trading system, so it will cause error, and the improvement is more in line with the original intention. We say here N, PDN and so on, if you have not seen the law of turtles may not understand, so before you know the source code, you can first look at the Turtle law. The following is a revised version of the program:
(Editor: admin)
Turtle Trading System Source code