飞狐TD序列主图代码, 请大师优化!!
飞狐版预言帝狄马克的TD序列主图(9,13数字序列)
{主图分TD准备和TD13倒数两部分}
{TD准备}
A:=REF(C,1)>REF(C,4);
AB:=C<REF(C,4);
AA:=A AND AB;
LS0:=BARSLAST(AA);
LS11:=IF(1,LS0=1,AA);
LS21:=IF(1,LLV(C,1)<REF(C,4),1);
A1:=LS11 AND LS21;
LS12:=IF(2,LS0=2,AA);
LS22:=IF(2,LLV(C,2)<REF(C,4),1);
A2:=LS12 AND LS22;
LS13:=IF(3,LS0=3,AA);
LS23:=IF(3,LLV(C,3)<REF(C,4),1);
A3:=LS13 AND LS23;
LS14:=IF(4,LS0=4,AA);
LS24:=IF(4,LLV(C,4)<REF(C,4),1);
A4:=LS14 AND LS24;
LS15:=IF(5,LS0=5,AA);
LS25:=IF(5,LLV(C,5)<REF(C,4),1);
A5:=LS15 AND LS25;
LS16:=IF(6,LS0=6,AA);
LS26:=IF(6,LLV(C,6)<REF(C,4),1);
A6:=LS16 AND LS26;
LS17:=IF(7,LS0=7,AA);
LS27:=IF(7,LLV(C,7)<REF(C,4),1);
A7:=LS17 AND LS27;
LS18:=IF(8,LS0=8,AA);
LS28:=IF(8,LLV(C,8)<REF(C,4),1);
A8:=LS18 AND LS28;
LS19:=IF(9,LS0=9,AA);
LS29:=IF(9,LLV(C,9)<REF(C,4),1);
A9:=LS19 AND LS29;
DRAWTEXT(A1,L-0.3,'1'),COLORGREEN;
DRAWTEXT(A2,L-0.3,'2'),COLORGREEN;
DRAWTEXT(A3,L-0.3,'3'),COLORGREEN;
DRAWTEXT(A4,L-0.3,'4'),COLORGREEN;
DRAWTEXT(A5,L-0.3,'5'),COLORGREEN;
DRAWTEXT(A6,L-0.3,'6'),COLORGREEN;
DRAWTEXT(A7,L-0.3,'7'),COLORGREEN;
DRAWTEXT(A8,L-0.3,'8'),COLORGREEN;
DRAWTEXT(A9,L-0.3,'9'),COLORFF00FF;
{TD13次倒数}
B:=C<=REF(L,2);
LSP:=BARSLAST(A9);
LS11A:=IF(1,LSP=1,B);
LS21A:=IF(1,LLV(C,1)<REF(L,2),1);
D1:=LS11A AND LS21A;
LS12A:=IF(2,LSP=2,B);
LS22A:=IF(2,LLV(C,2)<REF(L,2),1);
D2:=LS12A AND LS22A;
LS13A:=IF(3,LSP=3,B);
LS23A:=IF(3,LLV(C,3)<REF(L,2),1);
D3:=LS13A AND LS23A;
LS14A:=IF(4,LSP=4,B);
LS24A:=IF(4,LLV(C,4)<REF(L,2),1);
D4:=LS14A AND LS24A;
LS15A:=IF(5,LSP=5,B);
LS25A:=IF(5,LLV(C,5)<REF(L,2),1);
D5:=LS15A AND LS25A;
LS16A:=IF(6,LSP=6,B);
LS26A:=IF(6,LLV(C,6)<REF(L,2),1);
D6:=LS16A AND LS26A;
LS17A:=IF(7,LSP=7,B);
LS27A:=IF(7,LLV(C,7)<REF(L,2),1);
D7:=LS17A AND LS27A;
LS18A:=IF(8,LSP=8,B);
LS28A:=IF(8,LLV(C,8)<REF(L,2),1);
D8:=LS18A AND LS28A;
LS19A:=IF(9,LSP=9,B);
LS29A:=IF(9,LLV(C,9)<REF(L,2),1);
D9:=LS19A AND LS29A;
LS10A:=IF(10,LSP=10,B);
LS20A:=IF(10,LLV(C,10)<REF(L,2),1);
D10:=LS10A AND LS20A;
LS110A:=IF(11,LSP=11,B);
LS210A:=IF(11,LLV(C,11)<REF(L,2),1);
D11:=LS110A AND LS210A;
LS120A:=IF(12,LSP=12,B);
LS220A:=IF(12,LLV(C,12)<REF(L,2),1);
D12:=LS120A AND LS220A;
LS130A:=IF(13,LSP=13,B);
LS230A:=IF(13,LLV(C,13)<REF(L,2),1);
D13:=LS130A AND LS230A;
DRAWTEXT(D1,L-0.6,'1'),COLORRED;
DRAWTEXT(D2,L-0.6,'2'),COLORRED;
DRAWTEXT(D3,L-0.6,'3'),COLORRED;
DRAWTEXT(D4,L-0.6,'4'),COLORRED;
DRAWTEXT(D5,L-0.6,'5'),COLORRED;
DRAWTEXT(D6,L-0.6,'6'),COLORRED;
DRAWTEXT(D7,L-0.6,'7'),COLORRED;
DRAWTEXT(D8,L-0.6,'8'),COLORRED;
DRAWTEXT(D9,L-0.6,'9'),COLORRED;
DRAWTEXT(D10,L-0.6,'10'),COLORRED;
DRAWTEXT(D11,L-0.6,'11'),COLORRED;
DRAWTEXT(D12,L-0.6,'12'),COLORRED;
DRAWTEXT(D13,L-0.6,'13'),COLORRED;