我處理好了價位排序問題,但
1. 價位排序後與原名稱對應不上,如何處置讓排序後的價位也能對應名稱?
2.當日的線型和價位仍無出現,如何處置?
var:a1(0),a2(0),a3(0),a4(0),a5(0),a6(0),a7(0),a8(0),a9(0);
a1=average(getField("收盤價","W"),5);
a2=xf_EMA("w",getField("收盤價","W"),12) ;
a3=xf_EMA("W",getField("收盤價","W"),26) ;
a4=average(getField("收盤價","W"),60);
a5=average(Close,5);
a6=EMA( Close,12) ;
a7=EMA( Close,26) ;
a8=average(Close,60);
a9=close;
array: sort[9](0);
sort[1]=a1;
sort[2]=a2;
sort[3]=a3;
sort[4]=a4;
sort[5]=a5;
sort[6]=a6;
sort[7]=a7;
sort[8]=a8;
sort[9]=a9;
value15=getField("漲停價", "D");
value16=getField("跌停價", "D");
value19=getField("控盤者成本線");
array_Sort(sort,1,9,False);
if a1 <value15 and a1 >value16 then plot1(sort[1],"w5",checkbox:=0);
if a2 <value15 and a2 >value16 then plot2(sort[2],"w12",checkbox:=0);
if a3 <value15 and a3 >value16 then plot3(sort[3],"w26",checkbox:=0);
if a4 <value15 and a4 >value16 then plot4(sort[4],"w60",checkbox:=0);
if a5 <value15 and a5 >value16 then plot5(sort[5],"d5",checkbox:=0);
if a6 <value15 and a6 >value16 then plot6(sort[6],"d12",checkbox:=0);
if a7 <value15 and a7 >value16 then plot7(sort[7],"d26",checkbox:=0);
if a8 <value15 and a8 >value16 then plot8(sort[8],"d60",checkbox:=0);
plot9(sort[9],"收",checkbox:=0);
if value19 <value15 and value19 >value16 then plot16(value19,"成本線",checkbox:=0);

4 評論