最近要來調整一下程式了
上完張林忠的課程,加上自己到處亂買一些軟體,自己有一些想法
今天寫了一個新的策略;東風一號(名字也要取響亮一點 XD)
主要用了委買量/委買筆-委賣量/委賣筆
但是因為回測的資料不足,只有今年二月中的資料到現在
只能再觀察看看績效了
2018年6月2日 星期六
2018年3月31日 星期六
2018年2月4日 星期日
2018年1月31日 星期三
2017年12月29日 星期五
2017年3月24日 星期五
【MultiCharts】有錢一號(當沖) 語法調整
2016年10月1日 星期六
【MultiCharts】【訊號】均線走平並上揚時買進
均線走平並上揚時買進
input:blen(37),slen(32),s1(0.0125);
value1=Average(close,blen);
value2=Average(close,slen);
if value1[4]>value1[3] and value1[3]>value1[2]
and value1[1]>=value1[2]and value1[0]>=value1[1] then begin
buy next bar at market;
end;
if value1[4]<value1[3] and value1[3]<value1[2]
and value1[1]<=value1[2]and value1[0]<=value1[1] then begin
sellshort next bar at market;
end;
if marketposition>0 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 then
buytocover next bar at entryprice*(1+s1) stop;
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;
input:blen(37),slen(32),s1(0.0125);
value1=Average(close,blen);
value2=Average(close,slen);
if value1[4]>value1[3] and value1[3]>value1[2]
and value1[1]>=value1[2]and value1[0]>=value1[1] then begin
buy next bar at market;
end;
if value1[4]<value1[3] and value1[3]<value1[2]
and value1[1]<=value1[2]and value1[0]<=value1[1] then begin
sellshort next bar at market;
end;
if marketposition>0 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 then
buytocover next bar at entryprice*(1+s1) stop;
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】【訊號】【葛蘭碧八大法則】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;
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;
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;
2016年9月27日 星期二
【MultiCharts】【訊號】站上均線買進,跌破布林通道賣出
input:len1(61),s1(0.025),aa(11),bb(2.575);
value1=BollingerBand(close,aa,bb);
value2=BollingerBand(close,aa,-bb);
if close cross over Average(close,len1) then
buy next bar at market;
if close cross under Average(close,len1) then
sellshort next bar at market;
if marketposition> 0 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 then
buytocover next bar at entryprice*(1+s1) stop;
if marketposition> 0 and close cross under value1 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 and close cross over value2 then
buytocover next bar at entryprice*(1+s1) stop;
value1=BollingerBand(close,aa,bb);
value2=BollingerBand(close,aa,-bb);
if close cross over Average(close,len1) then
buy next bar at market;
if close cross under Average(close,len1) then
sellshort next bar at market;
if marketposition> 0 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 then
buytocover next bar at entryprice*(1+s1) stop;
if marketposition> 0 and close cross under value1 then
sell next bar at entryprice*(1-s1) stop;
if marketposition<0 and close cross over value2 then
buytocover next bar at entryprice*(1+s1) stop;
【MultiCharts】【訊號】昨天收黑K,並且今天開高就進場的策略
昨天收黑K,並且今天開高就進場的策略,以60分K來看
input:len1(-1),len2(1);
value1 = closed(1)-opend(1);
value2 = opend(0)-closed(1);
condition1=len1*value1>0 and len2*value2>0;
condition2=len1*value1<0 and len2*value2<0;
if condition1 then
buy next bar at market;
if condition2 then
sellshort next bar at market;
input:len1(-1),len2(1);
value1 = closed(1)-opend(1);
value2 = opend(0)-closed(1);
condition1=len1*value1>0 and len2*value2>0;
condition2=len1*value1<0 and len2*value2<0;
if condition1 then
buy next bar at market;
if condition2 then
sellshort next bar at market;
訂閱:
文章 (Atom)