[問題] 語法問題麻煩大家了

看板Trading (金融交易)作者 (MrWUYUAN)時間9年前 (2016/05/14 14:35), 編輯推噓2(208)
留言10則, 5人參與, 最新討論串1/1
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點 一天 多空進出場一次請問哪邊寫錯了?? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.165.220 ※ 文章網址: https://www.ptt.cc/bbs/Trading/M.1463207726.A.16F.html

05/14 15:33, , 1F
看不懂你想問什麼
05/14 15:33, 1F

05/14 15:33, , 2F
另外你的週期是多少啊
05/14 15:33, 2F

05/14 18:02, , 3F
我上面修改好了差一個END 但不會限制一天多空個進出
05/14 18:02, 3F

05/14 18:03, , 4F
一次 現在附圖指數沒大於500或小於500也進出不知道
05/14 18:03, 4F

05/14 18:04, , 5F
什麼地方有錯 多謝大大幫忙了
05/14 18:04, 5F

05/14 20:59, , 6F
停利寫法怪怪,應該用限價單而非停止單吧?
05/14 20:59, 6F

05/15 07:06, , 7F
非常謝謝大家最後都用好了 自己的第一支訊號
05/15 07:06, 7F

05/15 07:06, , 8F
非常高興!!
05/15 07:06, 8F

05/15 19:44, , 9F
推語法 可以順便學~
05/15 19:44, 9F

08/13 18:59, , 10F
版主包庇朋友eric拉神做假違法招生,被踢爆洗臉腦羞成怒
08/13 18:59, 10F
文章代碼(AID): #1NDiSk5l (Trading)
文章代碼(AID): #1NDiSk5l (Trading)