请老师帮忙改成金字塔的 [金字塔]
- 咨询内容:
TD准备:=IF(REF(C,1)>REF(C,4),1,0); TD0:=BARSLAST(TD准备); A:=IF(BARSSINCEN(LAST(C<REF(C,4),9,0),9),1,DRAWNULL); F:=IF(BARSLASTCOUNT(C<REF(C,4))>=9,1, A); G:=A+F;
TD11:=IF(1,TD0=1,0); TD21:=IF(1,LLV(C,1)<REF(C,4),0);
TD21:=IF(1,G,DRAWNULL); A1:=TD11 AND TD21;
TD12:=IF(2,TD0=2,0); {TD22:=IF(2,LLV(C,2)<REF(C,4),0);} TD22:=IF(2,G,DRAWNULL); A2:=TD12 AND TD22; TD13:=IF(3,TD0=3,0); {TD23:=IF(3,LLV(C,3)<REF(C,4),0);} TD23:=IF(3,G,DRAWNULL); A3:=TD13 AND TD23; TD14:=IF(4,TD0=4,0); {TD24:=IF(4,LLV(C,4)<REF(C,4),0);} TD24:=IF(4,G,DRAWNULL); A4:=TD14 AND TD24; TD15:=IF(5,TD0=5,0); {TD25:=IF(5,LLV(C,5)<REF(C,4),0);} TD25:=IF(5,G,DRAWNULL); A5:=TD15 AND TD25; TD16:=IF(6,TD0=6,0); {TD26:=IF(6,LLV(C,6)<REF(C,4),0);} TD26:=IF(6,G,DRAWNULL); A6:=TD16 AND TD26; TD17:=IF(7,TD0=7,0); {TD27:=IF(7,LLV(C,7)<REF(C,4),0);} TD27:=IF(7,G,DRAWNULL); A7:=TD17 AND TD27; TD18:=IF(8,TD0=8,0); {TD28:=IF(8,LLV(C,8)<REF(C,4),0);} TD28:=IF(8,G,DRAWNULL); A8:=TD18 AND TD28; TD19:=IF(9,TD0=9,0); {TD29:=IF(9,LLV(C,9)<REF(C,4),0);} TD29:=IF(9,G,DRAWNULL); A9:=TD19 AND TD29; DRAWTEXT(A1,L-0.3,'1'),COLORYELLOW; DRAWTEXT(A2,L-0.3,'2'),COLORYELLOW; DRAWTEXT(A3,L-0.3,'3'),COLORYELLOW; DRAWTEXT(A4,L-0.3,'4'),COLORYELLOW; DRAWTEXT(A5,L-0.3,'5'),COLORYELLOW; DRAWTEXT(A6,L-0.3,'6'),COLORYELLOW; DRAWTEXT(A7,L-0.3,'7'),COLORYELLOW; DRAWTEXT(A8,L-0.3,'8'),COLORYELLOW; DRAWTEXT(A9,L-0.3,'9'),COLORYELLOW;
{TD13次倒数=买入计数} TDP:=BARSLAST(A9); B:=IF(LAST(C<REF(C,2),13,0),1,DRAWNULL); TD11A:=IF(1,TDP=1,TDP); TD21A:=IF(1,LLV(C,1)<REF(L,2),DRAWNULL); {TD21A:=IF(1,B,DRAWNULL);} D1:=TD11A AND TD21A; TD12A:=IF(2,TDP=2,TDP); TD22A:=IF(2,LLV(C,2)<REF(L,2),DRAWNULL); {TD22A:=IF(2,B,DRAWNULL);} D2:=TD12A AND TD22A; TD13A:=IF(3,TDP=3,TDP); TD23A:=IF(3,LLV(C,3)<REF(L,2),DRAWNULL); {TD23A:=IF(3,B,DRAWNULL);} D3:=TD13A AND TD23A; TD14A:=IF(4,TDP=4,TDP); TD24A:=IF(4,LLV(C,4)<REF(L,2),DRAWNULL); {TD24A:=IF(4,B,DRAWNULL);} D4:=TD14A AND TD24A; TD15A:=IF(5,TDP=5,TDP); TD25A:=IF(5,LLV(C,5)<REF(L,2),DRAWNULL); {TD25A:=IF(5,B,DRAWNULL);} D5:=TD15A AND TD25A; TD16A:=IF(6,TDP=6,TDP); TD26A:=IF(6,LLV(C,6)<REF(L,2),DRAWNULL); {TD26A:=IF(6,B,DRAWNULL);} D6:=TD16A AND TD26A; TD17A:=IF(7,TDP=7,TDP); TD27A:=IF(7,LLV(C,7)<REF(L,2),DRAWNULL); {TD27A:=IF(7,B,DRAWNULL);} D7:=TD17A AND TD27A; TD18A:=IF(8,TDP=8,TDP); TD28A:=IF(8,LLV(C,8)<REF(L,2),DRAWNULL); {TD28A:=IF(8,B,DRAWNULL);} D8:=TD18A AND TD28A; TD19A:=IF(9,TDP=9,TDP); TD29A:=IF(9,LLV(C,9)<REF(L,2),DRAWNULL); {TD29A:=IF(9,B,DRAWNULL);} D9:=TD19A AND TD29A; TD10A:=IF(10,TDP=10,TDP); TD20A:=IF(10,LLV(C,10)<REF(L,2),DRAWNULL); {TD20A:=IF(10,B,DRAWNULL);} D10:=TD10A AND TD20A; TD110A:=IF(11,TDP=11,TDP); TD210A:=IF(11,LLV(C,11)<REF(L,2),DRAWNULL); {TD210A:=IF(11,B,DRAWNULL);} D11:=TD110A AND TD210A; TD120A:=IF(12,TDP=12,TDP); TD220A:=IF(12,LLV(C,12)<REF(L,2),DRAWNULL); {TD220A:=IF(12,B,DRAWNULL);} D12:=TD120A AND TD220A; TD130A:=IF(13,TDP=13,TDP); TD230A:=IF(13,LLV(C,13)<REF(L,2),DRAWNULL); {TD230A:=IF(13,B,DRAWNULL);} D13:=TD130A AND TD230A; DRAWTEXT(D1,L-0.6,'1'),COLORRED; DRAWTEXT(D2,L-0.6,'2'),COLORRED; DRAWTEXT(D3,L-0.6,'3'),COLORRED; DRAWTEXT(D4,L-0.6,'4'),COLORRED; DRAWTEXT(D5,L-0.6,'5'),COLORRED; DRAWTEXT(D6,L-0.6,'6'),COLORRED; DRAWTEXT(D7,L-0.6,'7'),COLORRED; DRAWTEXT(D8,L-0.6,'8'),COLORRED; DRAWTEXT(D9,L-0.6,'9'),COLORRED; DRAWTEXT(D10,L-0.6,'10'),COLORRED; DRAWTEXT(D11,L-0.6,'11'),COLORRED; DRAWTEXT(D12,L-0.6,'12'),COLORRED; DRAWTEXT(D13,L-0.6,'13'),COLORRED; 迪马克公式 - 金字塔客服:
请解释下BARSSINCEN和barslastcount
- 用户回复:
下BARSSINCEN:1、该函数的定义:N周期内第一个条件成立到当前的周期数。
2、该函数的用法:BARSSINCEN(X,N),N周期内第一次X不为0到现在的天数,例如:BARSSINCEN(HIGH>10,10)表示10个周期内股价超过10元时到当前的周期数。BARSLASTCOUNT(COND) 从当前周期向前计算,统计连续满足条件的周期数。
注:
1、返回值为从当前周期计算COND连续不为0的周期数
2、条件第一次成立的当根k线上BARSLASTCOUNT(COND)的返回值为1例:
BARSLASTCOUNT(CLOSE>OPEN);
//计算当根K线在内连续为阳线的周期数 - 网友回复:
还是不好翻译,解释下
A:=IF(BARSSINCEN(LAST(C<REF(C,4),9,0),9),1,DRAWNULL);
F:=IF(BARSLASTCOUNT(C<REF(C,4))>=9,1, A);这两句代码是什么意思,要讲具体的用途,不要光翻译意思
- 网友回复:
通达信LAST 持续存在 LAST(X,A,B):持续存在.
用法: LAST(CLOSE>OPEN,10,5) 表示从前10日到前5日内一直阳线
若A为0,表示从第一天开始,B为0,表示到最后日止A:9个周期(C<REF(C,4)持续到现在9个周期存在)到现在的周期数
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容