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;


沒有留言:

張貼留言