Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:请教程序化公式

1楼
18943320033 发表于:2019/12/15 12:57:26
老师,您好:
     初次学习程序化交易,想老师帮写一个交易公式,以便参考学习编写方式和方法,以及公式的基本结构。
    策略一:以小时图为交易周期,小时图收盘价大于周线开盘价时平空买多,小时图收盘价保持在周线开盘价以上时持多;
               小时图收盘价小于周线开盘价时平多卖空,收盘价保持在周线开盘价以下时持空;连续交易

    策略二:以小时图为交易周期,小时图收盘价大于60均线平空买多;小时图小于60均线时平多卖空。连续交易
2楼
FireScript 发表于:2019/12/16 9:51:22
 1.

week_c:CALLSTOCK('',vtOPEN,7,0);//调用周期数据

sellshort(c>WEEK_C and holding<0,1,market);//平空
buy(c>WEEK_C and holding=0,1,market);//开多
sell(c< WEEK_C and holding>0,holding,market);//平多
buyshort(c<WEEK_C and holding<0,1,market);//开空

2.

ma60:ma(c,60);
平多开空:c<ma60;
平空开多:c>ma60;

sellshort(平空开多 and holding<0,1,market);
buy(平空开多 and holding=0,1,market);
sell(平多开空 and holding>0,holding,market);
buyshort(平多开空 and holding<0,1,market);

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02344 s, 3 queries.