input:Length(14,"計算期數");
variable: pdi(0), ndi(0), adx_value(0);
DirectionMovement(Length, pdi, ndi, adx_value);
if pdi[1] < ndi[1] and pdi crosses over ndi then ret=1;
選股條件是這樣
我想選出DMI當天黃金交叉的股票
但選出來完全不一樣
        
        input:Length(14,"計算期數");
variable: pdi(0), ndi(0), adx_value(0);
DirectionMovement(Length, pdi, ndi, adx_value);
if pdi[1] < ndi[1] and pdi crosses over ndi then ret=1;
選股條件是這樣
我想選出DMI當天黃金交叉的股票
但選出來完全不一樣
Hello justice_hung,
您可以將pdi和ndi outputfield 或 print 出來確認。
DMI是種會用到前期運算值的指標,小幫手推測您應該是資料讀取筆數不足,導致計算出來的數值和指標上的有所差別。
建議您可以將資料讀取筆數調長。
1 評論