| 趋势主图(源码) input: k(2,0,2),n(10,1,255),p1(3,1,255);var9Q:=c= hhv(c,4)and (ref(c,1)>=ref(c,2) or ref(c,1)>=ref(c,3))
 or ref(c,1)=hhv(c,4) and close>=ref(c,2)
 or ref(c,2)=hhv(c,4) and ref(c,3)=llv(c,4) and c>=ref(c,1)
 or ref(c,3)=hhv(c,4) and c>=ref(c,1) and c>=ref(c,2);
 红持:var9Q,color0000ff,LINETHICK0;
 varaQ:=c=hhv(c,4) and ref(c,1)=llv(c,4);
 粉变:varaQ,colorff99ff,LINETHICK0;
 varbQ:=c=llv(c,4) and (ref(c,1)<ref(c,2) or ref(c,1)<ref(c,3))
 or ref(c,1)=llv(c,4) and c<ref(c,2)
 or ref(c,2)=llv(c,4) and ref(c,1)<>hhv(c,4) and c<ref(c,1)
 or ref(c,3)=llv(c,4) and c<ref(c,1) and c<ref(c,2);
 灰跌:varbQ,color888888,LINETHICK0;
 varcQ:=ref(c,1)=llv(c,4) and c>=ref(c,2) or ref(c,2)=llv(c,4)
 and ref(c,1)<=ref(c,3) and ref(c,2)<ref(c,4) and c>=ref(c,1);
 绿买:varcQ,color00ff00,LINETHICK0;
 vardQ:=ref(c,1)=hhv(c,4) and c<ref(c,2)
 or (ref(c,2)=hhv(c,4) and ref(c,1)>ref(c,3)
 or ref(c,3)=hhv(c,4) and ref(c,1)>ref(c,2))
 and ref(c,2)>=ref(c,4) and c<ref(c,1);
 蓝抛:vardQ,colorff9900,LINETHICK0;
 gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);明日阻力:=l+(gj-l)+(c-l);
 明日支撑:=l+(c-gj);
 今日阻力:REF(明日阻力 , 1),LINETHICK0;
 今日支撑:REF(明日支撑 , 1),LINETHICK0;
 STICKLINE(BARSTATUS=2  and c>=今日阻力,今日阻力,今日阻力,20,0),Color0000FF;
 STICKLINE(BARSTATUS=2  and c<今日阻力,今日阻力,今日阻力,20,0),Color00FF00;
 STICKLINE(BARSTATUS=2  and c>=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;
 STICKLINE(BARSTATUS=2  and c<今日支撑,今日支撑,今日支撑,20,0),ColorFF0000;
 {M30:EMA(C,30);M60:EMA(C,60);}
 DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));
 IF DATATYPE=8 AND K=1 then begin
 partline(c*2-ref(c,3),c>0),MOVE3,color008888,LAYER7;
 partline(ref(c,1)*2-ref(c,4),c>0),MOVE2,color008800,LAYER7;
 partline(ref(c,2)*2-ref(c,5),c>0),MOVE1,color883388,LAYER7;
 M30:EMA(C,30),color660066;
 M60:EMA(C,60),color000066;
 END;
 wWj:='  ';
 wyy1:=WEEKDAY;
 if C>0 then begin;
 wWj:=' 星期';
 IF wyy1=5 then wWj:= wWj+'五';
 IF wyy1=4 then wWj:= wWj+'四';
 IF wyy1=3 then wWj:= wWj+'三';
 IF wyy1=2 then wWj:= wWj+'二';
 IF wyy1=1 then wWj:= wWj+'一';
 end;
 wWl:='';
 wWh:='';
 wyy2:=LMONTH;
 wyy3:=LDAY;
 IF BARSTATUS=2 then wWw:=' 农历 '+NUMTOSTRN(wyy2,0)+'月 '+NUMTOSTRN(wyy3,0)+'日';
 IF BARSTATUS=2 then wWh:=NUMTOSTRN(date+1000000,0);
 IF BARSTATUS=2 then wWl:=wWj;
 DRAWTEXTREL(20 ,40 ,'                                        '+wWh+wWl+wWw),LINETHICK3,ColorFFFF80;
 DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));DRAWTEXTREL(20,30,'趋势主图'),LINETHICK6,Coloryellow;
 DRAWTEXTREL(200,30,STKLABEL+' '+STKNAME),LINETHICK6,ColorFFFF80;
 if DISPSTATUS=2 then begin;
 var100:='所属板块:';
 if inblock('电力')=1 then var100:=var100+' 电力';
 if inblock('电脑')=1 then var100:=var100+' 电脑';
 if inblock('电器')=1 then var100:=var100+' 电器';
 if inblock('电子信息')=1 then var100:=var100+' 电子信息';
 if inblock('房地产')=1 then var100:=var100+' 房地产';
 if inblock('纺织服装')=1 then var100:=var100+' 纺织服装';
 if inblock('钢铁')=1 then var100:=var100+' 钢铁';
 if inblock('工程建筑')=1 then var100:=var100+' 工程建筑';
 if inblock('供水供气')=1 then var100:=var100+' 供水供气';
 if inblock('化工')=1 then var100:=var100+' 化工';
 if inblock('化纤')=1 then var100:=var100+' 化纤';
 if inblock('机械')=1 then var100:=var100+' 机械';
 if inblock('建材')=1 then var100:=var100+' 建材';
 if inblock('交通工具')=1 then var100:=var100+' 交通工具';
 if inblock('交通设施')=1 then var100:=var100+' 交通设施';
 if inblock('教育传媒')=1 then var100:=var100+' 教育传媒';
 if inblock('金融')=1 then var100:=var100+' 金融';
 if inblock('旅游酒店')=1 then var100:=var100+' 旅游酒店';
 if inblock('煤炭石油')=1 then var100:=var100+' 煤炭石油';
 if inblock('酿酒食品')=1 then var100:=var100+' 酿酒食品';
 if inblock('农林牧渔')=1 then var100:=var100+' 农林牧渔';
 if inblock('其他行业')=1 then var100:=var100+' 其他行业';
 if inblock('汽车')=1 then var100:=var100+' 汽车';
 if inblock('汽配')=1 then var100:=var100+' 汽配';
 if inblock('商业连锁')=1 then var100:=var100+' 商业连锁';
 if inblock('石化')=1 then var100:=var100+' 石化';
 if inblock('通信')=1 then var100:=var100+' 通信';
 if inblock('外贸')=1 then var100:=var100+' 外贸';
 if inblock('医药')=1 then var100:=var100+' 医药';
 if inblock('仪电仪表')=1 then var100:=var100+' 仪电仪表';
 if inblock('有色金属')=1 then var100:=var100+' 有色金属';
 if inblock('运输物流')=1 then var100:=var100+' 运输物流';
 if inblock('造纸印刷')=1 then var100:=var100+' 造纸印刷';
 if inblock('安徽')=1 then var100:=var100+' 安徽';
 if inblock('北京')=1 then var100:=var100+' 北京';
 if inblock('福建')=1 then var100:=var100+' 福建';
 if inblock('甘肃')=1 then var100:=var100+' 甘肃';
 if inblock('广东')=1 then var100:=var100+' 广东';
 if inblock('广西')=1 then var100:=var100+' 广西';
 if inblock('贵州')=1 then var100:=var100+' 贵州';
 if inblock('海南')=1 then var100:=var100+' 海南';
 if inblock('河北')=1 then var100:=var100+' 河北';
 if inblock('河南')=1 then var100:=var100+' 河南';
 if inblock('黑龙江')=1 then var100:=var100+' 黑龙江';
 if inblock('湖北')=1 then var100:=var100+' 湖北';
 if inblock('湖南')=1 then var100:=var100+' 湖南';
 if inblock('吉林')=1 then var100:=var100+' 吉林';
 if inblock('江苏')=1 then var100:=var100+' 江苏';
 if inblock('江西')=1 then var100:=var100+' 江西';
 if inblock('辽宁')=1 then var100:=var100+' 辽宁';
 if inblock('内蒙古')=1 then var100:=var100+' 内蒙古';
 if inblock('宁夏')=1 then var100:=var100+' 宁夏';
 if inblock('青海')=1 then var100:=var100+' 青海';
 if inblock('山东')=1 then var100:=var100+' 山东';
 if inblock('山西')=1 then var100:=var100+' 山西';
 if inblock('陕西')=1 then var100:=var100+' 陕西';
 if inblock('上海')=1 then var100:=var100+' 上海';
 if inblock('深圳')=1 then var100:=var100+' 深圳';
 if inblock('四川')=1 then var100:=var100+' 四川';
 if inblock('天津')=1 then var100:=var100+' 天津';
 if inblock('***')=1 then var100:=var100+' ***';
 if inblock('新疆')=1 then var100:=var100+' 新疆';
 if inblock('云南')=1 then var100:=var100+' 云南';
 if inblock('浙江')=1 then var100:=var100+' 浙江';
 if inblock('重庆')=1 then var100:=var100+' 重庆';
 if inblock('3G')=1 then var100:=var100+' 3G';
 if inblock('H股')=1 then var100:=var100+' H股';
 if inblock('QFII持股')=1 then var100:=var100+' QFII持股';
 if inblock('ST')=1 then var100:=var100+' ST';
 if inblock('奥运')=1 then var100:=var100+' 奥运';
 if inblock('创投')=1 then var100:=var100+' 创投';
 if inblock('次新股')=1 then var100:=var100+' 次新股';
 if inblock('大盘')=1 then var100:=var100+' 大盘';
 if inblock('股权改革')=1 then var100:=var100+' 股权改革';
 if inblock('股权投资')=1 then var100:=var100+' 股权投资';
 
 |