公式网-网站导航


网站搜索:  

股票公式指标网 发表于2011/7/31 5:59:14

趋势主图 源码

 

C/C++ Code复制内容到剪贴板
  1. input: k(2,0,2),n(10,1,255),p1(3,1,255);   
  2.  var9Q:=c= hhv(c,4)and (ref(c,1)>=ref(c,2) or ref(c,1)>=ref(c,3))    
  3. or ref(c,1)=hhv(c,4) and close>=ref(c,2)    
  4. or ref(c,2)=hhv(c,4) and ref(c,3)=llv(c,4) and c>=ref(c,1)    
  5. or ref(c,3)=hhv(c,4) and c>=ref(c,1) and c>=ref(c,2);   
  6.  红持:var9Q,color0000ff,LINETHICK0;   
  7.  varaQ:=c=hhv(c,4) and ref(c,1)=llv(c,4);   
  8.  粉变:varaQ,colorff99ff,LINETHICK0;   
  9.  varbQ:=c=llv(c,4) and (ref(c,1)<ref(c,2) or ref(c,1)<ref(c,3))    
  10. or ref(c,1)=llv(c,4) and c<ref(c,2)    
  11. or ref(c,2)=llv(c,4) and ref(c,1)<>hhv(c,4) and c<ref(c,1)    
  12. or ref(c,3)=llv(c,4) and c<ref(c,1) and c<ref(c,2);   
  13.  灰跌:varbQ,color888888,LINETHICK0;   
  14.  varcQ:=ref(c,1)=llv(c,4) and c>=ref(c,2) or ref(c,2)=llv(c,4)    
  15. and ref(c,1)<=ref(c,3) and ref(c,2)<ref(c,4) and c>=ref(c,1);   
  16.  绿买:varcQ,color00ff00,LINETHICK0;   
  17.  vardQ:=ref(c,1)=hhv(c,4) and c<ref(c,2)    
  18. or (ref(c,2)=hhv(c,4) and ref(c,1)>ref(c,3)    
  19. or ref(c,3)=hhv(c,4) and ref(c,1)>ref(c,2))    
  20. and ref(c,2)>=ref(c,4) and c<ref(c,1);   
  21.  蓝抛:vardQ,colorff9900,LINETHICK0;   
  22.     
  23. gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);   
  24.  明日阻力:=l+(gj-l)+(c-l);   
  25.  明日支撑:=l+(c-gj);   
  26.  今日阻力:REF(明日阻力 , 1),LINETHICK0;   
  27.  今日支撑:REF(明日支撑 , 1),LINETHICK0;   
  28.  STICKLINE(BARSTATUS=2  and c>=今日阻力,今日阻力,今日阻力,20,0),Color0000FF;   
  29.  STICKLINE(BARSTATUS=2  and c<今日阻力,今日阻力,今日阻力,20,0),Color00FF00;   
  30.  STICKLINE(BARSTATUS=2  and c>=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;   
  31.  STICKLINE(BARSTATUS=2  and c<今日支撑,今日支撑,今日支撑,20,0),ColorFF0000;   
  32.     
  33. {M30:EMA(C,30);   
  34.  M60:EMA(C,60);}   
  35.  DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));   
  36.  IF DATATYPE=8 AND K=1 then begin   
  37.  partline(c*2-ref(c,3),c>0),MOVE3,color008888,LAYER7;   
  38.  partline(ref(c,1)*2-ref(c,4),c>0),MOVE2,color008800,LAYER7;   
  39.  partline(ref(c,2)*2-ref(c,5),c>0),MOVE1,color883388,LAYER7;   
  40.  M30:EMA(C,30),color660066;   
  41.  M60:EMA(C,60),color000066;   
  42.  END;   
  43.  wWj:='  ';   
  44.  wyy1:=WEEKDAY;   
  45.  if C>0 then begin;   
  46.  wWj:=' 星期';   
  47.  IF wyy1=5 then wWj:= wWj+'五';   
  48.  IF wyy1=4 then wWj:= wWj+'四';   
  49.  IF wyy1=3 then wWj:= wWj+'三';   
  50.  IF wyy1=2 then wWj:= wWj+'二';   
  51.  IF wyy1=1 then wWj:= wWj+'一';   
  52.  end;   
  53.  wWl:='';   
  54.  wWh:='';   
  55.  wyy2:=LMONTH;   
  56.  wyy3:=LDAY;   
  57.  IF BARSTATUS=2 then wWw:=' 农历 '+NUMTOSTRN(wyy2,0)+'月 '+NUMTOSTRN(wyy3,0)+'日';   
  58.  IF BARSTATUS=2 then wWh:=NUMTOSTRN(date+1000000,0);   
  59.  IF BARSTATUS=2 then wWl:=wWj;   
  60.  DRAWTEXTREL(20 ,40 ,'                                        '+wWh+wWl+wWw),LINETHICK3,ColorFFFF80;   
  61.     
  62. DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));   
  63.  DRAWTEXTREL(20,30,'趋势主图'),LINETHICK6,Coloryellow;   
  64.  DRAWTEXTREL(200,30,STKLABEL+' '+STKNAME),LINETHICK6,ColorFFFF80;   
  65.  if DISPSTATUS=2 then begin;   
  66.  var100:='所属板块:';   
  67.  if inblock('电力')=1 then var100:=var100+' 电力';   
  68.  if inblock('电脑')=1 then var100:=var100+' 电脑';   
  69.  if inblock('电器')=1 then var100:=var100+' 电器';   
  70.  if inblock('电子信息')=1 then var100:=var100+' 电子信息';   
  71.  if inblock('房地产')=1 then var100:=var100+' 房地产';   
  72.  if inblock('纺织服装')=1 then var100:=var100+' 纺织服装';   
  73.  if inblock('钢铁')=1 then var100:=var100+' 钢铁';   
  74.  if inblock('工程建筑')=1 then var100:=var100+' 工程建筑';   
  75.  if inblock('供水供气')=1 then var100:=var100+' 供水供气';   
  76.  if inblock('化工')=1 then var100:=var100+' 化工';   
  77.  if inblock('化纤')=1 then var100:=var100+' 化纤';   
  78.  if inblock('机械')=1 then var100:=var100+' 机械';   
  79.  if inblock('建材')=1 then var100:=var100+' 建材';   
  80.  if inblock('交通工具')=1 then var100:=var100+' 交通工具';   
  81.  if inblock('交通设施')=1 then var100:=var100+' 交通设施';   
  82.  if inblock('教育传媒')=1 then var100:=var100+' 教育传媒';   
  83.  if inblock('金融')=1 then var100:=var100+' 金融';   
  84.  if inblock('旅游酒店')=1 then var100:=var100+' 旅游酒店';   
  85.  if inblock('煤炭石油')=1 then var100:=var100+' 煤炭石油';   
  86.  if inblock('酿酒食品')=1 then var100:=var100+' 酿酒食品';   
  87.  if inblock('农林牧渔')=1 then var100:=var100+' 农林牧渔';   
  88.  if inblock('其他行业')=1 then var100:=var100+' 其他行业';   
  89.  if inblock('汽车')=1 then var100:=var100+' 汽车';   
  90.  if inblock('汽配')=1 then var100:=var100+' 汽配';   
  91.  if inblock('商业连锁')=1 then var100:=var100+' 商业连锁';   
  92.  if inblock('石化')=1 then var100:=var100+' 石化';   
  93.  if inblock('通信')=1 then var100:=var100+' 通信';   
  94.  if inblock('外贸')=1 then var100:=var100+' 外贸';   
  95.  if inblock('医药')=1 then var100:=var100+' 医药';   
  96.  if inblock('仪电仪表')=1 then var100:=var100+' 仪电仪表';   
  97.  if inblock('有色金属')=1 then var100:=var100+' 有色金属';   
  98.  if inblock('运输物流')=1 then var100:=var100+' 运输物流';   
  99.  if inblock('造纸印刷')=1 then var100:=var100+' 造纸印刷';   
  100.  if inblock('安徽')=1 then var100:=var100+' 安徽';   
  101.  if inblock('北京')=1 then var100:=var100+' 北京';   
  102.  if inblock('福建')=1 then var100:=var100+' 福建';   
  103.  if inblock('甘肃')=1 then var100:=var100+' 甘肃';   
  104.  if inblock('广东')=1 then var100:=var100+' 广东';   
  105.  if inblock('广西')=1 then var100:=var100+' 广西';   
  106.  if inblock('贵州')=1 then var100:=var100+' 贵州';   
  107.  if inblock('海南')=1 then var100:=var100+' 海南';   
  108.  if inblock('河北')=1 then var100:=var100+' 河北';   
  109.  if inblock('河南')=1 then var100:=var100+' 河南';   
  110.  if inblock('黑龙江')=1 then var100:=var100+' 黑龙江';   
  111.  if inblock('湖北')=1 then var100:=var100+' 湖北';   
  112.  if inblock('湖南')=1 then var100:=var100+' 湖南';   
  113.  if inblock('吉林')=1 then var100:=var100+' 吉林';   
  114.  if inblock('江苏')=1 then var100:=var100+' 江苏';   
  115.  if inblock('江西')=1 then var100:=var100+' 江西';   
  116.  if inblock('辽宁')=1 then var100:=var100+' 辽宁';   
  117.  if inblock('内蒙古')=1 then var100:=var100+' 内蒙古';   
  118.  if inblock('宁夏')=1 then var100:=var100+' 宁夏';   
  119.  if inblock('青海')=1 then var100:=var100+' 青海';   
  120.  if inblock('山东')=1 then var100:=var100+' 山东';   
  121.  if inblock('山西')=1 then var100:=var100+' 山西';   
  122.  if inblock('陕西')=1 then var100:=var100+' 陕西';   
  123.  if inblock('上海')=1 then var100:=var100+' 上海';   
  124.  if inblock('深圳')=1 then var100:=var100+' 深圳';   
  125.  if inblock('四川')=1 then var100:=var100+' 四川';   
  126.  if inblock('天津')=1 then var100:=var100+' 天津';   
  127.  if inblock('***')=1 then var100:=var100+' ***';   
  128.  if inblock('新疆')=1 then var100:=var100+' 新疆';   
  129.  if inblock('云南')=1 then var100:=var100+' 云南';   
  130.  if inblock('浙江')=1 then var100:=var100+' 浙江';   
  131.  if inblock('重庆')=1 then var100:=var100+' 重庆';   
  132.  if inblock('3G')=1 then var100:=var100+' 3G';   
  133.  if inblock('H股')=1 then var100:=var100+' H股';   
  134.  if inblock('QFII持股')=1 then var100:=var100+' QFII持股';   
  135.  if inblock('ST')=1 then var100:=var100+' ST';   
  136.  if inblock('奥运')=1 then var100:=var100+' 奥运';   
  137.  if inblock('创投')=1 then var100:=var100+' 创投';   
  138.  if inblock('次新股')=1 then var100:=var100+' 次新股';   
  139.  if inblock('大盘')=1 then var100:=var100+' 大盘';   
  140.  if inblock('股权改革')=1 then var100:=var100+' 股权改革';   
  141.  if inblock('股权投资')=1 then var100:=var100+' 股权投资';   
#p##e#



网站搜索:  



Copyright © 2009-2010 gszb.com ™,All Rights Reserved. 
公式网-www.gszx.com.cn-股票指标公式网