// KD低檔黃金交叉
value1 = Stochastic(9,3,3,value2,value3,value4);
if value3 < 40 and value4 < 40 and value3 cross over value4 then ret = 1;
// 月季均線多頭向上
input: shortlength(20,"短期均線期數");
input: midlength(60,"中期均線期數");
variable: shortaverage(0);
variable: midaverage(0);
settotalbar(3);
setbarback(maxlist(shortlength,midlength));
if Close > close[1] then
begin
shortaverage=Average(close,shortlength);
midaverage=Average(close,midlength) ;
if close>shortaverage and
shortaverage>midaverage
then ret=1;
end;
1 評論