Rss & SiteMap

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

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

标题:[求助]老师好,麻烦帮忙转换一个文华的公式

1楼
TRADE580 发表于:2020/12/22 15:41:51
以下是文华的代码,转换成金字塔的

DK:=MA(C,10);
ZN:=MA(C,20);
//均线交叉波段
JC1:=CROSS(DK,ZN);
SC1:=CROSSDOWN(DK,ZN);
N11:=BARSLAST(JC1)+1;
N21:=BARSLAST(SC1)+1;
HH1:=BACKSET(REFX(SC1,1)||ISLASTBAR,HHVBARS(H,N11)+1);
LL1:=BACKSET(REFX(JC1,1)||ISLASTBAR,LLVBARS(L,N21)+1);
DRAWLINE1(CROSS(LL1,0.001),L,CROSS(HH1,0.001),H,0),COLORGRAY,DOT;
DRAWLINE1(CROSS(HH1,0.001),H,CROSS(LL1,0.001),L,0),COLORGRAY,DOT;

LL:=CROSS(LL1,0.001);
HH:=CROSS(HH1,0.001);


XXX:=LL && L<REF(L,SUMBARS(LL,2)-1) && REF(L,SUMBARS(LL,2)-1)<REF(L,SUMBARS(LL,3)-1) && REF(H,SUMBARS(HH,1)-1)<REF(H,SUMBARS(HH,2)-1);
DRAWLINE3(CROSS(LL,0.001)&&XXX,L,0,1,REF(H,SUMBARS(CROSS(HH,0.001),1)-1),SUMBARS(CROSS(HH,0.001),1)-1,0),COLORGREEN,LINETHICK2;


XXH:=HH && H>REF(H,SUMBARS(HH,2)-1) && REF(H,SUMBARS(HH,2)-1)>REF(H,SUMBARS(HH,3)-1)&& REF(L,SUMBARS(LL,1)-1)>REF(L,SUMBARS(LL,2)-1);
DRAWLINE3(CROSS(HH,0.001)&&XXH,H,0,1,REF(L,SUMBARS(CROSS(LL,0.001),1)-1),SUMBARS(CROSS(LL,0.001),1)-1,0),COLORRED,LINETHICK2;
2楼
TRADE580 发表于:2020/12/22 15:50:36
默认波段线用虚线绘制,满足XXX或XXH条件时的波段加粗并上色
3楼
FireScript 发表于:2020/12/22 16:03:40
 DK:=MA(C,10);
ZN:=MA(C,20);
//均线交叉波段
JC1:=CROSS(DK,ZN);
SC1:=CROSS(ZN,DK);
N11:=BARSLAST(JC1)+1;
N21:=BARSLAST(SC1)+1;
HH1:=BACKSET(REFX(SC1,1)||ISLASTBAR,HHVBARS(H,N11)+1);
LL1:=BACKSET(REFX(JC1,1)||ISLASTBAR,LLVBARS(L,N21)+1);
DRAWLINE(CROSS(LL1,0.001),L,CROSS(HH1,0.001),H,0,COLORGRAY,0,vtDASH);
DRAWLINE(CROSS(HH1,0.001),H,CROSS(LL1,0.001),L,0,COLORGRAY,0,vtDASH);

LL:=CROSS(LL1,0.001);
HH:=CROSS(HH1,0.001);

//
//XXX:=LL && L<REF(L,SUMBARS(LL,2)-1) && REF(L,SUMBARS(LL,2)-1)<REF(L,SUMBARS(LL,3)-1) && REF(H,SUMBARS(HH,1)-1)<REF(H,SUMBARS(HH,2)-1);
//DRAWLINE3(CROSS(LL,0.001)&&XXX,L,0,1,REF(H,SUMBARS(CROSS(HH,0.001),1)-1),SUMBARS(CROSS(HH,0.001),1)-1,0),COLORGREEN,LINETHICK2;
//
//
//XXH:=HH && H>REF(H,SUMBARS(HH,2)-1) && REF(H,SUMBARS(HH,2)-1)>REF(H,SUMBARS(HH,3)-1)&& REF(L,SUMBARS(LL,1)-1)>REF(L,SUMBARS(LL,2)-1);
//DRAWLINE3(CROSS(HH,0.001)&&XXH,H,0,1,REF(L,SUMBARS(CROSS(LL,0.001),1)-1),SUMBARS(CROSS(LL,0.001),1)-1,0),COLORRED,LINETHICK2;
//


注释掉的这部分实现不了。DRAWLINE3 实现的效果无法等效替换。
4楼
TRADE580 发表于:2020/12/22 16:54:17
用其他代码能 实现  当 满足XXX或XXH条件时的波段加粗并上色吗
5楼
FireScript 发表于:2020/12/22 17:08:28
因为是其他软件的函数,所以我们只能先试下看看吧。
6楼
TRADE580 发表于:2020/12/22 18:29:41
好的,幸苦了
共6 条记录, 每页显示 10 条, 页签: [1]


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