Rss & SiteMap

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

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

标题:文华SPK,BPK转金字塔

1楼
云潇逸士 发表于:2018/12/27 22:16:26

B:=******;
M:=******;
HH:=HHV(B,M);
LL:=LLV(B,M);


HH>REF(HH,1),BPK;
LL<REF(LL,1),SPK;

HH-B>1&&REF(B,1)=REF(HH,1),SPK;
B-LL>1&&REF(B,1)=REF(LL,1),BPK;

 

请教老师上面二处BPK和SPK语句如何转成金字塔的呀?非常感谢!

2楼
FireScript 发表于:2018/12/28 9:07:32
可以不用改的,因为这2个函数金字塔下面也是同样类型支持的。
不过现在用的少。

要改的话,按照下面方式。
if cond1 then //平空反手 SPK
begin
sellshort(holding<0,holding,market);
buy(holding=0,1,market);    
end

if cond2 then //平多反手 BPK
begin
sell(holding>0,holding,market);
buyshort(holding=0,1,market);    
end


cond1,cond2就是你spk和bpk前面用的条件。

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


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