Rss & SiteMap

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

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

标题:序列运行模式下的 买卖函数分别是什么?

1楼
qq代人发帖 发表于:2013/11/25 14:23:02
请教:序列运行模式下的 买卖函数分别是什么?
2楼
fly 发表于:2013/11/25 14:28:30

...

[此贴子已经被作者于2013/11/25 14:36:20编辑过]
3楼
qq代人发帖 发表于:2013/11/25 14:34:44

       后台  tbuy(开多),tsell(平多),tbuyshort(开空),tsellshort(平空),可在序列或逐k模式运行。

4楼
fly 发表于:2013/11/25 14:40:06

 buy(开多),sell(平多),buyshort(开空),sellshort(平空) 都是图表程序化交易函数

variable定义的全局变量,也是图表程序化交易的函数,且必须在逐K线模式下运行.

 

这是你在策略编写区看到的一个代码吧

一般的策略,逐K模式就可以的,推荐您先从图表程序化交易学起

5楼
fly 发表于:2013/11/25 14:46:39

buycond:ref(count(c>o,2)=2,1);
sellcond:ref(count(c<o,2)=2,1);


if tholding>0 and sellcond  then tsell(1,1,mkt);
if tholding<0 and buycond  then tsellshort(1,1,mkt);

 

if buycond and tholding=0  then
 begin
 tbuy(1,1,mkt);
 end
 
if tholding=0 and sellcond  then tbuyshort(1,1,mkt);

6楼
fly 发表于:2013/11/25 15:17:23

是的,图表程序化BUY的下单语句,只能用逐K模式运行

 

以下简单图表程序化交易,可运行在序列模式

ma5:ma(close,5);
ma15:ma(close,15);

{平空}EXITSHORT:CROSS(ma5,ma15) OR time>=151400 ,TFILTER;
{开多}ENTERLONG:CROSS(ma5,ma15) AND time>091500 and time<151400 ,TFILTER;
{平多}EXITLONG:CROSS(ma15,ma5) OR time>=151400 ,TFILTER;
{开空}ENTERSHORT:CROSS(ma15,ma5) AND time>091500 and time<151400 ,TFILTER ;

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


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