語法問題麻煩大家了 - 財經
By Ophelia
at 2016-05-14T14:35
at 2016-05-14T14:35
Table of Contents
var:KB(0),KS(0),mkp(0);
value1=Close of data2;
if date <> date[1] then begin
KB=0;
KS=0;
mkp=0;
end;
if marketposition=0 and value1 > 500 then begin buy("buy")
next bar at market;
if marketposition=0 and value1<-500 then begin sellshort("sell")
next bar at market;
if marketposition>0 then KB=1;
if marketposition<0 then KS=1;
end;
mkp=marketposition;
if mkp[1] <> 1 and mkp=1 then kb=kb+1;
if mkp[1] <> -1 and mkp=-1 then ks=ks+1;
if marketposition>0 then sell next bar at entryprice-20 stop;
if marketposition>0 then sell next bar at entryprice+20 stop;
if marketposition>0 then buytocover next bar at entryprice-20 stop;
if marketposition>0 then buytocover next bar at entryprice+20 stop;
if time>=1326 then sell("exitbuy1") this bar;
if time>=1326 then buytocover("exitshort1") this bar;
setexitonclose;
不好意思我裡面寫的內容是副圖2指數高過500點做多停損停利都20點 跟低過500點 一天
多空進出場一次請問哪邊寫錯了??
--
value1=Close of data2;
if date <> date[1] then begin
KB=0;
KS=0;
mkp=0;
end;
if marketposition=0 and value1 > 500 then begin buy("buy")
next bar at market;
if marketposition=0 and value1<-500 then begin sellshort("sell")
next bar at market;
if marketposition>0 then KB=1;
if marketposition<0 then KS=1;
end;
mkp=marketposition;
if mkp[1] <> 1 and mkp=1 then kb=kb+1;
if mkp[1] <> -1 and mkp=-1 then ks=ks+1;
if marketposition>0 then sell next bar at entryprice-20 stop;
if marketposition>0 then sell next bar at entryprice+20 stop;
if marketposition>0 then buytocover next bar at entryprice-20 stop;
if marketposition>0 then buytocover next bar at entryprice+20 stop;
if time>=1326 then sell("exitbuy1") this bar;
if time>=1326 then buytocover("exitshort1") this bar;
setexitonclose;
不好意思我裡面寫的內容是副圖2指數高過500點做多停損停利都20點 跟低過500點 一天
多空進出場一次請問哪邊寫錯了??
--
Tags:
財經
All Comments
By Brianna
at 2016-05-14T18:56
at 2016-05-14T18:56
By Mason
at 2016-05-17T19:48
at 2016-05-17T19:48
By Necoo
at 2016-05-20T11:40
at 2016-05-20T11:40
By Liam
at 2016-05-24T15:35
at 2016-05-24T15:35
By Hedda
at 2016-05-28T11:46
at 2016-05-28T11:46
By Odelette
at 2016-06-01T19:18
at 2016-06-01T19:18
By Sandy
at 2016-06-02T10:26
at 2016-06-02T10:26
By Kyle
at 2016-06-05T10:05
at 2016-06-05T10:05
Related Posts
13號星期五的迷思~~~
By Agatha
at 2016-05-12T15:44
at 2016-05-12T15:44
盈餘管理對於投資人的投資意願
By Olga
at 2016-05-10T16:59
at 2016-05-10T16:59
2016/05/08~2016/05/15週閒聊
By Steve
at 2016-05-09T08:53
at 2016-05-09T08:53
刷存在感的檢討報告0503+0504
By Catherine
at 2016-05-08T18:50
at 2016-05-08T18:50
買 MultiCharts 中文版或英文版?
By Donna
at 2016-05-07T13:28
at 2016-05-07T13:28