Heikin-Ashi 技術
日本燭臺 方法為 對股票的 技術分析被介紹了到美國有些二十年前。燭臺有現在成為的普遍的繪製圖表的工具的當中一個。貿易商用途燭臺使圖形成和察覺容易對分析員。但是, 燭臺樣式的解釋可能是一項富挑戰性任務。股票CandleStrength 方法 換, 適應和被改進從傳統燭臺哲學, 導致了一次革命在察覺怎麼看漲和下跌力量執行在金融市場上。
heikin-ashi 技術 修改傳統燭臺圖和使它更加容易解釋市場。我們看一看在怎樣這有效。
heikin-ashi技術怎麼運作?
用日文, heikin 意味"平均" 或"平衡" 。 ashi意味 腳/酒吧 。heikin-ashi 是從一張正常圖消滅不規則性, 提供趨向和實變的一張更好的圖片的一個視覺技術。如果您創造一張燭臺圖運用這個方法, 您有市場的狀態和它的力量的一個好想法正義由視力檢查。
演算
heikin-ashi 燭臺技術用途修改了打開高低關閉(OHLC) 價值和顯示他們作為燭臺。修改過的價值被計算使用這些定義:
haClose = (O+H+L+C)/4
haOpen = (haOpen (前一日) + haClose (前一日))/2
haHigh = Maximum(H, haOpen, haClose)
haLow = Minimum(L, haOpen, haClose)
燭臺=k線,

---
先不管裁縫線或是操盤線是如何畫的,那是障眼法不重要,不妨試看看5EMA與20EMA均線的交叉,當黃金交叉向上時,我們可以假設XX線為紅色代表做多或翻空為多,死亡交叉向下則以黑色代表做空或翻多為空,基本原理有了,接著就看如何設計那條XX線了,其優點是因為只有紅黑,買賣點一目了然,缺點為因採均線系統,所以雜訊多,進出場速度慢,而且不加以過濾時,盤整被打的機率高,可是波段時卻又可大賺一段。總的來說可以賺小錢賺不了大錢。不知道這樣說值不值得3000元,有興趣不妨也自己設計一條XX線玩一玩。但是還是要請先測試個十年左右的資料看看贏率有多少及過濾條件如何設定,這才是重點。

注意 HEIKIN ASHI 的蠟燭,在上升時是空心蠟燭,下跌時是保持紅色
當空心蠟燭變紅色時是熊市開始,相反時就是牛市的開始
我結合 Trend line,用來confirm trend reversal (走勢逆轉),效果非常好
當蠟燭碰到 trend line 時,等待 Heikin Ashi 蠟燭改變顏色後,就可以入市,一直等到再次改變顏色

平滑K線,heikin Ashi
平滑
function ZeroLagTEMA( array, period )
{
TMA1 = TEMA( array, period );
TMA2 = TEMA( TMA1, period );
Diff = TMA1 - TMA2;
return TMA1 + Diff ;
}
/////////////////////
// Heikin-Ashi code
HaClose = (O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
HaLow = Min( L, Min( HaClose, HaOpen ) );
// Velvoort is using not original, but modified Heikin-Ashi close
HaClose = ( HaClose + HaOpen + HaHigh + HaLow )/4;
// you can switch between Heikin-Ashi chart and regular candlestick chart
if( ParamToggle("Plot Heikin-Ashi", "No,Yes", 1 ) )
PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "Heikin Ashi " + Name(), colorBlack, styleCandle );
else
Plot( C, "Regular candles " + Name(), colorBlack, styleCandle );
period = Param("Avg. TEMA period", 55, 1, 100 );
ZLHa = ZeroLagTEMA( HaClose, period );
ZLTyp = ZeroLagTEMA( Avg, period );
Buy = Cross( ZLTyp, ZLHa );
Sell = Cross( ZLHa, ZLTyp );
PlotShapes( shapeUpArrow * Buy, colorRed, 0, HaLow );
PlotShapes( shapeDownArrow * Sell, colorGreen, 0, HaHigh );
var1=
(Ref(H,-2) >= Ref(H, -4)) AND
(Ref(H,-2) >= Ref(H, -3)) AND
(Ref(H,-2) >= Ref(H, -1)) AND
(Ref(H,-2) >= Ref(H, 0));
FractalUp=ValueWhen(var1,Ref(H, -2),1);
Plot(FractalUp, "F-Up", IIf(Close > FractalUp, colorBlack, colorBlue), styleBar);
_SECTION_END();
var2=
(Ref(L,-2) ClosePrice , HighPrice , LowPrice , 0.1 , 0 ) , ColorCyan ;
{青色實體K棒,0表實心 }
StickLine( OpenPrice>ClosePrice , ClosePrice , OpenPrice , 7 , 0 ) , ColorCyan ;
{Open=Close,價揚,紅色上下影線}
StickLine( OpenPrice=ClosePrice and ClosePrice>=Ref( ClosePrice , 1 ) , HighPrice , LowPrice , 0.1 , 0 ) , ColorRed ;
{Open=Close,價揚,紅色實體K棒}
StickLine( OpenPrice=ClosePrice and ClosePrice>=Ref( ClosePrice , 1 ) , ClosePrice , OpenPrice , 7 , 0 ) , ColorRed ;
{Open=Close,價跌,紅色上下影線}
StickLine( OpenPrice=ClosePrice and ClosePrice {Open=Close,價跌,紅色實體K棒}
StickLine( OpenPrice=ClosePrice and ClosePrice
{第一個交易日open=close的K線,}
StickLine( OpenPrice=ClosePrice and Barscount(Close) , HighPrice, LowPrice, 0.1, 0 ) , ColorRed ;
StickLine( OpenPrice=ClosePrice and Barscount(Close) , OpenPrice , ClosePrice , 7 , 0 ) , ColorRed ;
這似乎是奇狐勝券的程式碼,不過我在奇狐卻跑不太出來,
經過 Uizmp 學長的指導,改寫成 MultiCharts
MultiCharts 語法的裁縫線:
Variable: ClosePrice(0) , OpenPrice(0) ;
if ClosePrice 0 then ClosePrice = C;
if ClosePrice = 0 then ClosePrice = (O + H + L + C)/4;
if OpenPrice 0 then OpenPrice = (OpenPrice[1] + ClosePrice[1])/2;
if OpenPrice = 0 then OpenPrice = (O + C)/2;
if ClosePrice > OpenPrice or (ClosePrice = OpenPrice and ClosePrice >= OpenPrice) then begin
PlotPaintBar(High,Low,Open,Close,"",Red);
end;
if ClosePrice closeprice then
drawbar2(openprice,highprice,lowprice,closeprice,"藍棒",cyan,cyan,1)
end if
if openprice=closeprice and closeprice>=closeprice[1] then
drawbar1(openprice,highprice,lowprice,closeprice,"紅棒",red,red,1)
end if
if openprice=closeprice and closeprice>=closeprice[2] then
drawbar2(openprice,highprice,lowprice,closeprice,"藍棒",cyan,cyan,1)
end if
-----------------------------結束--------------------------
本自設指標傳統週裁縫線指標由嘉義紅螞蟻提供
明轉折:(下週週裁縫線指標預估轉折價)
轉折折:(本週內裁縫線指標圖形由紅變綠或綠變紅價格)
差 值:(收盤價) - (轉折價)

ClosePrice:if(BarsCount(Close)=1 , (Open+High+Low+Close)/4 , Close) , linethick0;
OpenPrice:if(BarsCount(Close)=1 , (Open+Close)/2 , Sma(ref(ClosePrice,1),2,1)) , linethick0;
HighPrice:High , linethick0;
LowPrice:Low , linethick0;
{K線的描繪}
{ 紅色上下影線 }
StickLine( OpenPriceClosePrice , HighPrice , LowPrice , 0.1 , 0 ) , ColorCyan ;
{青色實體K棒,0表實心 }
StickLine( OpenPrice>ClosePrice , ClosePrice , OpenPrice , 7 , 0 ) , ColorCyan ;
{Open=Close,價揚,紅色上下影線}
StickLine( OpenPrice=ClosePrice and ClosePrice>=Ref( ClosePrice , 1 ) , HighPrice , LowPrice , 0.1 , 0 ) , ColorRed ;
{Open=Close,價揚,紅色實體K棒}
StickLine( OpenPrice=ClosePrice and ClosePrice>=Ref( ClosePrice , 1 ) , ClosePrice , OpenPrice , 7 , 0 ) , ColorRed ;
{Open=Close,價跌,紅色上下影線}
StickLine( OpenPrice=ClosePrice and ClosePrice=B,A,B,9,0),COLORred;
STICKLINE(A>B,A,H,0.1,0),COLORred;
STICKLINE(A


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 David 的頭像
    David

    FUTURE ATM

    David 發表在 痞客邦 留言(0) 人氣()