程式碼如下,但選出來的股票有很多不精確,麻煩小編影一下該如何修改,謝謝!
//一波上漲未過高--選多股
variable: RSI_over(true), KL(0),KH(0);
if closeD(4) > openD(4) and closeD(3) > openD(3) and closeD(2) > openD(2)
and closeD(1) > openD(1) and closeD(5) < openD(5)
then begin
KL = Lowest(low,4);
KH = Highest(high,4);
RSI_over = true;
end;
//----- 破低解開 -----
if lowD(0) < KL
then begin
RSI_over = false;
end;
//----- 突破高點解開 -----
if highD(0) > KH
then begin
RSI_over = false;
end;
if RSI_over = true then ret = 1;
7 評論