Rss & SiteMap

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

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

标题:求助修改成金字塔模型!!!

1楼
citscwb 发表于:2015/3/11 0:10:09
C>VALUEWHEN(DATE<>REF(DATE,1),OPEN)&&TIME<0910,BK;
C<VALUEWHEN(DATE<>REF(DATE,1),OPEN)&&TIME<0910,SK;
AA:=HHV(H,BARSBK+1);
BB:=LLV(L,BARSSK+1);
(C<BKPRICE*(1-N/1000)||
(AA-BKPRICE>BKPRICE*N/1000&&C<=BKPRICE+(AA-BKPRICE)*N/100))
&&BKPRICE>0||TIME>=1455,SP;
(C>SKPRICE*(1+N/1000)||
(BKPRICE-BB>BKPRICE*N/1000&&C>=BKPRICE+(BKPRICE-BB)*N/100))
&&BKPRICE>0||TIME>=1455,BP;
AUTOFILTER;
2楼
jinzhe 发表于:2015/3/11 8:58:12
请问n是多少?
3楼
CITSCWB 发表于:2015/3/12 21:52:28
N是1
4楼
pyd 发表于:2015/3/13 9:04:53

|| 这是什么意思?

5楼
pyd 发表于:2015/3/13 9:19:31

||是或者的意思吧?改成or了。

你代码中用的时间是北京时间,在软件里工具-》选项-》视图里勾选北京本地时间,重启金字塔生效。

n:=1;

if C>VALUEWHEN(DATE<>REF(DATE,1),OPEN) and TIME<091000 then buy(holding=0,1,market);

if C<VALUEWHEN(DATE<>REF(DATE,1),OPEN) and TIME<091000 then buyshort(holding=0,1,market);
AA:=HHV(H,enterbars+1);
BB:=LLV(L,enterbars+1);
if (C<enterPRICE*(1-N/1000) or
(AA-enterPRICE>enterprice*N/1000 and C<=enterprice+(AA-enterprice)*N/100))
 and enterprice>0 or TIME>=145500 then sell(HOLDING>0,holding,market);
if (C>enterPRICE*(1+N/1000) or (enterprice-BB>enterprice*N/1000 and C>=enterprice+(enterprice-BB)*N/100))
 and enterprice>0 or TIME>=145500 then sellshort(HOLDING<0,holding,market);

 

[此贴子已经被作者于2015/3/13 9:20:17编辑过]
共5 条记录, 每页显示 10 条, 页签: [1]


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