這陣子大盤每天震盪幅度都頗大,期指如果站對邊,頗為有利可圖,那麼如何預判指數接下來的多空方向,就是一門有利可圖的學問,那怕只比別人早幾分鐘,在波動大的時候,仍然可以賺到錢,今天這一篇來介紹如何運用XS的語法,統合權值股分鐘線多空方向,打造盤中即時多空指標,來預判加權指數的後市。
先來看一下這個指標跟1分鐘加權指數的對照圖
大家可以發現,這個指標在加權指數一分鐘線多空翻轉時,的確可以具備領先的預示能力,特別是盤中的一分鐘線多空轉折點前後,這個指標的訊號是非常明確的。
這個指標的作法是,把佔指數較大的前50檔股票,去計算目前最新價格是在10分鐘移動平均線之上還是之下,在其上就加一,在其下就加0
如果多空勢均力敵,這數字減去25就應該是0,如果在均線之上的股票數愈多,那代表多頭勢力在增強,如果跌到0以下,代表大多數的權值股,目前跌破十分鐘線。
我把這個腳本放在下面給大家參考
array:T50[50](0); t50[1]=GetSymbolField("5876.tw","close"); t50[2]=GetSymbolField("2317.tw","close"); t50[3]=GetSymbolField("2412.tw","close"); t50[4]=GetSymbolField("1301.tw","close"); t50[5]=GetSymbolField("1303.tw","close"); t50[6]=GetSymbolField("2454.tw","close"); t50[7]=GetSymbolField("1326.tw","close"); t50[8]=GetSymbolField("2308.tw","close"); t50[9]=GetSymbolField("2882.tw","close"); t50[10]=GetSymbolField("2881.tw","close"); t50[11]=GetSymbolField("2891.tw","close"); t50[12]=GetSymbolField("2002.tw","close"); t50[13]=GetSymbolField("1216.tw","close"); t50[14]=GetSymbolField("3008.tw","close"); t50[15]=GetSymbolField("2886.tw","close"); t50[16]=GetSymbolField("3711.tw","close"); t50[17]=GetSymbolField("2357.tw","close"); t50[18]=GetSymbolField("2474.tw","close"); t50[19]=GetSymbolField("3045.tw","close"); t50[20]=GetSymbolField("6505.tw","close"); t50[21]=GetSymbolField("2303.tw","close"); t50[22]=GetSymbolField("2382.tw","close"); t50[23]=GetSymbolField("2207.tw","close"); t50[24]=GetSymbolField("2892.tw","close"); t50[25]=GetSymbolField("4938.tw","close"); t50[26]=GetSymbolField("2884.tw","close"); t50[27]=GetSymbolField("2912.tw","close"); t50[28]=GetSymbolField("2885.tw","close"); t50[29]=GetSymbolField("2883.tw","close"); t50[30]=GetSymbolField("2105.tw","close"); t50[31]=GetSymbolField("2880.tw","close"); t50[32]=GetSymbolField("2330.tw","close"); t50[33]=GetSymbolField("4904.tw","close"); t50[34]=GetSymbolField("5880.tw","close"); t50[35]=GetSymbolField("2481.tw","close"); t50[36]=GetSymbolField("9904.tw","close"); t50[37]=GetSymbolField("1402.tw","close"); t50[38]=GetSymbolField("1101.tw","close"); t50[39]=GetSymbolField("2887.tw","close"); t50[40]=GetSymbolField("2890.tw","close"); t50[41]=GetSymbolField("2801.tw","close"); t50[42]=GetSymbolField("1476.tw","close"); t50[43]=GetSymbolField("2409.tw","close"); t50[44]=GetSymbolField("2301.tw","close"); t50[45]=GetSymbolField("2395.tw","close"); t50[46]=GetSymbolField("2354.tw","close"); t50[47]=GetSymbolField("9904.tw","close"); t50[48]=GetSymbolField("1102.tw","close"); t50[49]=GetSymbolField("2408.tw","close"); t50[50]=GetSymbolField("2227.tw","close"); variable:count(0),i(0); count=0; for i=1 to 50 begin if t50[i] > average(t50[i],10) then count=count+1; end; plot1(count-25);
大家可以試著調整成份股,讓這指標更具備領先預測的能力,也可以訂定不同的計數標準,也可以給予不同股票不同的計算權重,這三個方向都是可以自創出領先指標的可行方法。
這種透過盤中的個股表現,來研判指數的方向,我自己以前用excel表有做了不少個,實戰上有其效果,把它改成XS指標, 可以多個指標一起看,效果不錯,推荐給大家。