請教小幫手,執行腳本後,卻未出現結果,該如何修正語法?懇請賜教
vars:F1(0),F2(0),F3(0),F4(0),F5(0),V1(0),V2(0),V3(0),V4(0),V5(0);
vars:H1(0),H2(0),H3(0),H4(0),H5(0);
SetBarFreq("D");
settotalbar(1350);
V1 = GetBarOffset(20181231);
V2 = GetBarOffset(20191231);
V3 = GetBarOffset(20201231);
V4 = GetBarOffset(20211231);
V5 = GetBarOffset(20221231);
F1 = Average(CLOSE[V1],240);
F2 = Average(CLOSE[V2],240);
F3 = Average(CLOSE[V3],240);
F4 = Average(CLOSE[V4],240);
F5 = Average(CLOSE[V5],240);
H1 = Average(GetField("本益比")[V1],240);
H2 = Average(GetField("本益比")[V2],240);
H3 = Average(GetField("本益比")[V3],240);
H4 = Average(GetField("本益比")[V4],240);
H5 = Average(GetField("本益比")[V5],240);
ret = 1;
outputfield(1, F1, "107年均價");
outputfield(2, F2, "108年均價");
outputfield(3, F3, "109年均價");
outputfield(4, F4, "110年均價");
outputfield(5, F5, "111年均價");
outputfield(6, H1, "107年本益比");
outputfield(7, H2, "108年本益比");
outputfield(8, H3, "109年本益比");
outputfield(9, H4, "110年本益比");
outputfield(10, H5, "111年本益比");
3 評論