AmiBroker公式:鱷魚指標
SetChartBkColor(ParamColor("BkColor", colorBlack));_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}} ", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
A = (H + L)/2;
MAL = MA(A, Param("LPeriods", 34));
MAS = MA(A, Param("SPeriods", 5));
AO = MAS - MAL;
AC = MA((AO - MA(AO, 5)), 5);
ACCOLOR = IIf(AC >= Ref(AC, -1), 1, -1);
AOCOLOR = IIf(AO >= Ref(AO, -1), 1, -1);
COLOR = IIf(ACCOLOR != AOCOLOR, colorGrey50, IIf(AOCOLOR == 1, colorRed, colorBrightGreen));
PlotOHLC(Open,High,Low,Close,"", COLOR, styleCandle);
AlligatorBlue=Ref(Wilders(A,13),-8);
AlligatorRed=Ref(Wilders(A,8),-5);
AlligatorGreen=Ref(Wilders(A,5),-3);
Plot(AlligatorGreen, "Green", ColorRGB(0, 255, 0), styleLine|styleNoLabel);
Plot(AlligatorRed, "Red", ColorRGB(255, 0, 0), styleLine|styleNoLabel);
Plot(AlligatorBlue, "Blue", ColorRGB(0, 0, 255), styleLine|styleNoLabel);
/*The following builds Fractal Up*/
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, colorPink), styleBar);
/*The following builds Fractal Down*/
var2=
(Ref(L,-2) <= Ref(L, -1)) AND
(Ref(L,-2) <= Ref(L, 0)) AND
(Ref(L,-2) <= Ref(L, -3)) AND
(Ref(L,-2) <= Ref(L, -4));
FractalDown=ValueWhen( var2,Ref(L,-2),1);
Plot(FractalDown, "F-Down", IIf(Close < FractalDown, colorBlack, colorGold), styleBar);
Buy = Cross(Close, FractalUp);
IIf(Buy, PlotShapes(shapeHollowUpArrow*Buy, colorRed, 0, Low), 0);
Short = Cross(FractalDown, Close);
IIf(Short, PlotShapes(shapeHollowDownArrow*Short, colorBrightGreen, 0, High), 0);
AmiBroker公式:鱷魚指標
有沒有實圖可以放上來給大家欣賞?公司裡沒有裝AmiBroker。 參考一下實圖 謝謝分享,
鱷魚嘴巴張開是好點。 看不太董意思,有人可以幫忙解釋一下嗎?感恩! 本帖最後由 afala 於 2009-10-7 13:01 編輯
5# inova1818
參考一下(非廣告,此站與本人無關)
http://tw.myblog.yahoo.com/jozen-wang/article?mid=748 謝謝啦,好好的來k一下.{:5_219:} 鱷魚指標有甚麼特別??{:5_256:} {:4_186:}這篇到底是在聊什麼啊!! 抱歉。因為之前把文章切出來放到程式發佈區,
害大家看不懂。
合併回去了。 小娃美女站大客氣了^^
謝謝你補足剩餘部分
辛苦你了! 大家有沒有做鱷魚指標的BACK TEST?{:5_261:} 這有點看不太懂哪! 這有點看不太懂哪! 這有點看不太懂哪!
頁:
[1]
2