Karthik's EOD Strategy...

karthik_sri

Well-Known Member
Top frame had +DI (black) and -DI (Red) ,and in the chart Thumbs up sign is where 3EMA goes above 10 EMA and Thumbs Down is where 3EMA goes below 10 EMA.

The verticle lines are where the DI values are same
Hi RH,
The purpose of having ADX with EMA is to have double confirmation of the Pric Trend & Direction of Trend...if one condition is not satisfied it is always better to wait for the confirmation. We may loose some early entry's but that will not have much/huge difference.
 
calls generated today as per anants afl for scrips avail in fno
Ticker Trade Date Close
ACC Buy 01/01/2013 1431.1000
ASHOKLEY Buy 01/01/2013 27.3000
BHEL Buy 01/01/2013 232.6000
COALINDIA Buy 01/01/2013 359.9500
HDFCBANK Buy 01/01/2013 684.5000
HDIL Buy 01/01/2013 114.9000
HINDUNILVR Buy 01/01/2013 530.6000
IDFC Buy 01/01/2013 173.6500
INDHOTEL Buy 01/01/2013 64.5000
JSWISPAT Buy 01/01/2013 10.7000
KTKBANK Buy 01/01/2013 170.5000
SINTEX Buy 01/01/2013 67.3500
SYNDIBANK Buy 01/01/2013 132.6000
VIJAYABANK Buy 01/01/2013 64.5000
 

rh6996

Well-Known Member
calls generated today as per anants afl for scrips avail in fno

Ticker Trade Date Close
ACC Buy 01/01/2013 1431.1000
ASHOKLEY Buy 01/01/2013 27.3000
BHEL Buy 01/01/2013 232.6000
COALINDIA Buy 01/01/2013 359.9500
HDFCBANK Buy 01/01/2013 684.5000
HDIL Buy 01/01/2013 114.9000
HINDUNILVR Buy 01/01/2013 530.6000
IDFC Buy 01/01/2013 173.6500
INDHOTEL Buy 01/01/2013 64.5000
JSWISPAT Buy 01/01/2013 10.7000
KTKBANK Buy 01/01/2013 170.5000
SINTEX Buy 01/01/2013 67.3500
SYNDIBANK Buy 01/01/2013 132.6000
VIJAYABANK Buy 01/01/2013 64.5000
Nice work...surely of immence help to others. I trade ACC futures regularly hence a small input : The high and low of 13th December was 1451 and 1376 ! This range has not been breached since. The todays candle of ACC is NR4 also. I would suggest to take long trade above the high of 13th Dec only. :p
 

asnavale

Well-Known Member
HAPPY NEW YEAR 2013 To ALL

HI ALL,

Here is the new version of AFL for Karthik's EOD Strategy. This is Version 1.50. This contains Exit conditions also. On the chart, Exit for Long is shown by a downward hollow arrow and Exit from Short is shown by a hollow up arrow.

In Exploration, Exit is shown by letter X in Blue background. However, at present there is no distinction between Exit from Long and Short positions, both are shown as X. You have to see the chart and find out which position to exit. In later version I will make it show the correct Exits. This is because, The Re-entry is not included (will be included in next version) and some clarification needed for Exit condition under certain special conditions. Till then I hope the present version will be useful, though some manual chart inspection is needed.

The New Version is given below. Copy and save it in Amibroker\Formulas\Custom folder.


Code:
SetChartOptions(0, chartShowDates | chartWrapTitle);
SetChartBkColor(colorBlack);

_SECTION_BEGIN("Karthik_EOD");

P1 = Param("Shorter EMA Period", 3, 2, 100, 1);
P2 = Param("Longer EMA Period", 10, 3, 200, 1);
P3 = Param("ADX Period", 14, 3, 100, 1);

E1 = EMA(C, P1);
E2 = EMA(C, P2);
DPLUS = PDI(P3);
DMINUS = MDI(P3);

Buy = E1 > E2 AND DPLUS > DMINUS;
Sell = E2 > E1 AND DMINUS > DPLUS;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

Bought = Flip(Buy, Sell);
Sold = Flip(Sell, Buy);

XIT = E1 < L OR E1 > H;


_N(Title = EncodeColor(colorTurquoise) + "KARTHIK's EOD Strategy;"
				+ EncodeColor(colorYellow) + "  AFL by ANANT NAVALE, Version 1.50\n\n"
				+ EncodeColor(colorWhite) + StrFormat("{{NAME}} ({{INTERVAL}}, {{DATE}}; {{OHLCX}}; {{VALUES}}\n")
				+ EncodeColor(colorBrightGreen) + WriteIf(Buy, "Buy Above : " + H + ";     SL = " + L, "") 
				+ EncodeColor(colorPink) + WriteIf(Sell, "Sell Below : " + L + ",     SL = " + H, ""));
if(Status("action") == actionIndicator)
	{
		Plot(C, "", colorLightGrey, styleCandle);
		Plot(E1, "EMA(" + P1 + ")=", colorBrightGreen, styleLine | styleThick);
		Plot(E2, "EMA(" + P2 + ")=", colorRed, styleLine | styleThick);
		PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-20);
		PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-30); 
		PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25); 
		PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=20);
		PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=30); 
		PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);
		PlotShapes(IIf(Bought AND XIT, shapeHollowDownArrow, shapeNone), colorYellow, 0, H, -15);
		PlotShapes(IIf(Sold AND XIT, shapeHollowUpArrow, shapeNone), colorSkyblue, 0, L, -15);
	}

if(Status("action") == actionExplore)
	{
		Filter = Buy OR Sell OR XIT;

		SetOption("NoDefaultColumns", True);
		AddTextColumn(Name(), "SYMBOL");
		AddColumn(DateTime(), "DATE", formatDateTime);
		AddColumn(IIf(Buy, 66, IIf(Sell, 83, 88)), "TRIG", formatChar, colorYellow, IIf(Buy, colorGreen, IIf(Sell, colorRed, colorBlue)));
		AddColumn(IIf(Buy, H, Null), "BUY ABOVE", 1.2);
		AddColumn(IIf(Sell, L, Null), "SELL BELOW", 1.2);
		AddColumn(IIf(XIT, Null, IIf(Buy, L, H)), "STOP LOSS", 1.2);
	}


_SECTION_END();
-Anant
 

anilnegi

Well-Known Member
Karthik/anup
can you clarify following 2 points:-
1. We exit when price not touch 3 EMA at all/ or it closes two much above / below 3 EMA.
2. In case there will be crossover we should always wait for crossover in ADX and vice versa.

thanks

anil negi
 

rh6996

Well-Known Member
HAPPY NEW YEAR 2013 To ALL

HI ALL,

Here is the new version of AFL for Karthik's EOD Strategy. This is Version 1.50. This contains Exit conditions also. On the chart, Exit for Long is shown by a downward hollow arrow and Exit from Short is shown by a hollow up arrow.

In Exploration, Exit is shown by letter X in Blue background. However, at present there is no distinction between Exit from Long and Short positions, both are shown as X. You have to see the chart and find out which position to exit. In later version I will make it show the correct Exits. This is because, The Re-entry is not included (will be included in next version) and some clarification needed for Exit condition under certain special conditions. Till then I hope the present version will be useful, though some manual chart inspection is needed.

The New Version is given below. Copy and save it in Amibroker\Formulas\Custom folder.


Code:
SetChartOptions(0, chartShowDates | chartWrapTitle);
SetChartBkColor(colorBlack);

_SECTION_BEGIN("Karthik_EOD");

P1 = Param("Shorter EMA Period", 3, 2, 100, 1);
P2 = Param("Longer EMA Period", 10, 3, 200, 1);
P3 = Param("ADX Period", 14, 3, 100, 1);

E1 = EMA(C, P1);
E2 = EMA(C, P2);
DPLUS = PDI(P3);
DMINUS = MDI(P3);

Buy = E1 > E2 AND DPLUS > DMINUS;
Sell = E2 > E1 AND DMINUS > DPLUS;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

Bought = Flip(Buy, Sell);
Sold = Flip(Sell, Buy);

XIT = E1 < L OR E1 > H;


_N(Title = EncodeColor(colorTurquoise) + "KARTHIK's EOD Strategy;"
				+ EncodeColor(colorYellow) + "  AFL by ANANT NAVALE, Version 1.50\n\n"
				+ EncodeColor(colorWhite) + StrFormat("{{NAME}} ({{INTERVAL}}, {{DATE}}; {{OHLCX}}; {{VALUES}}\n")
				+ EncodeColor(colorBrightGreen) + WriteIf(Buy, "Buy Above : " + H + ";     SL = " + L, "") 
				+ EncodeColor(colorPink) + WriteIf(Sell, "Sell Below : " + L + ",     SL = " + H, ""));
if(Status("action") == actionIndicator)
	{
		Plot(C, "", colorLightGrey, styleCandle);
		Plot(E1, "EMA(" + P1 + ")=", colorBrightGreen, styleLine | styleThick);
		Plot(E2, "EMA(" + P2 + ")=", colorRed, styleLine | styleThick);
		PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-20);
		PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-30); 
		PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-25); 
		PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=20);
		PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=30); 
		PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-25);
		PlotShapes(IIf(Bought AND XIT, shapeHollowDownArrow, shapeNone), colorYellow, 0, H, -15);
		PlotShapes(IIf(Sold AND XIT, shapeHollowUpArrow, shapeNone), colorSkyblue, 0, L, -15);
	}

if(Status("action") == actionExplore)
	{
		Filter = Buy OR Sell OR XIT;

		SetOption("NoDefaultColumns", True);
		AddTextColumn(Name(), "SYMBOL");
		AddColumn(DateTime(), "DATE", formatDateTime);
		AddColumn(IIf(Buy, 66, IIf(Sell, 83, 88)), "TRIG", formatChar, colorYellow, IIf(Buy, colorGreen, IIf(Sell, colorRed, colorBlue)));
		AddColumn(IIf(Buy, H, Null), "BUY ABOVE", 1.2);
		AddColumn(IIf(Sell, L, Null), "SELL BELOW", 1.2);
		AddColumn(IIf(XIT, Null, IIf(Buy, L, H)), "STOP LOSS", 1.2);
	}


_SECTION_END();
-Anant
Anyone made an EXPERT for Metastock for this and Quadra?
Many would be happy to see a chart with this AFL applied on it.. any chart.. particularly people like me who do not use Ami ! Please post if its not too big a hassle.
 

karthik_sri

Well-Known Member
Karthik/anup
can you clarify following 2 points:-
1. We exit when price not touch 3 EMA at all/ or it closes two much above / below 3 EMA.
2. In case there will be crossover we should always wait for crossover in ADX and vice versa.

thanks

anil negi
Hi Anil,
1).We exit when price not touch 3 EMA.
2). EMA crossover as well as ADX crossover

Karthik
 

Similar threads