Skip to main content

EMA CLOSE(Hrly,Daily, Weekly) for Amibroker (AFL)

me_raj005 almost 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 2)
  • Tags:
    amibroker

This is an AFL where u get ready draw lines of hrly, daily and weekly close 5EMA on a single pane…very useful for those who trades at EMA close…will not have to draw lines per hour…

Indicator / Formula

Copy & Paste Friendly
numbars = LastValue(Cum(Status("barvisible")));
hts  = -33.5;

TimeFrameSet(inWeekly);
WHEMA=EMA(High,5);
WCEMA=EMA(Close,5);
WLEMA=EMA(Low,5);	
TimeFrameRestore();
Plot(TimeFrameExpand(WHEMA,inWeekly), "WHEMA",colorBlue,styleLine);
Plot(TimeFrameExpand(WCEMA,inWeekly), "WCEMA",colorGreen,styleLine);
Plot(TimeFrameExpand(WLEMA,inWeekly), "WLEMA",colorOrange,styleLine);

TimeFrameSet(inDaily);
DHEMA=EMA(High,5);
DCEMA=EMA(Close,5);
DLEMA=EMA(Low,5);
TimeFrameRestore();
Plot(TimeFrameExpand(DHEMA,inDaily), "DHEMA",colorBlue,styleDots|styleNoLine|styleNoRescale);
Plot(TimeFrameExpand(DCEMA,inDaily), "DCEMA",colorGreen,styleDots|styleNoLine|styleNoRescale);
Plot(TimeFrameExpand(DLEMA,inDaily), "DLEMA",colorRed,styleDots|styleNoLine|styleNoRescale);

TimeFrameSet(inHourly);
HHEMA=EMA(High,5);
HCEMA=EMA(Close,5);
HLEMA=EMA(Low,5);
TimeFrameRestore();
Plot(TimeFrameExpand(HHEMA,inHourly), "HHEMA",colorBlue,styleBar|styleNoLine|styleNoRescale);
Plot(TimeFrameExpand(HCEMA,inHourly), "HCEMA",colorGreen,styleBar|styleNoLine|styleNoRescale);
Plot(TimeFrameExpand(HLEMA,inHourly), "HLEMA",colorRed,styleBar|styleNoLine|styleNoRescale);

1 comments

over 13 years ago

Hi Can any body send me a formula for EMA close scan for E.G. 200 Ema and 300 EMA for the year. so that we can check which is near and bounce back

Leave Comment

Please login here to leave a comment.