策略雷達增加價量篩選

  •   192 
  • 最後發表   tsung  2025 六月 08
tsung 發文於   2025/06/07

請問Xscript警示(策略雷達),盤中即時選出 10MA > 5MA > 20MA > 60MA 的寫法  

,想再加入" 價格要在20~100之間,目前總交量要在1000張以上",要如何寫入程式?謝謝

 

input: shortlength(5,"短期均線期數");

input: midlength(10,"中期均線期數");

input: Longlength(20,"長期均線期數");

input: SuperLong(60,"超長期均線期數");

variable: shortaverage(0);

variable: midaverage(0);

variable: Longaverage(0);

variable: SuperLongaverage(0);

 

settotalbar(3);

setbarback(maxlist(shortlength,midlength,Longlength,SuperLong));

 

if Close > close[1] then

begin

 shortaverage=Average(close,shortlength);

 midaverage=Average(close,midlength) ;

 Longaverage = Average(close,Longlength); 

 SuperLongaverage = Average(close,SuperLong); 

 if  close>shortaverage and 

     midaverage>shortaverage and 

shortaverage>Longaverage and 

Longaverage>SuperLongaverage

 then ret=1;

end;

排序方式: 標準 | 最新
虎科大許教授 發文於   2025/06/08

不要重複貼文,這樣會增加困擾。

condition3=getField("成交量", "D")>=1000;

tsung 發文於   2025/06/08

收到,感謝您!

發表回覆
Close