LY:=10;
BL:=40;
CJQS:=XMA(CLOSE,LY);
JBQS:=XMA(CLOSE,BL);
N:=REF(JBQS,BL/2+1-CURRBARSCOUNT)/REF(JBQS,BL/2+2-CURRBARSCOUNT);
M:=REF(CJQS,LY/2+1-CURRBARSCOUNT)/REF(CJQS,LY/2+2-CURRBARSCOUNT);
A蛇被:IF(CURRBARSCOUNT>BL/2,JBQS*1.1,REF(JBQS,BL/2+1- CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*1.1),crOSSDOT;
B蛇腹:IF(CURRBARSCOUNT>BL/2,JBQS*0.9,REF(JBQS,BL/2+1- CURRBARSCOUNT)*POW(N,BL/2+1-CURRBARSCOUNT)*0.9),CROSSDOT;
C蛇被:IF(CURRBARSCOUNT>LY/2,CJQS*1.05,REF(CJQS,LY/2+1- CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*1.05);
D蛇腹:IF(CURRBARSCOUNT>LY/2,CJQS*0.95,REF(CJQS,LY/2+1- CURRBARSCOUNT)*POW(M,LY/2+1-CURRBARSCOUNT)*0.95);
{ _通达信股票指标公式}
DRAWBAND(D蛇腹,RGB(255,0,0),B蛇腹,RGB(0,255,0));
DRAWBAND(A蛇被,RGB(255,0,0),C蛇被,RGB(0,255,0));
DRAWTEXT(CROSS(H,A蛇被)AND (H> A蛇被),A蛇被,'●'),COLORBLUE;
DRAWBAND(D蛇腹,RGB(255,0,0),A蛇被,RGB(0,255,0));