|
smallwhite0958 發表於 15-10-16 10:47
感謝你喔
不過這個我已寫過, 這樣似乎只能記錄當日的最大量,
不知道是否能寫成和HighD(0)一樣, (0)時為 ...
直接用 HighD 修改
{*******************************************************************
Description: High Volume of Day
Provided By: EasyTrader788
********************************************************************}
Inputs: DaysAgo(Numeric);
Variables: Day1Done(0);
Array: HighArray[50](-1);
If DataCompression < 2 Then Begin
If Date > Date[1] Then Begin
Day1Done = Day1Done + 1;
For Value1 = 50 DownTo 1 Begin
HighArray[Value1] = HighArray[Value1-1];
End;
HighArray[0] = Ticks;
End;
If Day1Done>0 AND Ticks > HighArray[0] Then
HighArray[0] = Ticks;
If DaysAgo <= 50 Then
_HighVol_Day = HighArray[DaysAgo];
End;
{Forcing the function to series}
Value1 = _HighVol_Day[1];
|
|