HH 1 Assignment: If the highest price
ll 1:= IF(L & gt; REF(L, 2) and REF(L, 1)>REF(L, 2), REF(L, 2), 0);
LL 1 assignment: if the lowest price >; The lowest price and quotation (lowest price,1) two days ago are greater than the lowest price two days ago, and the lowest price two days ago is returned, otherwise it is returned to 0.
HH2:= value when(hh 1 & gt; 0,hh 1);
HH2 Assignment: ValueWhen (hh1> 0, HH 1) means that HH 1 is returned when the current HH 1 is greater than 0.
LL2:= value when(ll 1 & gt; 0,ll 1);
LL2 assignment: ValueWhen (ll1> 0, LL 1) means that LL 1 is returned when the current LL 1 is greater than 0.
k 1:= IF(CLOSE & gt; HH2,-3,IF(CLOSE & lt; LL2, 1,0));
K 1 assignment: if the closing price >; HH2, return to -3, otherwise return the closing price.
k2:= value when(k 1 & lt; & gt0,k 1);
K2 assignment: ValueWhen (K 1
G:IF(K2= 1,HH2,LL2),COLOR00FFFF
Output g: if K2= 1, return HH2, otherwise return LL2, COLOR00FFFF.
DRAWNUMBER(ISLASTBAR,G,G,2),ALIGN0
When the condition is met, whether it is the last cycle, write the number in the G position, ALIGN0.
G 1:=VALUEWHEN(ISLASTBAR,G);
G 1 assignment: value WHEN (last period, g)
W 1:=K2
W 1 assignment: K2
W2:= On-Off;
W2 allocation: opening price-closing price
HT:= IF(OPEN & gt; Off, on, off);
HT assignment: if the negative line closes, return the opening price, otherwise return the closing price.
LT:= IF(OPEN & LT; Off, on, off);
LT assignment: if it is closed, it will return the opening price, otherwise it will return the closing price.
Adhesion line (w1<; 0,O,C,0.5,0),COLORRED
When the condition w 1
Adhesion line (w1<; 0,O,H,0.3,0),COLORRED
When the condition w 1
-
The STICKLINE statement in the formula has the same meaning, so the last sentence 12 is omitted. "Output" means to be displayed in the chart, and "Assignment" means that the statement will be referenced below.
If you have time, it is not difficult to teach yourself formula editing knowledge, as long as you have a little heart.