Rss & SiteMap

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

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

标题:公式中未来定义变量

1楼
zygq 发表于:2020/10/29 14:40:44

老师,好下面文华公式中,HV未定义,请指导,谢谢

 

VV:="MIN$5$V";//框线是什么框线
//1MIN,3MIN,5MIN,10MIN,15MIN,30MIN,1HOUR,2HOUR,3HOUR,4HOUR,DAY,WEEK,MONTH。
XX:=BARSLAST(VV<>REF(VV,1))+1;
SP:=ISLASTBAR||REFX(XX=1,1);
OO:=REF(O,XX-1);

DRAWSL(SP&&C>OO,OO,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,OO,0,-XX+1,0,COLORGREEN),LINETHICK2;
DRAWSL(SP&&C=OO,OO,0,-XX+1,0,COLORGRAY),LINETHICK2;

DRAWSL(SP&&C>OO,C,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,C,0,-XX+1,0,COLORGREEN),LINETHICK2;

DRAWLINE(SP&&C>OO,C,1,OO,COLORRED),LINETHICK2;
DRAWLINE(SP&&C>OO,C,XX-1,1,OO,XX-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,HHV(H,XX),XX/2-1,1,C,XX/2-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,LLV(L,XX),XX/2-1,1,OO,XX/2-1,0),COLORRED,LINETHICK2;

DRAWLINE(SP&&C<OO,C,1,OO,COLORGREEN),LINETHICK2;
DRAWLINE(SP&&C<OO,C,XX-1,1,OO,XX-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGREEN,LINETHICK2;

DRAWLINE(SP&&C=OO,C,1,OO,COLORGRAY),LINETHICK2;
DRAWLINE(SP&&C=OO,C,XX-1,1,OO,XX-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGRAY,LINETHICK2;

HH:IF(SP,HHV(H,XX),NULL);
LL:IF(SP,LLV(L,XX),NULL);

N:=5;
HHH:=SP && HH>HV(HH,5*N) && HH>=REFX(HHV(HH,5*N),5*N);
LLL:=SP && LL<LV(LL,5*N) && LL<=REFX(LLV(LL,5*N),5*N);

KTEXT(HHH,-2,HH,1,COLORRED,'GAO'),VALIGN2;
KTEXT(LLL,-2,LL,1,COLORGREEN,'DI'),VALIGN0;

[此贴子已经被作者于2020/10/29 14:41:31编辑过]
2楼
FireScript 发表于:2020/10/29 14:54:16
 HV(HH,5*N)

相当于:
REF(hhv(HH,5*N),1)
3楼
zygq 发表于:2020/10/29 15:19:11
老师,
KTEXT 未定义,用KLINE替换不行,请指导
4楼
FireScript 发表于:2020/10/29 15:21:02
 显示文字用DRAWTEXT 函数。
5楼
zygq 发表于:2020/10/29 15:26:02


DRAWTEXT(HHH11,-2,HH11,1,COLORRED,'GAO'),VALIGN2;       

 

DRAWTEXT(LLL11,-2,LL11,1,COLORGREEN,'DI'),VALIGN0;

 

上面“  ”所调用的参数与预义参数不符,如果解决?

6楼
FireScript 发表于:2020/10/29 16:56:51
 你直接看下这个函数的函数说明吧。 函数说明都有详细说的。
直接在编辑器里在函数名称上右键-定位到参考位置
7楼
zygq 发表于:2020/10/29 16:58:51

老师,我把最后二句去了,通过公式测评,为什么在主图上无显示公式内容,请老师看看,什么问题?

 

VV:="MIN$5$V";//框线是什么框线
//1MIN,3MIN,5MIN,10MIN,15MIN,30MIN,1HOUR,2HOUR,3HOUR,4HOUR,DAY,WEEK,MONTH。
XX:=BARSLAST(VV<>REF(VV,1))+1;
SP:=ISLASTBAR||REFX(XX=1,1);
OO:=REF(O,XX-1);

DRAWSL(SP&&C>OO,OO,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,OO,0,-XX+1,0,COLORGREEN),LINETHICK2;
DRAWSL(SP&&C=OO,OO,0,-XX+1,0,COLORGRAY),LINETHICK2;

DRAWSL(SP&&C>OO,C,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,C,0,-XX+1,0,COLORGREEN),LINETHICK2;

DRAWLINE(SP&&C>OO,C,1,OO,COLORRED),LINETHICK2;
DRAWLINE(SP&&C>OO,C,XX-1,1,OO,XX-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,HHV(H,XX),XX/2-1,1,C,XX/2-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,LLV(L,XX),XX/2-1,1,OO,XX/2-1,0),COLORRED,LINETHICK2;

DRAWLINE(SP&&C<OO,C,1,OO,COLORGREEN),LINETHICK2;
DRAWLINE(SP&&C<OO,C,XX-1,1,OO,XX-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGREEN,LINETHICK2;

DRAWLINE(SP&&C=OO,C,1,OO,COLORGRAY),LINETHICK2;
DRAWLINE(SP&&C=OO,C,XX-1,1,OO,XX-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGRAY,LINETHICK2;

HH:IF(SP,HHV(H,XX),NULL);
LL:IF(SP,LLV(L,XX),NULL);

N:=5;
HHH:=SP && HH>REF(HHV(HH,5*N),1) && HH>=REFX(HHV(HH,5*N),5*N);
LLL:=SP && LL<REF(LLV(LL,5*N),1) && LL<=REFX(LLV(LL,5*N),5*N);

 

8楼
FireScript 发表于:2020/10/29 17:07:59
 VV:="MIN$5$V";//框线是什么框线

这个不对啊。你要调用一个指标。这样写不对的,一个是格式不对。另外是你需要有一个被调用的指标。v是一个指标名称?



9楼
zygq 发表于:2020/10/30 10:32:32
张老师,刚才问了,文华论坛的技术员,回复如下:

VV:="MIN$5$V";//1MIN,3MIN,5MIN,10MIN,15MIN,30MIN,1HOUR,2HOUR,3HOUR,4HOUR,DAY,WEEK,MONTH。

这句是跨周期语句,引用5分钟周期 上根K线的 成交量。

V 是成交量函数 VOL的简写
10楼
yukizzc 发表于:2020/10/30 10:36:25

vv:"vol##MIN5";

XX:=BARSLAST(VV<>REF(VV,1))+1;
SP:=ISLASTBAR||REFX(XX=1,1);
OO:=REF(O,XX-1);

DRAWSL(SP&&C>OO,OO,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,OO,0,-XX+1,0,COLORGREEN),LINETHICK2;
DRAWSL(SP&&C=OO,OO,0,-XX+1,0,COLORGRAY),LINETHICK2;

DRAWSL(SP&&C>OO,C,0,-XX+1,0,COLORRED),LINETHICK2;
DRAWSL(SP&&C<OO,C,0,-XX+1,0,COLORGREEN),LINETHICK2;

DRAWLINE(SP&&C>OO,C,1,OO,COLORRED),LINETHICK2;
DRAWLINE(SP&&C>OO,C,XX-1,1,OO,XX-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,HHV(H,XX),XX/2-1,1,C,XX/2-1,0),COLORRED,LINETHICK2;
DRAWLINE(SP&&C>OO,LLV(L,XX),XX/2-1,1,OO,XX/2-1,0),COLORRED,LINETHICK2;

DRAWLINE(SP&&C<OO,C,1,OO,COLORGREEN),LINETHICK2;
DRAWLINE(SP&&C<OO,C,XX-1,1,OO,XX-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGREEN,LINETHICK2;
DRAWLINE(SP&&C<OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGREEN,LINETHICK2;

DRAWLINE(SP&&C=OO,C,1,OO,COLORGRAY),LINETHICK2;
DRAWLINE(SP&&C=OO,C,XX-1,1,OO,XX-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,HHV(H,XX),XX/2-1,1,OO,XX/2-1,0),COLORGRAY,LINETHICK2;
DRAWLINE(SP&&C=OO,LLV(L,XX),XX/2-1,1,C,XX/2-1,0),COLORGRAY,LINETHICK2;

HH:IF(SP,HHV(H,XX),NULL);
LL:IF(SP,LLV(L,XX),NULL);

N:=5;
HHH:=SP && HH>REF(HHV(HH,5*N),1) && HH>=REFX(HHV(HH,5*N),5*N);
LLL:=SP && LL<REF(LLV(LL,5*N),1) && LL<=REFX(LLV(LL,5*N),5*N);

 

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


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