因为论坛里不好排版,所以具体内容我发表在msn space 锤子线和上吊线 http://rypan.spaces.live.com/blog/cns!293708C8664FE030!213.entry
个人感觉,蜡烛线的作用主要体现在关键价位,因在此时多空双方的博弈比较激烈。 Tom Williams有一本书,"Master the Markets",对判读K线的真伪很有启发,特别是书中所提的”test“,网上可以找到。
我自编了个压缩图来过滤掉inside bars,类似swing chart。虽然丢掉了一些细节,但蜡烛的形态和趋势更为清楚。它包含未来变量,除了突破外,不能用在交易中。 很想听听你们关于如何改进的意见。 _SECTION_BEGIN("Price"); function swingPrice() { // initialize first element TrO = Null; TrO[0] = O[0]; TrH = Null; TrH[0] = H[0]; TrL = Null; TrL[0] = L[0]; TrC = Null; TrC[0] = C[0]; TrV = Null; TrV[0] = V[0]; j = 0; // Loop to find inside and outside bars and consolidate them into previous bars for( i=1; i<BarCount; i++ ) { // first, find directional bars with higher H and higher L or vice vesa // Caveat: the curent bar might be still forming real time if ((H > TrH[j] AND L > TrL[j]) OR (H < TrH[j] AND L < TrL[j])) { j++; TrO[j] = O; TrH[j] = H; TrL[j] = L; TrC[j] = C; TrV[j] = V; } else { TrH[j] = Max( TrH[j], H) ; TrL[j] = Min( TrL[j], L ); TrC[j] = C; TrV[j] += V; } } // move the chart to right end of chart space, ie last brick on last bar position delta = BarCount -1 - j; O = Ref(TrO, -delta); H = Ref(TrH, -delta); L = Ref(TrL, -delta); C = Ref(TrC, -delta); Avg = (C + H + L)/3; V = Ref(TrV, -delta); } swing = Param("Swing chart?", 0, 0, 1); if (swing ) swingPrice(); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkGradientFill( ParamColor("BgTop", 54),ParamColor("BgBottom", 54),ParamColor("titlebkcolor",54)); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); PlotOHLC( O, H, L, C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); _SECTION_END(); _SECTION_BEGIN("Volume"); Plot( V, _DEFAULT_NAME(), ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram ), 10 ); _SECTION_END();
效果如何? 蜡烛图的一个问题(或者说特点)是采用不同开始结束时间则出来的显示会稍有不同, 但是涨势里面阳线多,跌势里面阴线多,这个特性是不变的。 大阴大阳则多半不会看走眼, 你如何判断大阳最后不会退化成大上影线?