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

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

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

  • 咨詢內容:

    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先之后,滿足做多條件則做多

    以上思路如何實現?

     

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

     

  • 金字塔客服:

    參考

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

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

     

  • 用戶回復:

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

     

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

     

  • 網友回復:

    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);


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 一级特黄特黄毛片欧美的 | 国产精品国产亚洲精品不卡 | youjizz欧美粗又大中国 | 农村寡妇一级毛片免费看视频 | 国产欧美日韩第一页 | 亚洲第一激情 | 午夜性色福利视频在线视频 | 九九热在线视频 | 免费视频久久久 | 国产亚洲一区二区精品 | 成人影院一区二区三区 | 久久久久久九 | 毛片毛片毛片毛片 | 欧美一级毛片一级 | 国产成人综合一区精品 | 国产最新一区二区三区天堂 | 青草久草视频 | 国产一区中文字幕 | 按摩理论片 | 美女在线视频观看影院免费天天看 | 日本免费在线一区 | 久久伊人精品 | 韩日一级毛片 | 欧美日韩小视频 | 国产精品香蕉在线一区 | 99国产精品久久久久久久... | 亚洲va天堂va国产va久 | 国产综合成人久久大片91 | 成人在线毛片 | 一级毛片视频免费 | 久久美| 夜夜爽天天狠狠九月婷婷 | 99毛片| 欧美精品久久久久久久久大尺度 | 国产成人综合网亚洲欧美在线 | 亚洲人成一区二区不卡 | 亚洲高清视频在线观看 | 亚洲综合色就色手机在线观看 | 国产三级做爰在线观看∵ | 日韩中文字幕在线看 | 欧美日韩精品一区二区三区 |