欢迎访问 外汇EA下载与MT4/MT5自动交易资源 - 聚合外汇EA、黄金EA、量化交易工具与自动化交易实战内容。
登录 注册

自动交易系统 (Automated Trading System)

author emer | 0 人阅读 | 0 人评论 |
来源:ForexFactory · Trading Systems · 原帖链接
原帖作者:palcom
发布日期:First Post: Apr 7, 2007 7:10pm
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.

📦 帖子附件汇总 (1)

以下是回帖中所有共享的附件(1 个,已去重)。

🔐
请登录后参与评论
注册满12小时后评论,即可解锁附件下载
立即登录