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

平倉信號出來后隔2根K線再啟動開倉條件怎么寫? [金字塔]

  • 咨詢內(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);

     

    問題:

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

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

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

     

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

     

  • 金字塔客服:

    參考

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

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

     

  • 用戶回復(fù):

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

     

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

     

  • 網(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);


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 日韩专区亚洲精品欧美专区| 精品久久久久久无码免费| 欧亚专线欧洲s码wm| 免费观看理论片毛片| 蜜桃视频在线观看官网| 天天视频国产免费入口| 久久99热精品免费观看动漫| 欧美a级毛欧美1级a大片| 亚洲精品综合久久| 看全色黄大色黄女视频| 啊灬啊灬啊灬快好深用力免费| 韩国理论电影午夜三级717| 国产精品2018| 91精品国产网曝事件门| 天天插在线视频| 一本色道久久88综合日韩精品 | 山东女人一级毛片| 中文无码字幕中文有码字幕| 日本高清xxxxx| 五月婷婷综合在线| 欧美一级欧美一级高清| 亚洲日韩在线观看免费视频| 波多野结衣57分钟办公室| 免费成人av电影| 精品国产丝袜自在线拍国| 四虎在线精品观看免费| 色噜噜狠狠色综合中文字幕| 国产亚洲精品免费| 8av国产精品爽爽ⅴa在线观看| 女人扒开屁股爽桶30分钟| 三级在线看中文字幕完整版| 无码人妻丰满熟妇区毛片18| 久久久久无码精品国产| 日本高清免费中文在线看| 久久精品国产亚洲AV无码麻豆| 最新版天堂中文在线| 亚洲aⅴ无码专区在线观看q| 欧美一级黄色影院| 亚洲ⅴ国产v天堂a无码二区| 欧美影院网站视频观看| 免费精品久久天干天干|