|
發表於 18-2-2 20:08
來自手機
|
顯示全部樓層
Arrays:DayHL[10](0); Vats:avg3(0),avg5(0),PC1(0); 利用函數NthMinlist由小到大取得過去5日高低點數列依序存入陣列內DayHL[0]最小,DayHL[9]最大 For counter= 1 to 10 begin DayHL[counter-1]= NthMinlist(counter,HighD(1),LowD(1),HighD(2),LowD(2),HighD(3),LowD(3),HighD(4),LowD(4),HighD(5),LowD(5)); End; Avg3=(CloseD(1)+CloseD(2)+CloseD(3))/3 ; {Avg3=Average(Close[1] ,3) of data2} Avg5=(CloseD(1)+CloseD(2)+CloseD(3)+CloseD(4)+CloseD(5))/5 ; {Avg5=Average(Close[1] ,5) of data2} PC1=CloseD(1); { PC1=Close[1] of data2} |
|