close

 

*multicharts - 個股期現價差-2 *

 

 

 

 

 

 接續台指期現價差模型-1* 

 今天要分享的是個股期現價差交易~~~

2017年至今4月,大家有發現台指價差交易 ,

似乎不這麼好做會賺錢了嗎? 

我發現了 個股期 也是一個不錯的交易商品呢!

交易原理都大同小異 讓我們來看看吧~~~

bf7efaf997f037e3f61fdab1bcbd0619.jpg

 我們仍然依靠  價格的 發散 或 收斂  及  擺盪指標 就可以做交易,

 買股票、放空期貨 or 放空股票、買期貨  

 

 當然,也可做期現的配對交易!

c5dbf662f3cc9b039f6f506a7f8fd0f5.jpg

========================================================

面我以股票 儒鴻1476 儒鴻期貨 LWF ,

近期研究成果 (期現價差) 來跟大家做分享~


 





     

========================================================

 

 

範例程式碼 code:

//since: 2017.03 * author : chun yu 
//data 1: LWF15min K 
//data 2: 1476 DAY


VARS: SL(0.04),PL(0.07); 
inputs: spreads(5),bb(57),ss(59); 

value1 = close of data1 - close of data2; 

//in// 
if time>0915 and time<1324 then begin 
if  RSI(close of data2,63)<bb and value1 cross over spreads  then  buy 1 share next bar at market; 
if  RSI(close of data2,63)>ss and value1 cross under -spreads  then  sellshort 1 share next bar at market; 
end; 


//out// 
if marketposition=1 then sell next bar at entryprice*(1-SL) stop; 
if marketposition=-1 then buytocover next bar at entryprice*(1+SL) stop; 
if marketposition=1 then sell next bar at entryprice*(1+PL) limit; 
if marketposition=-1 then buytocover next bar at entryprice*(1-PL)limit; 


if marketposition<>0 and time>1320 and dayofweek(date)=3 and dayofmonth(date)>14 and dayofmonth(date)<22 then begin 
sell all contracts this bar on close; 
buytocover all contracts this bar on close; 
end;

 

========================================================


其實上面的code 很多地方是可以再精進修改的~

這邊就不多做敘述了,留給大家思考~

p.s. 若您也有不錯的想法,歡迎聯繫 與我一起討論ㄛ~

by. chun yu

 


========================================================


Part3待續~~~

 

策略更新到2017.08.20*

 

 

 

 









    離婚見證人板橋離婚證人三重離婚證人蘆洲離婚證人中和離婚證人新莊離婚證人







    新店離婚證人三重離婚證人中和離婚證人蘆洲離婚證人







    遺囑見證人結婚證人
    arrow
    arrow
      全站熱搜