The dual trust trading algorithm is a famous strategy developed by Michael Chalek. It is usually used in futures, foreign exchange and stock markets. The concept of Dual Thrust is similar to a typical breakthrough system, which adopts dual thrust historical prices to construct an updated backtracking period - making it more stable in any given period theoretically.
In this article, we will introduce the strategy briefly and show how to implement this algorithm by using Mylanguage on the FMZ Quant platform. After extracting the historical price of the selected transaction object, this range is calculated based on the closing price, the highest price and the lowest price in the last N days. When the market moves a certain range from the opening price, the opening operation is performed. We tested the strategy in two market states: trend market and range shock market. The results show that this momentum trading system works better in the trend market, but it will trigger some false buying and selling signals in the volatile market. In the interval market, we can adjust the parameters to obtain better returns.
At the opening of the next day, record the opening price, and then buy immediately when the price exceeds (opening price+trigger value), or sell short when the price is lower than (opening price - trigger value).
The system is a reverse system without a separate stop loss. In other words, the reverse signal is also a closing position signal.
Upper track: formula: UPTRACK^^O + KSRG;
Lower track: formula: DOWNTRACK^^O-KXRG;
Mylanguage 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 strategy source code, please refer to: https://www.fmz.com/strategy/128884