【第一私募论坛】www.simu001.cn】灵通信 涨停板 副图指标源码
+ [3 B0 \+ W T4 E& e: J9 N ) e0 _; G8 B m' i& T
- {) o0 ^ z e8 s0 o2 C) R
1 o0 y1 M# v) C! e# `- \1 Y源码如下:
% }" _6 Y3 e8 j3 T5 v: T/ p 
) ^0 f2 K/ D1 b" u趋势:SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1) ,COLORGREEN;( m6 I9 r4 Y( Y+ x5 p) j
STICKLINE(趋势>50,趋势,50,4,0),COLOR32329B;/ C* }2 y- {0 {
STICKLINE(50>趋势,趋势,50,4,0),COLOR326400;
' z' H# K X" I4 ?IF(趋势>50, 趋势,DRAWNULL), COLORRED;: f, Z8 H: e0 L3 j1 H% T6 V, y
RSV:=(CLOSE-LLV(CLOSE,9))/(HHV(CLOSE,9)-LLV(CLOSE,9))*100;4 c/ {, O. W( q* H t
K:=SMA(RSV,3,1);
1 k$ t2 e2 p4 v& Y2 p) YD:=SMA(K,3,1);
+ D( |3 ^9 U3 ]: X, l1 r/ D5 HTYP:=(HIGH+LOW+CLOSE)/3;$ X7 C8 M" [6 W* m
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
# }2 M9 G+ C6 Y# x% |9 @DIFF:=EMA(CLOSE,2)-EMA(CLOSE,55);" w: A! w* C' [+ Z! T8 E
DEA:=EMA(DIFF,6);5 u5 o. `- ?/ g6 k2 B
MACD:=2*(DIFF-DEA);
+ e6 e$ u7 p: c; W9 p$ J转点:=IF(K>D AND CCI>0 AND DIFF>DEA AND MACD>0,1,0);
( l( j- e/ R: V6 eSTICKLINE(转点=1,50,50,6,0),COLORYELLOW;- k, i# V- z3 W
STICKLINE(转点=0,50,50,6,0),COLORCYAN;5 a m/ w5 {: s( Q, E, W0 x
顶部:90,COLORYELLOW;
% k2 A ~* Q( X0 G: e/ ?( b底部:10,COLORCYAN;3 D* C& ?2 M1 W3 J' u2 \
判定:SMA(趋势,3,1),COLORFF00FF, LINETHICK2;) X4 v% t, ^$ C
IF( 趋势>判定,判定,DRAWNULL), COLORYELLOW, LINETHICK2;
0 ^: B: \$ |7 q: U* \IF( 趋势<判定,判定,DRAWNULL) ,COLORFFF000,LINETHICK2;
& E5 A$ n6 s lDRAWICON(CROSS(趋势,判定),判定,1);
- X# h4 ~! o8 U- KDRAWICON(CROSS(趋势,顶部),顶部,2);& U6 ~- W9 F1 H4 G |8 I# O
LC:= REF(CLOSE,1);$ d* j# l$ {6 `* A, a( m3 E6 y" O
RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
+ r( Y4 i: q3 x2 u- W# i' _VAR1:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;
' D- p1 M6 u/ x) b. J6 CVAR2:=SMA(VAR1,9,1)+100;) s$ }; }9 r: u$ x
VAR3:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;, {" E# ]7 d3 V- E7 Z8 n
VAR4:=SMA(VAR3,3,1); ?9 `& c0 V) ] w) c
VAR5:=SMA(VAR4,3,1)+100;$ C$ ^0 U3 {! ]% t
VAR6:=VAR5-VAR2;% ~" S* B4 j+ o; V. L
趋势1: IF(VAR6>45,VAR6-45,0),COLOR00FFFF;) e1 M) _$ A- c- `0 _( n( i
VAR2Q:=REF(LOW,1);
( A6 n, |3 s5 T6 b7 `- XVAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;
: w* H) c) `6 z- ~, f8 y, U$ O, P6 M6 uVAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);
8 P3 T9 a9 l) c- YVAR5Q:=LLV(LOW,30);
8 D7 B- E* Q: Y7 a" r ?VAR6Q:=HHV(VAR4Q,30);: J4 D) Q5 Q& S$ j
VAR7Q:=IF(MA(CLOSE,58),1,0);' B( w, ]7 I3 R. E
VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;
' l- w6 c U% ~# b7 x火焰山:=IF(VAR8Q>100,100,VAR8Q);
3 w: q8 ]3 l4 S( S$ jSTICKLINE(火焰山>0,0 ,火焰山*1.2,5,0 ),COLOR4444FF;
- t- o7 k( V& l3 K: B rSTICKLINE(火焰山>0,0 ,火焰山*1.2,4,0 ),COLOR5555FF;5 Q: @1 P; O$ Y
STICKLINE(火焰山>0,0 ,火焰山*1.2,3,0 ),COLOR7777FF;8 ^$ v3 C5 x8 Z d) i; B
STICKLINE(火焰山>0,0 ,火焰山*1.2,2,0 ),COLOR9999FF;/ J$ Z' ^* `. B8 D z' I! i" J
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),5,0),COLOR000033;9 [7 [( {8 H+ o! d* F; n
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),4,0),COLOR000055;
% ]7 t" w/ {& t% O6 r; LSTICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR000077;
- s( b. U! Z, f7 B' J4 M; nSTICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR000099;
! T- n- Z7 T: }STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1.5,0),COLOR0000BB;5 ^; r! O+ a* c7 U8 @
STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR0000DD;
H1 p7 G9 w( t6 t7 m- q/ Q/ P7 v; r+ USTICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),5,0),COLOR003300;
7 E3 k0 h) i% h0 \0 c- USTICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),4,0),COLOR005500;
+ x5 @4 i) P- ]4 d! {STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),3,0),COLOR007700;4 H; G: D# s" [! c- n6 c8 D7 s
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2,0),COLOR009900;2 @; O8 X, C4 g) ^$ E1 w
STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),1,0),COLOR00DD00;* n" E$ g; \( R( c
逃顶:=CROSS(82,RSI);7 ~+ }$ Y3 {* O# S; C- v: p: ]
STICKLINE( 逃顶,逃顶,20,5,0),COLORFF5500;
! n; b a) X: g0 iSTICKLINE( 逃顶,逃顶,30,3,0),COLORFF8800;
$ d+ l: a# s+ K# x2 o$ k! hSTICKLINE( 逃顶,逃顶,30,2,0),COLORFFAA00;
1 @9 S1 q T# F9 `% lSTICKLINE( 逃顶,逃顶,30,1,0),COLORFFCC00;
7 [& u0 s* \7 p( x: AD1:=(C+L+H)/3;6 q% L* K7 k) a8 o* A
D2:=EMA(D1,6);
, W$ ~9 r+ s' c# m3 {D3:=EMA(D2,5);/ s; i! ^; J% z9 L: C0 Q, X2 y0 J* t" y
BBUY:=CROSS(D2,D3);
( t" z# }+ b R- ~- j- p风险区:80,COLORFF85FF;
! e9 c3 i+ k s7 g% m# D平安区:20,COLORYELLOW,POINTDOT;, p- x2 L1 t3 T: Q9 I& I
天线:100,COLORFFFF00;4 c) v( ~: D! }/ \( \% [
强弱线:50,COLORGREEN,POINTDOT;
$ A. T- [# n" R; Y2 P) m) i* i' ?DRAWICON(BBUY,(LOW *1),1);' V4 e* \1 u* w% f
VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100;
' g) l* _! a+ o6 [, M; \DRAWICON(CROSS(82,VARR1),HIGH,15);' T7 i, o: h0 j6 k! t9 {
DRAWTEXT(CROSS(82,VARR1),35,'逃'),COLORYELLOW;- s8 E( ~( @* u! r. f1 L9 j9 R
{用法:副图指标,红色K线持有待涨,绿色K线观望。蓝色立柱 出逃。} tdxjietu1.JPG (277.4 KB)1 ]: o- M4 O( S; w7 J
时间:2015-9-4 20:072 e/ h( ~, A6 G
股票论坛 www.simu001.cn【第一私募论坛】www.simu001.cn】 |