mir ist vor kurzem aufgefallen, dass der Parabolic SAR sich teilweise anders verhält, als beispielsweie in anderen Programmen, obwohl die Einstellungen identisch sind.
Habe daraufhin mal die Werte kontrolliert, indem ich die Werte nachgerechnet habe. Dabei fiel mir auf, dass der Parabolic SAR, der standardmäßig integriert ist,
nicht dem entspricht, wie die Formel definiert ist. Habe dann mal hier im Forum nach einem anderen gesucht und folgenden Code gefunden:
Code: Select all
Express ParabolicSAR
vars
input
$AccIncrement(0.00,1.00,0.02,0.01,2),
$AccMax(0.0,1.0,0.2,0.1,1);
series
tendance,extreme,tmpSAR,SARlong,SARshort,x,y;
numeric facteur,tmp;
calculation
if IsFirstBar() then
begin
facteur = $AccIncrement;
tmpSAR = low;
extreme = low;
tendance = 1;
SARlong = void;
SARshort = void;
end
else
begin
if (tendance[1] = 1) then
begin
extreme = max(extreme[1],high);
if (tmpSAR[1] > low) then
begin
tendance = -1;
facteur = $AccIncrement;
tmp = max(high,high[1]);
tmpSAR = max(extreme,tmp);
extreme = low;
SARshort = void;
SARlong = tmpSAR;
end
else
begin
tendance = 1;
if (extreme > extreme[1]) and (facteur < $AccMax) then
begin
facteur = facteur + $AccIncrement;
end
tmpSAR = tmpSAR[1] + facteur*(extreme - tmpSAR[1]);
tmp = min(low,low[1]);
tmpSAR = min(tmpSAR,tmp);
SARshort = tmpSAR;
SARlong = void;
end
end
else
begin
if (tendance[1] = -1) then
begin
extreme = min(extreme[1],low);
if (tmpSAR[1] < high) then
begin
tendance = 1;
facteur = $AccIncrement;
tmp = min(low,low[1]);
tmpSAR = min(extreme,tmp);
extreme = high;
SARshort = tmpSAR;
SARlong = void;
end
else
begin
tendance = -1;
if (extreme < extreme[1]) and (facteur < $AccMax) then
begin
facteur = facteur + $AccIncrement;
end
tmpSAR = tmpSAR[1] + facteur*(extreme - tmpSAR[1]);
tmp = max(high,high[1]);
tmpSAR = max(tmpSAR,tmp);
SARshort = void;
SARlong = tmpSAR;
end
end
end
end
x = extreme;
interpretation
begin
end
plot(tmpSAR,black,0);
plot(SARshort,green,2);
plot(SARlong,red,2);//@@@cs:778175-3661043-610814_cs@@@
Laut meinen Berechnungen entspricht diese Formel bzw. Code dem echten Parabolic SAR. Jedoch ist hier das Problem, dass dieser nicht zum backtesten verwendet werden kann. Weiterhin flippt der hier, wenn Hi/Lo über- oder unterschritten wird, besser wäre ein Close, wie beim standard-Parabolic-SAR. Ist es möglich den Fehler in dem Standard-Parabolic SAR zu beheben oder eben diesen hier eingefügten Code so anzupassen? Danke für Eure Zeit.
LG und ein schönes Wochenende
GG