Skip to main content

20 Day High Breakout for Amibroker (AFL)

ashokram1 over 14 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    trading system, amibroker, exploration

this is a simple.. i use for the formula

20 day high for the bar to break above and stoch crossover occured in 3 days time..

it works for eod trading and 1 hour chart..

Indicator / Formula

Copy & Paste Friendly
_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() ); 
N = ATR(20);
b = 0.5*N;
d = (Close - Ref(Close,-3))/N;
e = BarsSince( Cross( StochK( 5, 3 ), StochD( 5, 3, 3 ) ) )<=3;
f = Cross( MACD( 12, 26 ), Signal( 12, 26, 9 ) ) ;
g = Volume>20000;

entry = High+b;
trgt1 = High+N;
stop = High;
Buy = Cross(High,Ref(HHV(High,20),-1)) AND e AND f;
Filter = Buy;
AddColumn(entry,"entry");
AddColumn(trgt1,"trgt1");
AddColumn(Close,"close");

_SECTION_END();

1 comments

Leave Comment

Please login here to leave a comment.