請問~~ 小幫手~及各位高手大大~~ 如何設定 觸發設定 才會在指定時間內~~ 再三確認 這檔股票kd交叉,因設定為『啟動後只觸發一次』它只會對該檔檢查一次就不會在其它時間內在次確認了,麻煩 小幫手~及各位高手大大 幫忙解惑 謝謝
程式如下︰
//////////////////////////////////////////////////////////////////////
Input: T1(091000, "第一階段開始時間"),T2(093000, "第一階段結束時間");
Input: T3(094000, "第二階段開始時間"),T4(100000, "第二階段結束時間");
Input: T5(102000, "第三階段開始時間"),T6(110000, "第三階段結束時間");
Input: T7(112000, "第四階段開始時間"),T8(120000, "第四階段結束時間");
Input: T9(122000, "第五階段開始時間"),T10(132000, "第五階段結束時間");
//////////////////////////////////////////////////////////////////////
variable: rsv(0), k(0), _d(0);
SetTotalBar(maxlist(9,6) * 3); // 設定資料讀取範圍
Stochastic(9, 3, 3, rsv, k, _d); // 計算K值與D值
if CurrentTime > T1 and CurrentTime < T2 then
// KD已經黃金交叉
if K cross over _d then
begin
ret = 1;
REtMsg="kd黃金交叉~注意!!";
END;
if CurrentTime > T3 and CurrentTime < T4 then
// KD已經黃金交叉
if K cross over _d then
begin
ret = 1;
REtMsg="kd黃金交叉~注意!!";
END;
if CurrentTime > T5 and CurrentTime < T6 then
// KD已經黃金交叉
if K cross over _d then
begin
ret = 1;
REtMsg="kd黃金交叉~注意!!";
END;
if CurrentTime > T7 and CurrentTime < T8 then
// KD已經黃金交叉
if K cross over _d then
begin
ret = 1;
REtMsg="kd黃金交叉~注意!!";
END;
if CurrentTime > T9 and CurrentTime < T10 then
// KD已經黃金交叉
if K cross over _d then
begin
ret = 1;
REtMsg="kd黃金交叉~注意!!";
END;
2 評論