线学主图公式源码

  • 所属栏目: 主图公式
  • 公式平台: 通达信/同花顺/大智慧
  • 授权方式: 免费源码
  • 适用类别: 主图
  • 公式评级:
  • 公式人气:
  • 公式管理: Admin
  • 更新时间: 2018年09月15日
  • 关键字: 通达信,主图,公式,源码
公式源码与图示

N:=15;
UR:=6;
LR:=6;
TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT <=BC2 AND L=LOWER;
HP:=CURRBARSCOUNT <=TC2 AND H=UPPER;
NOD:=(IF(TC2 > BC2,TC2,BC2)-IF(TC2 > BC2,BC2,TC2));
LR1:=FORCAST(C,NOD+1);
LR2:=SLOPE(C,NOD+1);
LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));
AD:=ABS(NP-FP);
DBL:=BARSLAST(BC1!=DRAWNULL)+1;
DBH:=BARSLAST(TC1!=DRAWNULL)+1;
BSP:=IF(BC2 > TC2,DBL,DBH)-1;
LRL:=IF(NP > FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H > LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=CONST(BARSLAST(AT1-LRL=AT2));
AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));
AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L < LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=CONST(BARSLAST(LRL-UT1=UT2));
UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));
UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT >=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));
RL:=IF(CURRBARSCOUNT >=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));
MA1:=MA(CLOSE,5);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
TJ1:=BARSLAST(CROSS(DIF,DEA));
TJ2:=REF(H,TJ1);
ADD:=SUMBARS(V ,CAPITAL*1);
A2:=SUM(COST(20),ADD)/ADD;
A1:=SUM(COST(10),ADD)/ADD;
A3D:=SUM(COST(30),ADD)/ADD;
A4D:=SUM(COST(40),ADD)/ADD;
A5D:=SUM(COST(50),ADD)/ADD;
E:=LLV(L,250)=L;
E1:=BARSLAST(E);
A线:=HHV(H,20);
B线:=LLV(L,20);
C线:=(A线+B线)/2;
STICKLINE(IF(BC2 > TC2,HP,LP),LOWER,UPPER,0,0),COLOR628962;
STICKLINE(IF(BC2 > TC2,LP,HP),LOWER,UPPER,0,0),COLOR628962;
NP:IF(CURRBARSCOUNT <=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;
FP:NP-LR3*(NOD),POINTDOT,COLOR93BDA8;
EQU: (NP+FP)/2,POINTDOT,COLOR93BDA8;
;
中轨:IF(NP > FP,IF(LRL <=RH,LRL,DRAWNULL),IF(LRL >=RL,LRL,DRAWNULL)),COLOR628962;
上轨:IF(NP > FP,IF(ATL <=RH,ATL,DRAWNULL),IF(ATL >=RL,ATL,DRAWNULL)),COLOR628962;
下轨:IF(NP > FP,IF(UTL <=RH,UTL,DRAWNULL),IF(UTL >=RL,UTL,DRAWNULL)),COLOR628962;
IF(TJ1 < 30,TJ2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(CROSS(DIF,DEA),H*1.005,DRAWNULL),CIRCLEDOT,COLORYELLOW,LINETHICK;
STICKLINE(CROSS(DIF,DEA),H*1.0005,H*0.9995,7,0),COLORGREEN;
做多线:IF(C线,C线,DRAWNULL)COLORFF00FF,LINETHICK2;
{买牛股公式网www.MaiNiuGu.com}

相邻指标公式
对公式的评论
 以下是对 [线学主图公式源码] 的评论,总共:0条评论
热门公式排行