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

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

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

  • 咨詢內(nèi)容: 雙均線交易系統(tǒng)帶有固定點(diǎn)位止損止盈
    有以下幾個(gè)問題:
    1.比方均線金叉進(jìn)多,達(dá)到止盈目標(biāo)止盈后形態(tài)上仍然是多頭趨勢(shì),如何限制繼續(xù)開倉(cāng)?
    2.如果前一次止損,后面再次開倉(cāng)加一個(gè)突破過濾條件?
    現(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) // 有多倉(cāng)的情況
    ? ? {
    ? ?? ?? ?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) // 有空倉(cāng)的情況
    ? ? {
    ? ?? ???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)時(shí)開倉(cāng),過了就不做了。對(duì)第二點(diǎn),如果出現(xiàn)止損,要再等到新出現(xiàn)交叉再開倉(cāng)。
    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)時(shí)開倉(cāng),過了就不做了。對(duì)第二點(diǎn),如果出現(xiàn)止損,要再等到新出現(xiàn)交叉再開倉(cāng)。
    If(Ma ...

    謝謝!

    ?

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

 

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

可聯(lián)系技術(shù)人員 QQ: 262069696  點(diǎn)擊在線交流或微信號(hào):cxh99cxh99  進(jìn)行 有償收費(fèi) 編寫!

怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!

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


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 久久精品国产亚洲婷婷 | 亚洲成色 | 国产大片中文字幕在线观看 | 神马老子不卡视频在线 | 国产伦精品一区二区三区免 | 不卡影院 | 99精品在线免费观看 | 中文字幕亚洲欧美一区 | 国产成人综合亚洲 | 九七97影院理论片手机在线观看 | 奇米激情网 | 婷婷的久久五月综合先锋影音 | 羞羞视频免费在线观看 | 自拍亚洲国产 | 亚洲一级免费视频 | 91欧美在线 | 不卡一区二区在线 | 离线枕边人在线观看 | 亚洲精品久久九九精品 | 99国产精品视频免费观看 | 久久99国产乱子伦精品免 | 亚洲精品一区二区久久这里 | 热99这里只有精品 | 毛片视频网站在线观看 | 日本一区二 | 精品国精品国产自在久国产不卡 | 亚洲国产成人久久一区二区三区 | 99久久99热精品免费观看国产 | 波多野结衣久久精品免费播放 | 色接久久 | 天天干亚洲 | 日本大片免费一级 | 91精品国产高清91久久久久久 | 国产成人精品免费视频大全五级 | 日韩伦理一区二区三区 | 欧美成人毛片在线视频 | 三级不卡 | 欧美伦乱 | aⅴ免费视频 | 亚洲综合一二三 | 久久精品免费大片国产大片 |