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

您現在的位置:程序化交易>> 期貨公式>> (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  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!

 


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

相關文章

    沒有相關內容
  主站蜘蛛池模板: 女人洗澡一级毛片一级毛片 | 最近中文字幕2019高清8? | 一区二区不卡免费视频 | 99精品热视频 | 日日夜夜摸摸 | 国产一级毛片免 | 一级毛片国产 | 亚洲高清免费在线观看 | 男人把女人狂躁的免费视频 | 欧美91精品久久久久网免费 | 天堂亚洲国产日韩在线看 | 国产亚洲高清不卡在线观看 | 日韩成人在线播放 | 俄罗斯一级毛片免费播放 | 久久亚洲国产精品一区二区 | 午夜宅男宅女的免费网站 | 午夜羞羞视频在线观看 | 免费看三级全黄 | 做久爱视频在线观看 | 日韩视 | 欧美日韩国产网站 | 亚洲日韩欧洲无码av夜夜摸 | 农村寡妇野外情一级毛片 | 欧美性高清视频免费看www | 午夜想想爱午夜剧场 | 日本草草视频在线观看 | 成人免费观看www视频 | dy888午夜国产午夜精品 | 国产成人一区 | 国产精品h片在线播放 | 午夜一区二区免费视频 | 色噜噜狠狠色综合网图区 | 国产专区一va亚洲v天堂 | 小明免费看视频 | 狠狠色狠狠色综合系列 | 成人亚洲欧美日韩在线 | 免费看一级黄色片 | 手机看片日韩欧美 | 999精品久久久中文字幕蜜桃 | 亚洲 欧美 日韩在线一区 | 亚洲国产精品乱码一区二区三区 |