Rule four weeks for Amibroker (AFL)
Tinych over 14 years ago Amibroker (AFL)
Simple Trading System “Rule four weeks.”
The idea was taken from the book of J. Murphy Technical Analysis of Futures Markets. The graph shows one-hour interval.
http://savepic.su/1059699.htm
You can reduce the number of signals by adding the following expression:
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
http://savepic.su/1061747.htm
Indicator / Formula
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Rule four weeks");
Buy=Ref(H,-4)<C AND Ref(H,-3)<C AND Ref(H,-2)<C AND Ref(H,-1)<C;
Sell=Ref(L,-2)>C AND Ref(L,-1)>C;
PlotShapes(IIf(Buy, shapeUpArrow , shapeNone), colorGreen);
PlotShapes(IIf(Sell, shapeDownArrow , shapeNone), colorRed);
_SECTION_END();2 comments
Leave Comment
Please login here to leave a comment.
Simple is beautiful!
Thank You
Hi,
Indeed Beautiful…keep it up TINYCH
Thnx a lot for sharing :)