在XQ的點點滴滴看到這篇好文,請問一下
有排除特定行業的寫法
Q:請問有無 (選定 )特定行業的寫法?
在XQ的點點滴滴看到這篇好文,請問一下
有排除特定行業的寫法
Q:請問有無 (選定 )特定行業的寫法?
Hi N核函數
您好,依照第七點"排除特定行業"的寫法
您可以控制condition1的結果,達到您的目的
如下修改,若您想增加業種別,請再input跟if的判斷新增您要選取的類別
settotalbar(1);
input:exclude_1(0, "挑選XQ建築");
input:exclude_2(0, "挑選XQ金融");
input:exclude_3(0, "挑選XQ航運");
variable: XQ_group (callfunction("XQ_類股"));
condition1 = false;
if exclude_1 = 1 and XQ_group = "建材營造" then condition1 = true;
if exclude_2 = 1 and XQ_group = "金融保險" then condition1 = true;
if exclude_3 = 1 and XQ_group = "航運業" then condition1 = true;
if condition1 = true then ret = 1;
outputfield(1, XQ_group, 0, "XQ 類股");
以上說明,謝謝。
感謝XQ團隊的用心
2 評論