KIJUN0:=(HHV(H,J)+LLV(L,J))/2;
SENKOUA:(TENKAN0+KIJUN0)/2,COLORCYAN;
SENKOUB:(HHV(H,M)+LLV(L,M))/2,COLORWHITE;
TENKAN:REFX(TENKAN0,J-1),COLORRED,LINETHICK2;
KIJUN:REFX(KIJUN0,J-1),COLORYELLOW,LINETHICK2;
CHIKOU:REFX(CLOSE,2*J-2),COLORCYAN,NODRAW;
SENKOUAS:=REFX(SENKOUA,J-1),COLORCYAN,DOTLINE;
SENKOUBS:=REFX(SENKOUB,J-1),COLORWHITE,DOTLINE;
SENKOUAR:=REF(SENKOUA,J-1),COLORCYAN,DOTLINE;
SENKOUBR:=REF(SENKOUB,J-1),COLORWHITE,DOTLINE;
SENKOUA,COLORCYAN;
SENKOUB,COLORWHITE;
DRAWBAND(SENKOUA,RGB(165,56,56),SENKOUB,RGB(0,84,160));
N:=20;
MID:SMA(C,N,1),COLORYELLOW,NODRAW;
VART1:=POW((C-MID),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);
UPPER:REFX(MID+REF(2*VART3,1),J-1),COLORFF46FF;
LOWER:REFX(MID-REF(2*VART3,1),J-1),COLORFF46FF;
MIDX:REFX(MID,J-1),COLORFF46FF,LINETHICK2;
MIDX,COLORFF3E3E,DOTLINE;
TENKAN,COLORRED,LINETHICK2;
KIJUN,COLOR00EAEA,LINETHICK2;
CHIKOU,COLORBLUE,DOTLINE;
STICKLINE(CURRBARSCOUNT =M-1,CONST(C),CONST(C),1.5,-1),COLOR00CC00;
A1R:=REFX(HIGH,J-1);
A2R:=REFX(OPEN,J-1);
A3R:=REFX(LOW,J-1);
A4R:=REFX(CLOSE,J-1);
DRAWKLINE(A1R,A2R,A3R,A4R);
DRAWICON(CURRBARSCOUNT=M-1,CONST(C),41);