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

請教平倉代碼的問題 [金字塔]

  • 咨詢內容:

    variable:maxprofit=0;
    variable:win=0;
    variable:win2=0;

     

    IF holding>0 and enterbars>0 THEN BEGIN
    win:=high-enterprice;
    IF win>maxprofit THEN maxprofit:=win;
    win2:=maxprofit-win;
    END


    盈利大于50,小于100時,回撤30%平多 win2>=0.3*maxprofit then sell();

     

    盈利大于50,小于100,這個條件描述是用 maxprofit>50 and maxprofit<100,還是 win>50 AND win<100 呢?

     

    我之前用的maxprofit,但空頭(enterprice-L)止盈結果不對,用win反而對了,但是多頭止盈又不正常了。

     

  • 金字塔客服:

    maxprofit_duo:=hhv(h-enterprice,enterbars+1);

    maxprofit_kong:=llv(enterprice-l,enterbars+1);

     

    if maxprofit_duo>100 and maxprofit_duo<50 and holding>0 and c-enterpcie<=0.3*maxprofit_duo then sell;

    if maxprofit_kong>100 and maxprofit_kong<50 and holding<0 and enterpcie-c<=0.3*maxprofit_kong then sell;

     

  • 用戶回復: 以下是引用jinzhe在2013/12/6 9:41:27的發言:

    maxprofit_duo:=hhv(h-enterprice,enterbars+1);

    maxprofit_kong:=llv(enterprice-l,enterbars+1);

     

    if maxprofit_duo>100 and maxprofit_duo<50 and holding>0 and c-enterpcie<=0.3*maxprofit_duo then sell;

    if maxprofit_kong>100 and maxprofit_kong<50 and holding<0 and enterpcie-c<=0.3*maxprofit_kong then sell;

    c-enterpcie<=0.3*maxprofit_duo then sell

    回撤超過30%,應該是 c-enterpcie <= (1-0.3)*maxprofit_duo 吧?

     

  • 網友回復: 這個數學上的定義,用戶自己斟酌吧,我主要給出思路

     

  • 網友回復: 以下是引用jinzhe在2013/12/6 13:05:32的發言:

    if maxprofit_kong>100 and maxprofit_kong<50 and holding<0 and enterpcie-c<=0.3*maxprofit_kong then sell;

     

    多頭沒問題,空頭仍然不對,不出信號,空頭如果去掉“maxprofit_kong>100 and maxprofit_kong<50” 這個條件就正常了

     

    這也太怪了吧,為啥呢

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 1145508240  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 性一交一乱一视频免费看| 1000部啪啪未满十八勿入| 热99精品视频| 国产馆精品推荐在线观看| 亚洲成a人片在线看| 老妇bbwbbw视频| 大桥久未无码吹潮在线观看| 久久成人a毛片免费观看网站| 绿巨人晚上彻底放飞自己| 天天摸天天摸色综合舒服网| 亚洲国产成人高清在线观看| 高清视频一区二区三区| 性色AV一区二区三区夜夜嗨| 五月激情丁香网| 精品日韩二区三区精品视频| 国产欧美精品一区二区| caoporn地址| 日本一区二区三区在线观看视频| 免费又黄又爽又猛的毛片| 3d无遮挡h肉动漫在线播放| 日韩在线观看高清| 啊灬啊灬啊快日出水了| 青青草原亚洲视频| 我和娇妻乱荡史| 五月激情丁香网| 欧美视频免费在线| 凹凸国产熟女精品视频| **毛片免费观看久久精品| 好男人在线社区www我在线观看 | 又粗又硬又爽的三级视频| 97久视频精品视频在线老司机| 校服白袜男生被捆绑微博新闻| 国产V亚洲V天堂无码久久久| 99久久久国产精品免费牛牛| 日韩一区二区三区电影| 人间**电影8858| 国产曰批免费视频播放免费s| 多人伦精品一区二区三区视频| 久久综合九色欧美综合狠狠| 精品女同一区二区三区免费站| 国产小呦泬泬99精品|