各位前輩日安:
小弟有一個之前前輩分享的"超級趨勢指標"的腳本
想把5分K的數值,跨頻率畫在1分K上
但是寫了很多方式,寫不出來~
請問各位前輩,我該用哪個函數來寫?
以下是原始腳本:
input: Length(12,"天數");
input: Multiplier(3,"ATR倍數");
var:V1(99999),v2(0);
var:updn(true); //true= up; false = dn
//
if currentBar = 1 then begin
updn = true;
end;
if currentBar <> 1 then begin
if updn = true then
begin
if close > v1 then begin
updn = false;
v1 = 99999;
plot4(close-atr(length)*multiplier,"V V");
end;
end
else
begin
if close < v2 then begin
updn = true;
v2 = 0;
plot3(close+atr(length)*multiplier,"A A");
end;
end;
end;
//
if updn = true then begin
value1 = close + atr(length)*multiplier;
if v1 > value1 then V1 =value1;
plot1(V1);
end;
if updn = false then begin
value2 = close - atr(length)*multiplier;
if v2 < value2 then V2 = value2;
plot2(v2);
end;
 
 
             
        
         
         
     
     分類
    分類
 
            
2 評論