大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频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)容
  主站蜘蛛池模板: 天天射天| 日韩欧美~中文字幕 | 天天草夜夜操 | 欧美日韩影视 | 最新国产一区二区精品久久 | 成 人 黄 色 视频 免费观看 | 欧美成人剧情中文字幕 | 久久一级| 亚洲视频在线视频 | 香港一级a毛片在线播放 | 日本免费一级 | 久久www免费人成看片入口 | 一区二区三区欧美视频 | 奇米网狠狠干 | 四虎4hu影库永久地址 | 日日人人 | 4虎影院永久地址www | 一区二区精品久久 | 亚洲国产欧美自拍 | 99视频精品全部在线播放 | 国产成人精品一区二三区 | 亚洲综合在线观看视频 | 亚洲一区二区三区香蕉 | 久久香蕉网站 | 国产美女亚洲精品久久久毛片 | 香蕉综合在线 | 手机看片国产免费久久网 | 欧美成人精品一区二区 | 久久久国产成人精品 | 热久久99精品这里有精品 | 国产成人精品午夜在线播放 | 婷婷四房 | 国产午夜精品福利 | 成人免费毛片一区二区三区 | 神马不卡伦影视 | 狠狠色噜噜狠狠狠狠97老肥女 | 老子午夜伦不卡影院 | 欧美一级久久 | 免费一级大片儿 | 亚洲精品在线视频 | 欧美日韩网站 |