Comment on Code your Technical Analysis strategy

APM commented on 06 May 2013, 05:09 AM

I want to have a code for the following
Buy : When the Low of the Candle is above EMA 34 Close and the previous candle close is below EMA 34 ( Candle moving from Bottom crossing EMA 34)
Sell : When the high of the Candle is below EMA 34 close and the previous candle close is above EMA 34
I am using the following code :
LOW>EMA(CLOSE,34) AND Ref(Low,1)<EMA(CLOSE,34)
Buy Exit :0
HIGH<EMA(CLOSE,34) AND Ref(HIGH,1)>EMA(CLOSE,34)
Sell Exit : 0

During live I have specified 5 minute candle but it is firing using one minute candle for example for sun pharma between 9.15 to 10.30 I got more than 6 firing

View the full comment thread »