print結果 9:00有斶發 但警示沒有出現 直到11:00才出現 請問哪裡該修改.



Print 結果
商品名稱 富喬 20250206.000000 90000.000000 CCI(34)= 133.81 RSI(6)= 84.71 估計量與昨季均量比值 2.90
商品名稱 富喬 20250206.000000 110000.000000 CCI(34)= 171.86 RSI(6)= 84.71 估計量與昨季均量比值 2.21
商品名稱 富喬 20250206.000000 130000.000000 CCI(34)= 154.30 RSI(6)= 84.71 估計量與昨季均量比值 2.01
警示腳本
if barfreq<>"Min" or barinterval<> 120 then raiseruntimeerror("腳本只適用於120分鐘線");
if currentdate <> date then return;
condition91 = GetSymbolInfo("買賣現沖") = True ;
condition92 = GetSymbolInfo("先買現沖") = True;
SetTotalBar((26+9)*8) ;
// CCI指標
input: Length(34);
value1=CommodityChannel(Length) ;
//RSI(6)
Variable:r6(0);
r6 = RSI(Close , 6);
//估計量與昨季均量比值
input: N(1.5,"成交量 昨季均量比值");
var: _estvolume(0);
_estvolume = getField("估計量","D");
value2 = Round(average(getField("成交量","D")[1], 60),0); //昨季均量;
//估計量 昨季均量比值
Var : _RatioC(0);
if value2 <> 0 then
_RatioC = _estvolume/ value2;
if (condition91 or condition92)
and value1 > 100 and r6 >75
and _RatioC >= 1.5
then ret =1 ;
Print("商品名稱", SymbolName, date, time,
"CCI(34)=", NumToStr(CommodityChannel(Length), 2),
"RSI(6)=", NumToStr(r6, 2),
"估計量與昨季均量比值", NumToStr(_RatioC , 2));
其餘各股皆同, 都是11:00以後警示訊號才出現 .
3 評論