Implementation of Dual Thrust trading algorithms using My language on the inventor's quantification platform

Author: Goodness, Created: 2019-07-23 11:15:46, Updated: 2023-10-23 17:35:10

img

1. Dual Thrust trading strategy is presented

The Dual Thrust trading algorithm is a well-known strategy developed by Michael Chalek. It is commonly used in futures, forex, and stock markets. The concept of a Dual Thrust is similar to a typical breakout system, which uses a dual thrust historical price to construct an updated retracement period - theoretically making it more stable over any given period.

2. Implementation of the dual thrust trading strategy

In this article, we briefly describe the strategy and demonstrate how to implement it using My language on the inventor's quantification platform. After extracting the historical price of the selected trade mark, the range is calculated based on the closing price, the highest price and the lowest price of the most recent N days. When the market moves from the opening price to a certain range, open operations are carried out. We tested the strategy in two market states: the trend market and the range volatile market.

  • The basic formula:

At the close of the day, two values are calculated: the highest price - the close price, the close price - the lowest price. Then the larger value is taken and multiplied by the value of k. The result is called the trigger value.

At the opening of the next day, record the opening price and then buy immediately when the price is above (opening price + trigger value) or sell short when the price is below (opening price - trigger value).

The system is a reversal system with no separate stop loss. In other words, the reverse signal is also a breakdown signal.

  • The main image:
上轨道:公式:UPTRACK^^O + KSRG;
下轨道:公式:DOWNTRACK^^O-KXRG;
  • The secondary graph:

img

My language code:

HH:=HV(H,N);
HC:=HV(C,N);
LL:=LV(L,N);
LC:=LV(C,N);

RG:=MAX(HH-LC,HC-LL);
UPTRACK^^O+KS*RG;
DOWNTRACK^^O-KX*RG;


C>UPTRACK,BPK;
C<DOWNTRACK,SPK;

For the source code of the policy, please see:https://www.fmz.com/strategy/128884


More