顯示具有 葛蘭碧八大法則 標籤的文章。 顯示所有文章
顯示具有 葛蘭碧八大法則 標籤的文章。 顯示所有文章

2016年10月1日 星期六

【MultiCharts】【訊號】【葛蘭碧八大法則】2 & 5 策略

input:aa(20);

value1=Average(c,aa);


if value1[0]>value1[1] and value1[1]>value1[2] then begin
 if close <=value1*1.01 then begin
  if c[2]>c[1] and c[0]>c[1] then
   buy next bar at market;
  end;
end;

if value1[0]<value1[1] and value1[1]<value1[2] then begin
 if close >=value1*0.09 then begin
  if c[2]<c[1] and c[0]<c[1] then
   sellshort next bar at market;
  end;
end;

condition1=dayofweek(date)=3 and dayofmonth(date)>14 and 22<dayofmonth(date);
if condition1 then begin
 if time>1314 then begin
  sell this bar at Close;
  buytocover this bar on close;
 end;
end;


【MultiCharts】【訊號】【葛蘭碧八大法則】1 & 8 策略

input:aa(20);

value1=Average(c,aa);


if value1[0]>=value1[1] and value1[1]>=value1[2] then begin
 if close cross over value1 then
 buy next bar at market;
end;

if value1[0]<=value1[1] and value1[1]<=value1[2] then begin
 if close cross over value1 then
 sellshort next bar at market;
end;

condition1=dayofweek(date)=3 and dayofmonth(date)>14 and 22<dayofmonth(date);
if condition1 then begin
 if time>1314 then begin
  sell this bar at Close;
  buytocover this bar on close;
 end;
end;