人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

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

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

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




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
?

?

?

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

?

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

可聯(lián)系技術(shù)人員 QQ: 511411198  有需要幫忙請點(diǎn)擊這里留言!!!進(jìn)行 有償 編寫!不貴!點(diǎn)擊查看價格!

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 色综合久久六月婷婷中文字幕 | 久久午夜宅男免费网站 | 久久精品国产久精国产果冻传媒 | 国产成人综合一区精品 | 男女晚上黄羞羞视频播放 | 中文字幕日韩国产 | 亚洲成精品动漫久久精久 | 国产欧美日韩专区 | 男人使劲桶女人下面动态图片 | 欧美乱码视频 | 国产精品资源在线观看网站 | 国产一区二区三区免费在线观看 | 亚欧乱亚欧乱色视频免费 | www.黄色网址 | 黄色小说软件 | 青青青在线视频播放 | 欧美日本在线一区二区三区 | 成人网址在线观看 | 国产精品免费看久久久香蕉 | 精品一区二区三区免费视频 | 99资源在线观看 | 亚洲激情视频网站 | 我看黄色片 | 激情小说亚洲 | 亚洲欧美日韩在线一区 | 91中文字幕网 | 日韩黄色大片 | 久久久久成人精品免费播放动漫 | 国产野外 | 香港美女一级毛片 视频 | 天天干夜夜爽天天操夜夜爽视频 | 欧美日韩一区二区三区四区 | 在线视频精品播放 | 黄色片免费网站 | 日本欧美一区二区三区高清 | 欧美香蕉 | 日本福利网址 | 香蕉视频亚洲 | 色五月激情五月 | 成人在线午夜 | 亚洲色图欧美一区 |