小幫手 您好
回測時想將金融、生技股排除,想請問如何在選股中將特定產業剔除,謝謝!
//直接放到要回測的腳本最上方
var:con_exclude_stock(false);
con_exclude_stock= LeftStr(symbol,2)="17" or //有漏掉的排除名單可自行修改
LeftStr(symbol,2)="41" or
LeftStr(symbol,2)="47" or
LeftStr(symbol,2)="65" or
LeftStr(symbol,2)="28" or
LeftStr(Symbol,2)="58" or
LeftStr(Symbol,2)="60";
if con_exclude_stock
then RaiseRunTimeError("排出股");//直接停止該標的腳本
請問在哪個位置 沒有看到附圖
謝謝小幫手~
5 評論