// 跨頻率DMI指標
// 不支援大頻率跨小頻率,例如:
// 不支援主頻率週資料,跨頻率計算日DMI技術指標。
//
if barfreq <> "Tick" and barfreq <> "Min" and barfreq <> "D" and barfreq <> "W" and barfreq <> "AD" and barfreq <> "AW" then raiseruntimeerror("不支援大頻率跨小頻率");
input: Length(1);
variable: pdi_value(0), ndi_value(0), adx_value(0);
SetInputName(1, "天數");
xf_DirectionMovement("M", Length, pdi_value, ndi_value, adx_value);
// 初始區波動較大, 先不繪出
//
if CurrentBar < Length then
begin
pdi_value = 0;
ndi_value = 0;
adx_value = 0;
end;
Plot1(pdi_value, "月+DI");
以上,我是用系統內建的跨頻率指標修改的,我要看月線DMI指標(天數設1),在日k線下看月線DMI,結果設出來有的股票可以正常顯示,有的股票不行。
以細產業建材指標為例,1802可正常顯示,1603、4506、2597、8444 、5455、8424、5543都看不見


3 評論