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

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

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

相關(guān)標簽:期貨與期權(quán)套利策略 、 期貨期權(quán)組合策略 、 期權(quán)與期貨的區(qū)別 、 中金所期貨期權(quán)學院 、 期貨期權(quán) 2017 、 中國期貨期權(quán)學院 、 期貨期權(quán)交易規(guī)則 、 期貨期權(quán)入門 、 期貨期權(quán)遠期 、 期貨與期權(quán)論文 、 期貨期權(quán)是什么 、 豆粕期貨期權(quán)合約 、 期貨期權(quán)實戰(zhàn)2017 、 遠期 期貨 期權(quán)的區(qū)別 、 中國金融期貨期權(quán)學院 、
? ?? ?你好,下面是我編寫的股指期貨代碼,現(xiàn)在有幾個問題想請教一下。
? ?? ?1、以下的代碼有沒有地方可以簡化?可以減少計算時間。
? ?? ?2、現(xià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
?

?

?

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

?

 

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

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

 


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
  主站蜘蛛池模板: 日韩中文字幕网 | 五月综合激情视频在线观看 | 91不卡 | 国产黄色自拍视频 | 国产欧美成人一区二区三区 | 天天干天天射天天插 | 中文字幕亚洲综合久久202 | 国产亚洲亚洲精品777 | 中文字幕一区二区三区 精品 | 在线观看91精品国产不卡免费 | 国产在线短视频 | 最新亚洲精品国自产在线观看 | 久久天天躁夜夜躁狠狠85麻豆 | 精品国产一区二区三区四 | 欧美特级一级毛片 | 欧美一级毛片久久精品 | 91在线视频免费91 | 国产成人毛片视频不卡在线 | 在线免费观看中文字幕 | 亚洲国产欧美自拍 | 日韩中文字幕在线有码视频网 | 亚洲精品国产国语 | 国产精品免费久久久久影院小说 | 日本aa视频 | 四虎影院最新地址 | 天天操操操操 | 亚洲免费黄色 | 中文字幕一区二区三区视频在线 | 国产精品福利午夜h视频 | 久久成人午夜 | 男女性高清爱潮视频免费观看 | 国产美女白丝袜精品_a不卡 | 日本波多野结衣字幕久久 | 在线免费看a | 久久精品国产99国产精品亚洲 | 豆奶视频污 | jiucao视频在线观看 | 亚洲欧美色综合一区二区在线 | 午夜精品久久久久久毛片 | 香香影院在线观看 | 在线国产网站 |