Dual Thrust (MyLanguage version)


Created on: 2019-10-08 17:22:00 Modified on: 2021-10-09 09:51:07
Copy: 0 Number of hits: 44
avatar of Zero Zero
6
Follow
792
Followers
  • Fundamental: At the close of the day, two values are calculated: the highest price - the closing price, and the closing price - the lowest price. Then take the larger one and multiply it by the value of k. The result is called the trigger value. At the opening of the next day, record the opening price, then buy immediately when the price exceeds (opening price + trigger value), or sell short when the price is lower than (opening price - trigger value). This system is a reversal system with no separate stop loss. In other words, the reverse signal is also the closing signal.

Dual Thrust (MyLanguage version)
Dual Thrust (MyLanguage version)
Dual Thrust (MyLanguage version)

  • Main chart: Upper track: formula: UPTRACK^^O+KSRG; Lower track: formula: DOWNTRACK^^O-KXRG;

  • Secondary chart: none

Strategy source 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;