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

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 交易開拓者(TB)>> 開拓者知識>>正文內(nèi)容

關(guān)于平倉后再次開倉問題 [開拓者 TB]

  • 咨詢內(nèi)容: 雙均線交易系統(tǒng)帶有固定點位止損止盈
    有以下幾個問題:
    1.比方均線金叉進多,達到止盈目標(biāo)止盈后形態(tài)上仍然是多頭趨勢,如何限制繼續(xù)開倉?
    2.如果前一次止損,后面再次開倉加一個突破過濾條件?
    現(xiàn)在代碼如下:
    Params
    ? ?? ???Numeric length(10);
    ? ? ? ? ? ? ? ? Numeric length1(20);
    ? ? ? ? ? ? ? ? Numeric TakeProfitSet(50);
    ? ?? ???Numeric StopLossSet(30);
    ? ?? ???Numeric Lots(3);
    Vars
    ? ? ? ? ? ? ? ? NumericSeries AvgValue;
    ? ?? ???NumericSeries AvgValue1;
    ? ? ? ? ? ? ? ? Numeric MyEntryPrice;
    ? ? ? ?? ???Numeric myexitprice;
    ? ? ? ? ? ? ? ? Numeric Minpoint;
    Begin
    ? ?? ?? ?AvgValue = AverageFC(C,Length);
    ? ?? ?? ?AvgValue1= AverageFC(C,Length1);
    ? ?? ???If(MarketPosition <>1 and? ?AvgValue[1]> AvgValue1[1])
    ? ? ? ? {
    ? ? ? ???myentryprice=open;
    ? ? ? ???Buy(LOTS,myentryprice);
    ? ? ? ???}
    ? ? ? ???
    ? ? ? ? If(MarketPosition <>-1? ? and??AvgValue[1]< AvgValue1[1] )
    ? ? ? ? {
    ? ? ? ???myentryprice=open;
    ? ? ? ???SellShort(LOTS,open);
    ? ? ? ???}? ? ? ?
    ? ? ? ? /////
    ? ? ? ? If(MarketPosition==1) // 有多倉的情況
    ? ? {
    ? ?? ?? ?if(high>=(myentryprice+TakeProfitSet*MinPoint))
    ? ? ? ?? ? {
    ? ? ? ?? ???myexitprice=(myentryprice+TakeProfitSet*MinPoint);
    ? ? ? ?? ? if(open>myexitprice)myexitprice=open;
    ? ? ? ?? ? Sell(0,myexitprice);
    ? ? ? ?? ? }Else if(low<=(myentryprice-StopLossSet*MinPoint))
    ? ? ? ?? ? {
    ? ? ? ?? ???myexitprice=(myentryprice-StopLossSet*MinPoint);
    ? ? ? ? ? ? ? ? if(open<myexitprice)myexitprice=open;
    ? ? ? ? ? ? ? ? Sell(0,myexitprice);
    ? ? ? ? ? ? ? ? }
    ? ? ? ?? ?
    ? ? ? ???}
    ? ? ? ?? ?if(MarketPosition==-1) // 有空倉的情況
    ? ? {
    ? ?? ???if(low<=(myentryprice-TakeProfitSet*MinPoint))
    ? ? ? ?? ? {
    ? ? ? ?? ???myexitprice=(myentryprice-TakeProfitSet*MinPoint);
    ? ? ? ?? ? if(open<myexitprice)myexitprice=open;
    ? ? ? ?? ? BuyToCover(0,myexitprice);
    ? ? ? ?? ? }Else if(High>=(myentryprice+StopLossSet*MinPoint))
    ? ? ? ?? ? {
    ? ? ? ?? ???myexitprice=(myentryprice+StopLossSet*MinPoint);
    ? ? ? ? ? ? ? ? if(open>myexitprice)myexitprice=open;
    ? ? ? ? ? ? ? ? BuyToCover(0,myexitprice);
    ? ? ? ? ? ? ? ? }
    ? ? }
    ? ? ? ?

    ? ? ? ???End

    ?

    ?來源:CXH99.COM

  • TB技術(shù)人員: 最好只在金叉、死叉出現(xiàn)時開倉,過了就不做了。對第二點,如果出現(xiàn)止損,要再等到新出現(xiàn)交叉再開倉。
    If(MarketPosition <>1 and??AvgValue[2] <= AvgValue1[2] and??AvgValue[1]> AvgValue1[1])
    ? ? Buy();
    If(MarketPosition <>-1 and??AvgValue[2] >= AvgValue1[2] and AvgValue[1]< AvgValue1[1])
    ? ? SellShort();

    ?

  • TB客服:
    Yuen_Lee 發(fā)表于 2021-8-3 11:44
    最好只在金叉、死叉出現(xiàn)時開倉,過了就不做了。對第二點,如果出現(xiàn)止損,要再等到新出現(xiàn)交叉再開倉。
    If(Ma ...

    謝謝!

    ?

  • 網(wǎng)友回復(fù): http://www.wjs7878.com/

 

有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友

可聯(lián)系技術(shù)人員 QQ: 262069696  點擊在線交流或微信號:cxh99cxh99  進行 有償收費 編寫!

怎么收費,代編流程等詳情請點擊閱讀!

(注:由于人數(shù)限制,QQ或微信請選擇方便的一個聯(lián)系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 欧美怡红院免费的视频 | 一个人看的www在线高清 | 亚洲影院一区 | 欧美激情一区二区三区视频 | 日韩视频一| 一区二区在线欧美日韩中文 | 日本欧美在线播放 | 日韩永久免费进入2015 | 天天做天天玩天天爽天天 | 草草视频在线播放 | 亚洲欧美另类自拍第一页 | 亚洲第一区视频在线观看 | 日本黄大片在线观看 | 成人久久18免费网站游戏 | 成年人免费网站 | 男人爱看的视频网站免费 | 2021国产精品成人免费视频 | 成片免费的禁v影片 | 日韩在线不卡一区在线观看 | 第一福利在线导航 | 久青草免费在线视频 | 国产亚洲蜜芽精品久久 | www.日韩三级 | 国产精品亚洲片在线观看不卡 | 日批免费观看 | 拔擦拔擦8x高清在线 | 亚洲国产精品自产在线播放 | 91香蕉网站| 日韩一级精品视频在线观看 | 99re在线观看视频 | 久久网伊人 | www日韩在线 | 污视频在线免费 | 国产l精品国产亚洲区久久 国产papa | 99在线视频精品 | 大美香蕉伊在看欧美 | 看全色黄大色黄大片免责看 | 欧美国产日韩精品 | 亚洲最大在线观看 | 欧美特黄一免在线观看 | 亚洲国产一区二区三区青草影视 |