I hope this will be become a popular subforum. I supose it's very popular(profitable) to have automated trading system, specially for people who have no time to be all day looking in monitor, and waiting for market movement. I'm using GFT trading platform, and I'm interested using Parabolic SAR indicator for automated trading system, but I don't now how to create Parabolic SAR indicator into automated strategy.
For those who know how to do this, I will be very grateful if someone can write me this strategy.
This below is just Parabolic SAR indicator(GFT trading platform):
indicator Parabolic_SAR;
input af_inc = 0.02, af_max = 0.20;
draw line("Parabolic", Points);
vars i(number), islong(bool), af(number), extreme(number), sar(number);
begin
if back(close) >= front(close) then begin
islong := true;
af := af_max;
extreme := high[front(close)];
sar := low[front(close)];
line[front(close)] := sar;
for i := front(close) + 1 to back(close) do begin
sar := sar + af * (extreme - sar);
if islong then
if low[i] < sar then begin
islong := false;
af := af_inc;
sar := extreme;
extreme := low[i];
end else begin
if extreme < high[i] then begin
extreme := high[i];
af := af + af_inc;
if af > af_max then
af := af_max;
end;
end
else {if not islong}
if high[i] > sar then begin
islong := true;
af := af_inc;
sar := extreme;
extreme := high[i];
end else begin
if extreme > low[i] then begin
extreme := low[i];
af := af + af_inc;
if af > af_max then
af := af_max;
end;
end;
line[i] := sar;
end;
end;
end.
For those who know how to do this, I will be very grateful if someone can write me this strategy.
This below is just Parabolic SAR indicator(GFT trading platform):
indicator Parabolic_SAR;
input af_inc = 0.02, af_max = 0.20;
draw line("Parabolic", Points);
vars i(number), islong(bool), af(number), extreme(number), sar(number);
begin
if back(close) >= front(close) then begin
islong := true;
af := af_max;
extreme := high[front(close)];
sar := low[front(close)];
line[front(close)] := sar;
for i := front(close) + 1 to back(close) do begin
sar := sar + af * (extreme - sar);
if islong then
if low[i] < sar then begin
islong := false;
af := af_inc;
sar := extreme;
extreme := low[i];
end else begin
if extreme < high[i] then begin
extreme := high[i];
af := af + af_inc;
if af > af_max then
af := af_max;
end;
end
else {if not islong}
if high[i] > sar then begin
islong := true;
af := af_inc;
sar := extreme;
extreme := high[i];
end else begin
if extreme > low[i] then begin
extreme := low[i];
af := af + af_inc;
if af > af_max then
af := af_max;
end;
end;
line[i] := sar;
end;
end;
end.