BS过山车
FILLRGN(MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,5)>MA(CLOSE,20) AND CLOSE>MAX(MA(CLOSE,60),MA(CLOSE,120)) AND MA(CLOSE,5)>=REF(MA(CLOSE,5),1) AND MA(CLOSE,10)>=REF(MA(CLOSE,10),1) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1),MA(CLOSE,5),MA(CLOSE,20)),colorCCCCDE;
FILLRGN(MA(CLOSE,60)<MA(CLOSE,120),MA(CLOSE,60),MA(CLOSE,120)),color333333;
FILLRGN(MA(CLOSE,60)>MA(CLOSE,120),MA(CLOSE,60),MA(CLOSE,120)),color666666;
VARIABLE:WDAY[7]='星期六';
WDAY[1]:='星期日';
WDAY[2]:='星期一';
WDAY[3]:='星期二';
WDAY[4]:='星期三';
WDAY[5]:='星期四';
WDAY[6]:='星期五';
FY:=YEAR;
FM:=MONTH;
FD:=DAY;
WD:=WEEKDAY;
P:=SYSPARAM(1);
STR1:=''+'今日: '+NUMTOSTR(FY[P],0)+'年'+NUMTOSTR(FM[P],0)+'月'+NUMTOSTR(FD[P],0)+'日 '+WDAY[WD[P]+1];
DRAWTEXTEX(CLOSE,1,480,22,STR1),colorDDFF;
A1:=REF(CLOSE,10)=HHV(CLOSE,2*10+1);
B1:=FILTER(A1,10);
C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(CLOSE,5)=HHV(CLOSE,10+1);
B2:=FILTER(A2,5);
C2:=BACKSET(B2,5+1);
HD2:=FILTER(C2,5);
高位1:REF(HIGH,BARSLAST(HD)),POINTDOT,colorFFFFFF;
高位2:REF(HIGH,BARSLAST(HD2)),POINTDOT,colorFF00;
买线:=CLOSE;
卖线:=MA(CLOSE,13);
STICKLINE(买线<卖线,CLOSE,OPEN,8,5),colorFFFF33;
STICKLINE(买线<卖线,LOW,MIN(OPEN,CLOSE),0.6,0),colorFFFF33;
STICKLINE(买线<卖线,MAX(OPEN,CLOSE),HIGH,0.6,0),colorFFFF33;
STICKLINE(买线>=卖线,OPEN,CLOSE,8,5),color4440FF;
STICKLINE(买线>=卖线,HIGH,MAX(CLOSE,OPEN),0.6,0),color4440FF;
STICKLINE(买线>=卖线,LOW,MIN(CLOSE,OPEN)*1.001,0.8,0),color4440FF;
STICKLINE(OPEN>CLOSE AND 买线>=卖线,OPEN,CLOSE,5,0),colorFFFF33;
STICKLINE(OPEN<CLOSE AND 买线<卖线,CLOSE,OPEN,5,0),color4440FF;
STICKLINE(OPEN>CLOSE AND 买线<卖线,CLOSE,OPEN,8,0),colorFFFF33;
MA5:MA(CLOSE,5);
MA10:MA(CLOSE,10);
MA20:MA(CLOSE,20);
MA60:MA(CLOSE,60);
MA120:MA(CLOSE,120);
A:=MAX(MA(CLOSE,10),MA(CLOSE,20));
B:=MIN(MA(CLOSE,10),MA(CLOSE,20));
DRAWBKBMP(CLOSE<B,'红11.bmp');
DRAWBKBMP(CLOSE>A,'绿11.bmp');
DRAWBKBMP(A>=CLOSE AND CLOSE>=B,'黄11.bmp');
DRAWICON(CROSS(MA60,MA120),MA60,1);
DRAWICON(CROSS(MA120,MA60),MA60,2);
通气持股:PARTLINE(CLOSE>=A,MA5),LINETHICK3,colorFF00;
闭气预警:PARTLINE(CLOSE<=B,MA5),LINETHICK3,colorFF;
白灯观望:PARTLINE(A>=CLOSE AND CLOSE>=B,MA5),LINETHICK3,colorFFFFFF;
N:=10;
JJ:=(HIGH+LOW+CLOSE)/3;
QJ0:=VOL/(IF(HIGH=LOW,4,HIGH-LOW));
QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*(IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW)));
QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*(IF(HIGH=LOW,1,JJ-MIN(CLOSE,OPEN))));
QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*(IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE))));
QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*(IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-JJ)));
DDX:(QJ1+QJ2-(QJ3+QJ4))/MA(VOL,10)*10,LINETHICK0,colorAAAA;
D:=DDX;
D1:=EMA(ABS(D),60);
D2:=MAX(D/D1+7.5,7.5);
D3:=MIN(D/D1,10);
DRAWTEXTEX(CLOSE,1,5,60,'□能量级别 '+NUMTOSTR(D3,1)+' 级'),colorFFFF;
UDD:=REFX(卖线,1)+0.06;
TR0:=IF(CLOSE>0,'下一步提示: '+NUMTOSTR(UDD,2)+',为下一个BS点互换位\n','若明日关键点位提示: '+NUMTOSTR(UDD,2)+',为下一个BS点互换位\n');
DRAWTEXTEX(CLOSE,1,5,90,'▲下一步提示: '+NUMTOSTR(UDD,2)+' 为下一个BS点互换位'),colorFFFF33;
A31:=MA(CLOSE,5)>=MA(CLOSE,60) AND MA(CLOSE,10)>=MA(CLOSE,60);
A32:=REF(MA(CLOSE,5),1)>=REF(MA(CLOSE,5),2) AND MA(CLOSE,5)>=REF(MA(CLOSE,5),1) OR REF(MA(CLOSE,10),1)>=REF(MA(CLOSE,10),2) AND MA(CLOSE,10)>=REF(MA(CLOSE,10),1) OR REF(MA(CLOSE,20),1)>=REF(MA(CLOSE,20),2) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1);
A42:=MA(CLOSE,5)>=REF(MA(CLOSE,5),1) AND MA(CLOSE,10)>=REF(MA(CLOSE,10),1) OR MA(CLOSE,5)>=REF(MA(CLOSE,5),1) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1) OR MA(CLOSE,10)>=REF(MA(CLOSE,10),1) AND MA(CLOSE,20)>=REF(MA(CLOSE,20),1);
A52:=REF(MA(CLOSE,60),1)>=REF(MA(CLOSE,60),2) AND MA(CLOSE,60)>=REF(MA(CLOSE,60),1) AND CLOSE>=MA(CLOSE,60) AND CLOSE>=MA(CLOSE,120) AND MA(CLOSE,60)>=MA(CLOSE,120) OR REF(MA(CLOSE,120),1)>=REF(MA(CLOSE,120),2) AND MA(CLOSE,120)>=REF(MA(CLOSE,120),1) AND CLOSE>=MA(CLOSE,60) AND CLOSE>=MA(CLOSE,120) AND MA(CLOSE,60)>=MA(CLOSE,120);
DRAWICON(CROSS(买线,卖线) AND A31 AND A32 AND A42 AND A52 AND CLOSE>MAX(MA(CLOSE,60),MA(CLOSE,120)) AND MA(CLOSE,60)>MA(CLOSE,120),LOW,'buy1'),ALIGN0,PXDN45,colorFF;
DRAWICON(CROSS(卖线,买线) AND CLOSE>MAX(MA(CLOSE,60),MA(CLOSE,120)),HIGH,'sell1'),ALIGN0,PXUP55,colorFF00;
STICKLINE(CLOSE>1.095*REF(CLOSE,1),CLOSE,OPEN,3,0),colorFFFF;
STICKLINE(CLOSE<0.905*REF(CLOSE,1),CLOSE,OPEN,3,0),colorFFFFFF;
|