Rss & SiteMap

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

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

标题:跨周期语法请教

1楼
前线小卒 发表于:2010/1/15 9:21:15

要求:如果14:30后日线上的收盘价格(A)小于前两周周K线的最低价的时候,如果有多单,平调所有多单,开(N)手空单,如果有空单,不继续开空。

        如果14:30后日线上的收盘价格(A)大于前两周周K线的最高价的时候,如果有空单,平调所有空单,开(N)手多单,如果有多单,不继续开多。

      请问怎么编写?如果想在图标显示怎么弄?

2楼
前线小卒 发表于:2010/1/15 10:11:03
看来今天工作人员今天全部去讲座了
3楼
金字塔 发表于:2010/1/15 10:30:11

现建一个指标

 

高低指标

HH:HHV(H,2);

LL:LLV(L,2);

 

============

 

再调用高低指标

 

HH2:” 高低指标.HH##WEEK”;

LL2:” 高低指标.LL##WEEK”;

sell(holding>0 and low< LL2,0,market);

sellshort(holding<0 and high> HH2,0, market);

 

buy(holding=0 and high> HH2,N, market);

buyshort(holding=0 and low< LL2,N , market);

[此贴子已经被作者于2010-1-15 10:31:26编辑过]
4楼
前线小卒 发表于:2010/1/15 10:53:56

HH:ref(HHV(H,2),1);

LL:ref(LLV(L,2),1);

 

hh2:"HH##WEEK";

LL2:"LL##WEEK";

sell(holding>0 and c< LL2,0,market);//C<ll2,如果有多单全部平掉,

sellshort(holding<0 and c> HH2,0, market);//c>hh2,如果有空单全部平掉

 

buy(holding=0 and c> HH2,N, market);//如果没单,c>hh2,开N手多单

buyshort(holding=0 and c< LL2,N , market);//如果没单,c<ll2,开n手空单

CURRENTTIME>=145000;

 如何在图表显示?

[此贴子已经被作者于2010-1-15 11:17:56编辑过]
5楼
前线小卒 发表于:2010/1/15 10:55:20
另外如何加入时间控制,比如要求14:50开仓
6楼
admin 发表于:2010/1/15 11:01:02

条件是 CURRENTTIME>=145000

7楼
前线小卒 发表于:2010/1/15 11:19:42

下午试就知道有没有用了

8楼
前线小卒 发表于:2010/1/15 14:55:52
没有预警,哪里错了?
9楼
金字塔 发表于:2010/1/15 15:33:56

单独建一个指标

 

高低指标

HH:HHV(H,2);

LL:LLV(L,2);

10楼
金字塔 发表于:2010/1/15 15:41:31

上面的指标名称:高低指标,需建在技术指标类

 

在交易系统类,建立下面的

input: N(2,1,30);

HH2:” 高低指标.HH##WEEK”;

LL2:” 高低指标.LL##WEEK”;

TT:=CURRENTTIME>=145000;

sell(TT and holding>0 and c< LL2,0,market);//C<ll2,如果有多单全部平掉,

sellshort(TT and holding<0 and c> HH2,0, market);//c>hh2,如果有空单全部平掉

 

buy(TT and holding=0 and c> HH2,N, market);//如果没单,c>hh2,开N手多单

buyshort(TT and holding=0 and c< LL2,N , market);//如果没单,c<ll2,开n手空单

 

自动交易改为:

input: N(2,1,30);

HH2:” 高低指标.HH##WEEK”;

LL2:” 高低指标.LL##WEEK”;

TT:=CURRENTTIME>=145000;

 

tsell(TT and tholding>0 and c< LL2,0,mkt);//C<ll2,如果有多单全部平掉,

tsellshort(TT and tholding<0 and c> HH2,0, mkt);//c>hh2,如果有空单全部平掉

 

tbuy(TT and tholding=0 and c> HH2,N, mkt);//如果没单,c>hh2,开N手多单

tbuyshort(TT and tholding=0 and c< LL2,N , mkt);//如果没单,c<ll2,开n手空单

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


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