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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 金字塔等>> 其他期貨軟件知識(shí)>>正文內(nèi)容

平倉(cāng)信號(hào)出來(lái)后隔2根K線再啟動(dòng)開倉(cāng)條件怎么寫? [金字塔]

  • 咨詢內(nèi)容:

    buycondition:=c>ma(c,20);

    sellcondition:=c<ma(c,20);

    buycond:=cross(ma(c,5),ma(c,10));

    sellcond:=cross(ma(c,10),ma(c,5));

    if holding>0 and c<enterprice-20 then sell(1,1,limitr,c);

    if holding<0 and c>enterprice+20 then sellshort(1,1,limitr,c);

    if holding>0 and sellcondition then sell(1,1,limitr,c);

    if holding<0 and buycondition then sellshort(1,1,limitr,c);

    if holding>0 and sellcond then sell(1,1,limitr,c);

    if holding<0 and buycond then sellshort(1,1,limitr,c);

    if holding=0 and buycond then buy(1,1,limitr,c);

    if holding=0 and sellcond then buyshort(1,1,limitr,c);

     

    問(wèn)題:

    多單平倉(cāng)后(多種平倉(cāng)策略)如果滿足做空條件,不馬上做空,而是等過(guò)2根K線之后,滿足做空條件則做空

    空單平倉(cāng)后(多種平倉(cāng)策略)如果滿足做多條件,不馬上做多,而是等過(guò)2跟K先之后,滿足做多條件則做多

    以上思路如何實(shí)現(xiàn)?

     

    [此貼子已經(jīng)被作者于2012-1-16 0:37:33編輯過(guò)]

     

  • 金字塔客服:

    參考

    得到當(dāng)前位置之前上N次信號(hào)指定類型距當(dāng)前周期
    用法:
    TYPEBAR(N,TYPE)N表示上次信號(hào),
    TYPE表示信號(hào)類型 0、無(wú)信號(hào)1、開多2、平多3、開空;4、平空
    例如:TYPEBAR(2,1)表示:倒數(shù)第2個(gè)開多信號(hào)歷時(shí)
    該函數(shù)僅在逐K線計(jì)算模式下有效, 并且只能用在BUY,SELL等新圖表交易系統(tǒng)中,不能與舊圖表交易系統(tǒng)ENTERLONG,EXITLONG等混用。
    所屬函數(shù)組:交易系統(tǒng)

    [此貼子已經(jīng)被作者于2012-1-16 8:46:54編輯過(guò)]

     

  • 用戶回復(fù):

    單獨(dú)在開多語(yǔ)句中加入 typebar(1,4)>2  或者在開空語(yǔ)句中加入typebar(1,2)>2 信號(hào)都能正常顯示。可是在開多和開空語(yǔ)句中同時(shí)加入條件后,信號(hào)都消失了,這是為什么?

     

  • 網(wǎng)友回復(fù): 估計(jì)是您使用有誤,直接把代碼貼出來(lái)看看--附帶簡(jiǎn)要文字說(shuō)明

     

  • 網(wǎng)友回復(fù):

    buycondition:=c>ma(c,20);

    sellcondition:=c<ma(c,20);

    buycond:=cross(ma(c,5),ma(c,10));

    sellcond:=cross(ma(c,10),ma(c,5));

    if holding>0 and c<enterprice-20 then sell(1,1,limitr,c);

    if holding<0 and c>enterprice+20 then sellshort(1,1,limitr,c);

    if holding>0 and sellcondition then sell(1,1,limitr,c);

    if holding<0 and buycondition then sellshort(1,1,limitr,c);

    if holding>0 and sellcond then sell(1,1,limitr,c);

    if holding<0 and buycond then sellshort(1,1,limitr,c);

    if holding=0 and buycond and typebar(1,4)>2 then buy(1,1,limitr,c);

    if holding=0 and sellcond and typebar(1,2)>2 then buyshort(1,1,limitr,c);


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒(méi)有相關(guān)內(nèi)容
主站蜘蛛池模板: 欧美毛片免费 | 一级欧美在线的视频 | 国产精品99久久久久久www | 在线观看日本免费视频大片一区 | 四虎4hu永久在线观看 | 久久网国产 | 久久成人免费观看全部免费 | 最新中文字幕在线 | 久热福利视频 | 爱爱永久免费视频网站 | 九九久久久2 | 天堂亚洲国产日韩在线看 | 美女视频黄是免费的 | 天天干妹子 | www.伊人久久 | a级做爰视频在线观看 | 国产日韩欧美综合 | 免费观看a毛片一区二区不卡 | 色婷婷色 | 男人影院免费 | 中文字幕在线观看 | 九九热国产 | 久久精品成人国产午夜 | 国产欧美视频在线观看 | 香蕉成人在线 | 一级全黄色毛片 | 天天操天天干天天 | 欧美日韩大片 | 国产精品亚洲欧美日韩一区在线 | 四虎影院在线免费观看 | 麻豆精品一区二区三区免费 | 一级毛片在线观看免费 | 国内免费在线视频 | 日韩在线观看视频网站 | 成人精品mv视频在线观看 | 国产波波社区精品视频 | 免费一级毛片在线视频观看 | 欧美日韩一区二区三区麻豆 | 日韩久久久精品首页 | 91精品视频网 | 99在线精品日韩一区免费国产 |