Karthik's Intraday Trading using EMA & CCI

johnnypareek

Well-Known Member
#31
Tried to create afl

HTML:
/*
Setup

1). Timeframe : 5min chart
2). EMA : 110 period
3). CCI : 14 days

Why EMA 110? To be frank no idea but when tested proved with results to guage the TREND!

RULE

BUY / GO LONG CONDITION

a). The 5 min candle should be above 110 EMA. 
b). CCI should be > 100. We consider CCI reading only for ENTRY not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the High price

SELL / GO SHORT CONDITION

a). The 5 min candle should be below 110 EMA. 
b). CCI should be < -100. We consider CCI reading only for ENTRY and not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the Low price

EXIT : Rs.10/- min 

SL : Rs.10/- (as I want to keep RR as 1:1)

Recommended Scrips : MARUTI, AXISBANK, LT, TCS, ICICIBANK & SBI

I have tested the strategy with the above scrips and hence posted as recommendation. Why I have selected the above scrip is bacause of the highly traded volume. 

I will explain in detail with the Charts

Karthik
*/
_SECTION_BEGIN("Price");
SetChartBkGradientFill( ParamColor("BgTop", colorDarkOliveGreen),
ParamColor("BgBottom", colorDarkGrey),ParamColor("titleblock",colorDarkOliveGreen ));

TimeFrameSet( in5Minute);
EMA110=EMA(C,110);
pt=CCI()>100;nt=CCI()<-100;
bullish=C>EMA110 AND pt;
bear=C<EMA110 AND nt;
Color=IIf(bullish,colorGreen,IIf(bear,colorRed,colorBlack));


GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close",  color , styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
Plot(EMA110,"EMA110",5,1);
Buy=Cover=bullish;
Short=Sell=bear;
//Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
//Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
/*
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,Offset=-10);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,Offset=-10);
PlotShapes(IIf(Short, shapeHollowDownArrow , shapeNone), colorRed);
PlotShapes(IIf(Cover, shapeHollowUpArrow , shapeNone), colorGreen);
*/
TimeFrameRestore();
_SECTION_END();
 
Last edited:

karthik_sri

Well-Known Member
#33
Dear kartik,
please advice on todays movement of ICICI (cash)
at 11:55 it crossed 110EMA and cci was -109 c=1056.55 L=1056.50 Sell signal generated
at 12:00 it crossed the 0.10% L= 1055.15
Target = 1046.55 NOT acheived
SL 1066.50

near end of day
at 15:24 it crossed 110EMA and cci was +109 c=1059.25 H=1059.95 Buy signal generated
at 15:30 it crossed the 0.10% H = 1062
Target = 1069.95
SL = 1049.25

My question is
1. is my target and SL numbers correct
2. since 1st sell set up was not achieved should i close the sell because buy set up appeared at 15:25
3. should the set up be c/f for next day
4. can i use the cash setup and trade in future
Dear chandy,
There was an oppertunity (short side) in 9:34 but that had the SL hit. The second of urs is right. To answer your point 2 we wait for Target or SL to hit as we have fixed the SL. Since this is Intraday setup to close the trade on the same day. There will be a price difference between Cash & Future to be traded separately with the respective market.

Karthik
 
#35
MARUTI :-

9.15 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1407.35
Low : 1393
Buy Above : 1408.75
Target : 1418.75
SL : 1397

Buy Triggered : 9.20 Candle
Tar. Achived : 10.15 Candle


TCS :

9.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1526.90
Low : 1519
Buy Above : 1530
Target : 1540
SL : 1516.90

Buy Triggered : 9.40 Candle
Tar. Achived : 11.05 Candle

SBIN :

10.25 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 2120.10
Low : 2103.50
Sell Below : 2101.40
Target : 2091.40
SL : 2113.50

Sell Triggered : 10.50 Candle
Tar. Achived : 11.00 Candle

LT :

1st Trade :

10.35 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 1374.50
Low : 1371
Sell Below : 1369.60
Target : 1359.60
SL : 1380

Sell Triggered : 10.55 Candle
Stop Los Hit : 11.35 Candle
2nd Trade:

11.35 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1381.45
Low : 1378
Buy Above : 1382.85
Target : 1392.85
SL : 1371.45

Buy Triggered : 11.45 Candle
Tar. Acheived : 12.15 Candle
ICICI :

11.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1089.10
Low : 1086.80
Buy Above : 1090.20
Target : 1100.20
SL : 1079

Buy Triggered : 11.35 Candle

Am I Correct Karthick ?
 
Last edited:
#36
Tried to create afl

HTML:
/*
Setup

1). Timeframe : 5min chart
2). EMA : 110 period
3). CCI : 14 days

Why EMA 110? To be frank no idea but when tested proved with results to guage the TREND!

RULE

BUY / GO LONG CONDITION

a). The 5 min candle should be above 110 EMA. 
b). CCI should be > 100. We consider CCI reading only for ENTRY not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the High price

SELL / GO SHORT CONDITION

a). The 5 min candle should be below 110 EMA. 
b). CCI should be < -100. We consider CCI reading only for ENTRY and not for EXIT. This CCI will act as a FILTER to avoid false Traps
c). A 0.10% filter on the Low price

EXIT : Rs.10/- min 

SL : Rs.10/- (as I want to keep RR as 1:1)

Recommended Scrips : MARUTI, AXISBANK, LT, TCS, ICICIBANK & SBI

I have tested the strategy with the above scrips and hence posted as recommendation. Why I have selected the above scrip is bacause of the highly traded volume. 

I will explain in detail with the Charts

Karthik
*/
_SECTION_BEGIN("Price");
SetChartBkGradientFill( ParamColor("BgTop", colorDarkOliveGreen),
ParamColor("BgBottom", colorDarkGrey),ParamColor("titleblock",colorDarkOliveGreen ));

TimeFrameSet( in5Minute);
EMA110=EMA(C,110);
pt=CCI()>100;nt=CCI()<-100;
bullish=C>EMA110 AND pt;
bear=C<EMA110 AND nt;
Color=IIf(bullish,colorGreen,IIf(bear,colorRed,colorBlack));


GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close",  color , styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
Plot(EMA110,"EMA110",5,1);
Buy=Cover=bullish;
Short=Sell=bear;
//Buy=ExRem(Buy,Sell);Sell=ExRem(Sell,Buy);
//Short=ExRem(Short,Cover);Cover=ExRem(Cover,Short);
/*
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L,Offset=-10);
PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,Offset=-10);
PlotShapes(IIf(Short, shapeHollowDownArrow , shapeNone), colorRed);
PlotShapes(IIf(Cover, shapeHollowUpArrow , shapeNone), colorGreen);
*/
TimeFrameRestore();
_SECTION_END();
Hi JohhyPareek,

Thanks for the AFL. Some observations
1. The idea is o buy above the candle high of the candle that closes above the 110 EMA and CCi > 100. But we are not able to read the OHLC rates as the color scheme is black font on grey background. The font color has to be changed.
2. How are buy and sell entries indicated. I am unable to see them on the charts.

I request you to make this visually more appealing ,My request is because of my very limited knowledge of Amibroker coding. I have just started using it for past 2-3 weeks and still figuring it out

Thanks fr th ehelp in advance.
 

johnnypareek

Well-Known Member
#37
Hi JohhyPareek,

Thanks for the AFL. Some observations
1. The idea is o buy above the candle high of the candle that closes above the 110 EMA and CCi > 100. But we are not able to read the OHLC rates as the color scheme is black font on grey background. The font color has to be changed.
2. How are buy and sell entries indicated. I am unable to see them on the charts.

I request you to make this visually more appealing ,My request is because of my very limited knowledge of Amibroker coding. I have just started using it for past 2-3 weeks and still figuring it out

Thanks fr th ehelp in advance.
YA YA That was made in hurry. Actully I put buy/sell arrow too but have to do tgt sl exit will do tonight n post.
 

johnnypareek

Well-Known Member
#38
MARUTI :-

9.15 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1407.35
Low : 1393
Buy Above : 1408.75
Target : 1418.75
SL : 1397

Buy Triggered : 9.20 Candle
Tar. Achived : 10.15 Candle


TCS :

9.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1526.90
Low : 1519
Buy Above : 1530
Target : 1540
SL : 1516.90

Buy Triggered : 9.40 Candle
Tar. Achived : 11.05 Candle

SBIN :

10.25 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 2120.10
Low : 2103.50
Sell Below : 2101.40
Target : 2091.40
SL : 2113.50

Sell Triggered : 10.50 Candle
Tar. Achived : 11.00 Candle

LT :

1st Trade :

10.35 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 1374.50
Low : 1371
Sell Below : 1369.60
Target : 1359.60
SL : 1380

Sell Triggered : 10.55 Candle
Stop Los Hit : 11.35 Candle
2nd Trade:

11.35 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1381.45
Low : 1378
Buy Above : 1382.85
Target : 1392.85
SL : 1371.45

Buy Triggered : 11.45 Candle
Tar. Acheived : 12.15 Candle
ICICI :

11.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1089.10
Low : 1086.80
Buy Above : 1090.20
Target : 1100.20
SL : 1079

Buy Triggered : 11.35 Candle

Am I Correct Karthick ?

Hi,

Only one trade on the same side?? I mean to say MARUTI have done tgt. Now cci falls back below 100 after one hrs it again goes above 100, here shud we buy again with rs10 sl tgt??
 

johnnypareek

Well-Known Member
#39
Hi JohhyPareek,

Thanks for the AFL. Some observations
1. The idea is o buy above the candle high of the candle that closes above the 110 EMA and CCi > 100. But we are not able to read the OHLC rates as the color scheme is black font on grey background. The font color has to be changed.
2. How are buy and sell entries indicated. I am unable to see them on the charts.

I request you to make this visually more appealing ,My request is because of my very limited knowledge of Amibroker coding. I have just started using it for past 2-3 weeks and still figuring it out

Thanks fr th ehelp in advance.
Regarding background color, right click on chart n select parameter there select diff color for titleblock
 

karthik_sri

Well-Known Member
#40
MARUTI :-

9.15 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1407.35
Low : 1393
Buy Above : 1408.75
Target : 1418.75
SL : 1397

Buy Triggered : 9.20 Candle
Tar. Achived : 10.15 Candle


TCS :

9.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1526.90
Low : 1519
Buy Above : 1530
Target : 1540
SL : 1516.90

Buy Triggered : 9.40 Candle
Tar. Achived : 11.05 Candle

SBIN :

10.25 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 2120.10
Low : 2103.50
Sell Below : 2101.40
Target : 2091.40
SL : 2113.50

Sell Triggered : 10.50 Candle
Tar. Achived : 11.00 Candle

LT :

1st Trade :

10.35 Candle : (Crossed Below EMA and CCI Above -100).
==========
High : 1374.50
Low : 1371
Sell Below : 1369.60
Target : 1359.60
SL : 1380

Sell Triggered : 10.55 Candle
Stop Los Hit : 11.35 Candle
2nd Trade:

11.35 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1381.45
Low : 1378
Buy Above : 1382.85
Target : 1392.85
SL : 1371.45

Buy Triggered : 11.45 Candle
Tar. Acheived : 12.15 Candle
ICICI :

11.30 Candle : (Crossed Above EMA and CCI Above 100).
==========
High : 1089.10
Low : 1086.80
Buy Above : 1090.20
Target : 1100.20
SL : 1079

Buy Triggered : 11.35 Candle

Am I Correct Karthick ?
Yes ST Bro...everything is perfect:clap::clap:

If Traded would have made more than Rs.8000/- appx :thumb:

Karthik
 

Similar threads