想問一下這個語法是否可以用在1分K
input:Length(20); setinputname(1,"下降趨勢計算期數");
input:Rate(150); setinputname(2,"反轉率%");
variable: Factor(0);
settotalbar(Length + 3);
Factor = 100/Close[Length];
value1 = linearregslope(high*Factor,Length);
value2 = linearregslope(high*Factor,3);
if close > open and close < close[length] and value1 < 0 and value2-value1 > Rate*0.01 then ret=1;
input:short1(5,"短期平均"),mid1(20,"長期平均");
//透過Z的時間安排來決定現在用的是那一根Bar的資料
variable: Z(0);
if currenttime > 180000
or currenttime < 083000 then
Z =0
else
Z=1;
value1=GetField("內盤量");//內盤量
value2=GetField("外盤量");//外盤量
value3=value1+value2;
if value3<>0 then value4=value2/value3*100;
//外盤比重
value5=average(value4,short1);
value6=average(value4,mid1);
if close*1.4<close[90]
and value5 crosses above value6
and value4>60
and average(volume,100)>1000
and tselsindex(10,6)[Z]=1
then ret=1;
1 評論