Karthik's EOD Strategy...

asnavale

Well-Known Member
#31
Hi Anant,
Exit : Both on Buy/Sell the rule remains the same as the price don't touch 3EMA. Please check if you can able to code the exit strategy in AFL. Alternatively you can show if the price has reached 2% from the high/low there also we can exit.

Thanks for the coding!:clapping:

Karthik
Let me study and back test some charts before coding in the exit strategy.

-Anant
 

karthik_sri

Well-Known Member
#33
The difference is probably due to the data range used for the chart. In RR's chart the data is for about 60 days while the other chart has more data. However, as pointed out by RR, caution is necessary because the the required conditions are satisfied to the extent that we can take them as a trigger but future data can distort the chart, the cross-over and ADX can show opposite direction.

-Anant
Ideally there should not be any difference even you take 60days chart data or 100 days chart data as the maximum price/days look back period is 14days for ADX and 10 days for EMA for analysing our Buy/Sell trigger.

Karthik
 

asnavale

Well-Known Member
#36
Ideally there should not be any difference even you take 60days chart data or 100 days chart data as the maximum price/days look back period is 14days for ADX and 10 days for EMA for analysing our Buy/Sell trigger.

Karthik
Both ADX and EMA use a fraction of the previous value to calculate the present value. So, the fraction of previous value contains all the previous values. So, the number of candles included in calculation affects value of ADX and EMA. When the previous data available is sufficiently large, the difference becomes neglible.

The calculation of EMA differs from software to software. For an EMA period of n-days, the EMA can not be calculated by the standard defined formula if the number of candles available is less than or equal to n. So, the EMA for initial n candles is calculated by different methods by different software. Some use Simple MA for first n days and then change over to standard formula. Some others use progressive simple moving average for first n days. This way the calculated EMA for first n days differs from software to software. This EMA for first n candles in turn affects the EMA value of subsequent candles. Therefore, the cross-overs and values of ADX will differ from software to software unless a large number of data points is used. For a calculation of EMA 3 & 10 and ADX 14 using about 60 candles will show a wide variation compared to the values obtained with say 500 or more candles.

I have checked these manually using Excel.

In addition, what is displayed on chart will be restricted to 2 or 3 decimal places with rounding off, but what is used in calculation and comparison will be with more decimal places. So, a difference in 6th decimal may appear as a cross-over on chart but internally it will not be a cross-over. This also can cause difference in the charts posted.

-Anant
 

anup

Well-Known Member
#37
Both ADX and EMA use a fraction of the previous value to calculate the present value. So, the fraction of previous value contains all the previous values. So, the number of candles included in calculation affects value of ADX and EMA. When the previous data available is sufficiently large, the difference becomes neglible.

The calculation of EMA differs from software to software. For an EMA period of n-days, the EMA can not be calculated by the standard defined formula if the number of candles available is less than or equal to n. So, the EMA for initial n candles is calculated by different methods by different software. Some use Simple MA for first n days and then change over to standard formula. Some others use progressive simple moving average for first n days. This way the calculated EMA for first n days differs from software to software. This EMA for first n candles in turn affects the EMA value of subsequent candles. Therefore, the cross-overs and values of ADX will differ from software to software unless a large number of data points is used. For a calculation of EMA 3 & 10 and ADX 14 using about 60 candles will show a wide variation compared to the values obtained with say 500 or more candles.

I have checked these manually using Excel.

In addition, what is displayed on chart will be restricted to 2 or 3 decimal places with rounding off, but what is used in calculation and comparison will be with more decimal places. So, a difference in 6th decimal may appear as a cross-over on chart but internally it will not be a cross-over. This also can cause difference in the charts posted.

-Anant
Thanks a lot for the detailed explanation..So could we conclude, If we use 6 months time and plot the chart, then it will be good?...
 

karthik_sri

Well-Known Member
#38
Both ADX and EMA use a fraction of the previous value to calculate the present value. So, the fraction of previous value contains all the previous values. So, the number of candles included in calculation affects value of ADX and EMA. When the previous data available is sufficiently large, the difference becomes neglible.

The calculation of EMA differs from software to software. For an EMA period of n-days, the EMA can not be calculated by the standard defined formula if the number of candles available is less than or equal to n. So, the EMA for initial n candles is calculated by different methods by different software. Some use Simple MA for first n days and then change over to standard formula. Some others use progressive simple moving average for first n days. This way the calculated EMA for first n days differs from software to software. This EMA for first n candles in turn affects the EMA value of subsequent candles. Therefore, the cross-overs and values of ADX will differ from software to software unless a large number of data points is used. For a calculation of EMA 3 & 10 and ADX 14 using about 60 candles will show a wide variation compared to the values obtained with say 500 or more candles.

I have checked these manually using Excel.

In addition, what is displayed on chart will be restricted to 2 or 3 decimal places with rounding off, but what is used in calculation and comparison will be with more decimal places. So, a difference in 6th decimal may appear as a cross-over on chart but internally it will not be a cross-over. This also can cause difference in the charts posted.

-Anant
Anant Bro,
Thanks for your detailed explanation. But the formula for ADX & EMA will remain same if we use any software (to my knowledge). As you said it is the price difference which makes the difference. But generally other than Forex market the importance of decimal is given upto TWO only.

Karthik
 

karthik_sri

Well-Known Member
#39
Karthik

One or two things just to clarify,

1. You choose EMA 3 / 10, apart from 315 which is very famous till now, hope you have paper trade with both the strategy and found this one better, although it does have ADX filter.
2. kindly also suggest Reentry for buy/ sell
3. Can we settle a buy entry at the time of ADX crossover?

thks
anil negi
Hi Anil,

Re Entry Rule:

I have posted the chart of ADANIENT for Reentry Rule.

http://i.imgur.com/7gk1l.png

Karthik
 

Similar threads