大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

您現在的位置:程序化交易>> 期貨公式>> (MC)multicharts>> MC公式>>正文內容

MC setstoploss止損后,就不能自動開倉了[MC公式]

相關標簽:期貨與期權套利策略 、 期貨期權組合策略 、 期權與期貨的區別 、 中金所期貨期權學院 、 期貨期權 2017 、 中國期貨期權學院 、 期貨期權交易規則 、 期貨期權入門 、 期貨期權遠期 、 期貨與期權論文 、 期貨期權是什么 、 豆粕期貨期權合約 、 期貨期權實戰2017 、 遠期 期貨 期權的區別 、 中國金融期貨期權學院 、
? ?? ?你好,下面是我編寫的股指期貨代碼,現在有幾個問題想請教一下。
? ?? ?1、以下的代碼有沒有地方可以簡化?可以減少計算時間。
? ?? ?2、現在運行中,setstoploss止損后,就不能自動開倉了,如果想止損后依然按條件自動開倉,應該怎么寫代碼?
? ???非常感謝!




inputs:p01(9999),p02(9999),p03(9999),p04(9999);
variables:co1(0),c02(0),c03(0),c04(0),d01(0),d02(0),d03(0),d04(0);
begin
co1=p01-0.2;
c02=p02-0.2;
c03=p03-0.2;
c04=p04-0.2;
d01=p01+0.2;
d02=p02+0.2;
d03=p03+0.2;
d04=p04+0.2;
if close cross above co1 and marketposition=0 then sellshort 1 contract next bar at market;
if close cross above c02 and marketposition=0 then sellshort 1 contract next bar at market;
if close cross above c03 and marketposition=0 then sellshort 1 contract next bar at market;
if close cross above c04 and marketposition=0 then sellshort 1 contract next bar at market;
if close cross under d01 and marketposition=0 then buy 1 contract next bar at market;
if close cross under d02 and marketposition=0 then buy 1 contract next bar at market;
if close cross under d03 and marketposition=0 then buy 1 contract next bar at market;
if close cross under d04 and marketposition=0 then buy 1 contract next bar at market;
if close cross above co1 and marketposition=1 then sellshort 1 contracts next bar at market;
if close cross above c02 and marketposition=1 then sellshort 1 contracts next bar at market;
if close cross above c03 and marketposition=1 then sellshort 1 contracts next bar at market;
if close cross above c04 and marketposition=1 then sellshort 1 contracts next bar at market;
if close cross above d01 and marketposition=-1 then buy 1 contract next bar at market;
if close cross above d02 and marketposition=-1 then buy 1 contract next bar at market;
if close cross above d03 and marketposition=-1 then buy 1 contract next bar at market;
if close cross above d04 and marketposition=-1 then buy 1 contract next bar at market;
if close cross under co1 and marketposition=1 then sellshort 1 contract next bar at market;
if close cross under c02 and marketposition=1 then sellshort 1 contract next bar at market;
if close cross under c03 and marketposition=1 then sellshort 1 contract next bar at market;
if close cross under c04 and marketposition=1 then sellshort 1 contract next bar at market;
if close cross under d01 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross under d02 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross under d03 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross under d04 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross above d01 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross above d02 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross above d03 and marketposition=-1 then buy 1 contracts next bar at market;
if close cross above d04 and marketposition=-1 then buy 1 contracts next bar at market;
setstoploss(600);
if time>=1457 then
sell next bar at market;
buytocover next bar at market;
end
?

?

?

公式導入教程: 【通達信公式源碼導入方法教程】 【同花順公式源碼導入方法教程】 【大智慧新一代公式源碼導入方法教程

?

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 511411198  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
  主站蜘蛛池模板: 亚洲精品国产精品乱码不97 | 国产无卡一级毛片aaa | 欧洲黄色网 | 最新日韩在线观看 | 99热久久国产精品这里有全部 | 欧美不卡视频在线 | 免费黄色一级大片 | 国产精品国产自线拍手机观看 | 久操福利 | 日本免费一区二区三区a区 日本免费一区二区三区看片 | 一本一本久久a久久综合精品蜜桃 | 在线亚洲精品国产成人二区 | 国产亚洲高清在线精品99 | 四虎激情| 波多野结衣免费一区二区三区香蕉 | 国产欧美日韩精品第三区 | 成人禁在线观看午夜亚洲 | 国产欧美曰韩一区二区三区 | 在线看片777av免费观看 | 狼狼色丁香久久婷婷综合五月 | 国产亚洲欧美另类一区二区三区 | 国产国产人免费观看在线视频 | 成年看片永远免费 | 亚洲欧美日韩在线观看二区 | 欧美日韩99 | 欧美日韩一区二区高清免费视频 | 素人巨乳被调教 | 日本不卡一二三区 | 欧美日韩a级片 | 综合图区亚洲 | 欧美专区一区二区三区 | 久久久久久久久中文字幕 | 欧美69xx | 夜夜爽天天狠狠九月婷婷 | 欧美成人免费全部观看天天性色 | 免费一级毛片免费播放 | 热久久最新地址 | 精品欧美一区二区三区在线 | 日本一区二区三区在线 观看网站 | 久青草免费视频手机在线观看 | ww亚洲ww亚在线观看 |