EMA Crossover system -- huge earning potential

myamit

Well-Known Member
#1
EMA Crossover system -- Simple yet very effective

Hello Friends,

I'm working on three EMA cross over system & my initial testing (back testing as well live testing) yielded me some fantastic returns. This makes me think why this can't be used be MFs or big institutes as it can easily multiply your wealth manifold.

To me it looks like that it is almost risk free (with sufficient capital & proper position sizing) and earning is way beyond my expectations. Yes this system can be improved in big way. I need comments/inputs & most importantly ideas to improve for everybody's benefit.

Primary consideration
1. Need very few trades
2. No less than 30 minutes period.. higher time frame is preferred
3. Strict stop loss but remain in trade for long (I initally started with 100 points trailing)
4. Trade primarily in Nifty only

Basic rules about the system
1. Three EMAs – I call them FastAvg (FA), SlowAvg (SA) & StopAvg (ST)
2. Buy when FA crosses SA from below
3. Sell when FA crosses ST from above or at SL
4. Short when FA crosses SA from above
5. Cover when FA crosses ST from below or at SL
All actions are to be taken at the close of candle (30-min) only.

Risk management:
Initial stop loss of 20 points only.
Trailing stop loss 50 points

Money Management:
I suggest starting with 1 Lac & trading strictly 2 lots of Nifty.

Results:
See results attached.

Please understand that these results are achieved by trading 2 lots of nifty all the time. Period is from 16-Aug to 15-Apr (8 months). Also add 40K in profits as Amibroker sometimes takes lot size as one (don't know why -- may be my programming mistake -- I need help here -- see last para)


Also, I've purposefully not mentioned EMA values. As to me they are not important. With little testing & understanding your trading profile, you can optimize numbers. I actually can generate these results with lot of different combinations. Key here is to remain in trade for long & cut the losses if trade is going wrong.


Scope for improvements…
1. This system is taking long & short trade alternatively. Thus we miss quite a few entries. For example… we entered in a long trade but hit SL – in this case now our next trade is short trade only & if market is trending upwards than we may miss entire move. Solution here could be another entry signal – may be?
2. Also while using this system, you may notice that few trades are such where trades are reversed (from short to long or otherwise) in 3-4 candles only. I thought of using delayed entry (after 20 points or so) or angle of crossover (for example if angle is more than 30 degree than only go for trade).

I think if above two can be achieved than it would be very effective system.

Need help for better AFL programming
I also need help to program following points in better way…
1. Visual signal for entry & exits
2. Info box to show details such as entry price, current profit, current sl etc.
3. Position sizing logic – I’ve taken this from some other AFL… however AmiBroker arbitrarily takes one or two lots… or I could not understand logic…

Currently my syntax is as below...
SetOption("MaxOpenPositions",1);
RoundLotSize = 50;
SetOption("MinShares",RoundLotSize);
PositionSize = C*50*2;


I appreciate discussion on improving this system & also other aspects of AFL coding.

Request to Seniors/AFL experts : your help/comments needed & will be highly appreciated.

Request to other members: Please engage seniors/AFL experts to this discussion & let's have a meaningful discussion.

Thank you all.
 
Last edited:
#4
Thanks so much ....was waiting for this only for long

The pdf is ok but what r the values for fast , slow and stop ema??

Please provide the afl if possible
 
Last edited:

myamit

Well-Known Member
#6
Friends,

As I mentioned, EMA values are really not important. As you can easily optimize them to suite your requirement & achieve best results.
Let's focus on improving this system & also other aspects of AFL coding.

For starters, I'll say start with ...
Fast Avg = 15
Slow Avg = 59 (or 44)
Stop Avg = 21
Init Loss = 20
Stop Loss = 49 (or 84)

But again these parameters will keep chaging with each passing day. Also we need not to achieve best possible result but results that are good & we can implement without too much of heart burn.

Once again,
I appreciate discussion on improving this system & also other aspects of AFL coding.

Request to Seniors/AFL experts : your help/comments needed & will be highly appreciated.

Request to other members: Please engage seniors/AFL experts to this discussion & let's have a meaningful discussion.

Thank you all.
 
#7
amitji,

Have u gone through the strategy of 315 ema crossing given by tradewithhunter
I think the values of 3 and 15 are suitable for most of the stocks.

But I do think that ema values can be further optimised for different stocks.
Can u provide the afl which supports optimization as i am not amibroker programmer??

Also as far as TF is concerned larger the TF better it is for ema crossing.
I usually prefer daily charts. What is ur suggestion??

Moreover ema crossing works best for some scrips ..it should not be used with such scrips which move in a range for long time

I do call upon d seniors to help us out for any afl queries

Regards
Anurag
 
Last edited:

veluri1967

Well-Known Member
#8
Brother,
It seems you have already tested in Amibroker. Your PDF attachment confirms that. If so, you already have Buy,Sell conditions written in AFL.

Post that AFL here so that we may try to improve it by incorporating optimisation parameters.

NB:- Saw your PM and consider this as reply.

Regards
veluri
 

rkkarnani

Well-Known Member
#9
amitji,

Have u gone through the strategy of 315 ema crossing given by tradewithhunter
I think the values of 3 and 15 are suitable for most of the stocks.

But I do think that ema values can be further optimised for different stocks.
Can u provide the afl which supports optimization as i am not amibroker programmer??

Also as far as TF is concerned larger the TF better it is for ema crossing.
I usually prefer daily charts. What is ur suggestion??

Moreover ema crossing works best for some scrips ..it should not be used with such scrips which move in a range for long time

I do call upon d seniors to help us out for any afl queries

Regards
Anurag
Unlike 315 strategy, he is not in Trade all the time!! He is exiting his position when a ceratin EMA is breached trying to retain some profits in the move. People also work well with 3, 13, 39 period EMA's, they have their own trading rules.
It depends on an individual trader whether he prefers EOD charts or intraday charts.
It is a very good initiative by Amit. I request him to (if he is willing) post the Amibroker AFL he has used for back test and allow others to improve it... or allow others to adapt it to their own mental make up.
I do not use amibroker so will wait and watch how things pan out here!! :D
 

myamit

Well-Known Member
#10
Friends

I have received few requests to post afl for this. I actually wanted to post this afl after some suggested imrpovements are incorporated. Anyway please find AFL below...

Please suggest me to incorporate following...

1. How to keep lot size fixed for Nifty
2. Visual arrow - star for entry & exit
3. Info box to show details like type of trade, when triggered, stop loss etc.

4. Also I wish someone can add logic to avoid whipsaws (very few) in sideways market.. may be a momentum indicator or stoch or degree of angle created by crossover etc.

5. Additional entries - how not alternate this etc.


@rkkarnani - yes, your observations are very correct. I'm not in trade like 3x15 system.


AFL Code

/*

SetOption("EveryBarNullCheck", True);
SetChartOptions(0,chartShowArrows|chartShowDates | chartWrapTitle | chartLogarithmic);

_SECTION_BEGIN("Trading System");

Periods = Param("Fast Avg", 15, 2, 300, 1, 10 );
Plot( EMA( Close, Periods ), "Fast Avg", ParamColor( "Color-Fast", colorRed ), ParamStyle("Style") );

Periods = Param("Stop Avg", 21, 2, 300, 1, 10 );
Plot( EMA( Close, Periods ), "Stop Avg", ParamColor( "Color-Stop", colorBlue ), ParamStyle("Style") );

Periods = Param("Slow Avg", 52, 2, 300, 1, 10 );
Plot( EMA( Close, Periods ), "Slow Avg", ParamColor( "Color-Slow", colorGreen ), ParamStyle("Style") );

fa=15; //17;
sa=52; //49; //59;
st=21; //35;
InitStop = 20; //11;
TRStop = 40;// 84;


//FA = Optimize("FastAvg",15,10,33,1);
//SA = Optimize("SlowAvg",44,15,75,1);
//ST = Optimize("StopAvg",21,3,39,1);
//TRStop = Optimize("TrailingStop", 60,40, 100,1);
//InitStop = Optimize("Initial Stop", 10,1,40,1);


ApplyStop(stopTypeTrailing, stopModePoint, TRStop, 0, False, 0);
ApplyStop(stopTypeLoss, stopModePoint, InitStop, 0, False, 0);


FastAvg = EMA(Close, FA);
SlowAvg = EMA(Close, SA);
StopAvg = EMA(Close, ST);

UpTrend = Cross(FastAvg, SlowAvg);
StopUpTrend = Cross( Max(SlowAvg, StopAvg), FastAvg);
downTrend = Cross(SlowAvg, FastAvg);
StopDownTrend = Cross(FastAvg, Max(SlowAvg, StopAvg));

Buy = UpTrend;
Sell = StopUpTrend;
Short = downTrend;
Cover = StopDownTrend;


//Settings for Backtesting to keep lot size fixed // Need help here
SetOption("MaxOpenPositions",1);
RoundLotSize = 50;
SetOption("MinShares",RoundLotSize);
PositionSize = C*50*2;
//End of Backtesting Settings for Backtester

//====================End of Trading System====================//
 

Similar threads