0% found this document useful (0 votes)
625 views1 page

Ema Crossover For Amibroker Afl

This document contains code for an EMA (exponential moving average) crossover trading strategy in Amibroker. It plots the 3-period and 8-period EMAs and generates buy signals when the 3-period EMA crosses above the 8-period EMA and sell signals when it crosses below. It also includes code to display the chart title and generate audio alerts for sell signals.

Uploaded by

gmatweak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
625 views1 page

Ema Crossover For Amibroker Afl

This document contains code for an EMA (exponential moving average) crossover trading strategy in Amibroker. It plots the 3-period and 8-period EMAs and generates buy signals when the 3-period EMA crosses above the 8-period EMA and sell signals when it crosses below. It also includes code to display the chart title and generate audio alerts for sell signals.

Uploaded by

gmatweak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Ema crossover for amibroker afl

// Downloaded From https://www.WiseStockTrader.com


_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("ema_crossover");
x = EMA(Close,3);
y = EMA(Close,8);
Plot(EMA(Close,3),"",colorRed,styleLine);
Plot(EMA(Close,8),"",colorDarkGreen,styleLine);

Buy=Cross(x,y);
PlotShapes(shapeUpArrow*Buy,colorGreen);
XR=(EMA(Close,3) * (2 / 6 - 1) - EMA(Close,8) * (2 / 11 - 1)) / (2 / 6 - 2 /
11);
Title = Name() + " " + Date()+" " + EncodeColor( colorBlue ) +"3/8 EMA "
+EncodeColor( colorRed )
+ " O " + O + " H " + H + " L " + L + " C "+ C + "\n";

Sell=Cross(y,x);
PlotShapes(shapeDownArrow*Sell,colorRed);
AlertIf( Sell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );
XR=(EMA(Close,8) * (2 / 6 - 1) - EMA(Close,3) * (2 / 11 - 1)) / (2 / 6 - 2 /
11);
Title = Name() + " " + Date()+" " + EncodeColor( colorBlue ) +"3/8 EMA "
+EncodeColor( colorRed )
+ " O " + O + " H " + H + " L " + L + " C "+ C + "\n";

_SECTION_END();

You might also like