小編您好 以下是跨頻率月macd的寫法
但我想在圖示表示方面改成類似大戶持股這樣 就是當月的osc整個月數值維持在當月中最新的數值 而前一個月整個月的osc數值維持在最後一天的數值 不曉得這樣表示要怎麼改才好 就是類似階梯狀的呈現法
if barfreq <> "Tick" and barfreq <> "Min" and barfreq <> "D" and barfreq <> "W" and barfreq <> "AD" and barfreq <> "AW" then raiseruntimeerror("不支援大頻率跨小頻率");
input: FastLength(12), SlowLength(26), MACDLength(9);
SetInputName(1, "DIF短天數");
SetInputName(2, "DIF長天數");
SetInputName(3, "MACD天數");
xf_macd("AM",xf_weightedclose("AM"),FastLength,SlowLength,MACDLength,value1,value2,value3);
// 前面區段資料變動較大, 先不繪出
//
if CurrentBar <= SlowLength then
begin
Value1 = 0;
Value2 = 0;
Value3 = 0;
end;
Plot1(Value1, "DIF");
Plot2(Value2, "MACD");
Plot3(Value3, "Osc");

類似以下這個表示法


5 評論