Comment on Code your Technical Analysis strategy

Faisal commented on 09 May 2013, 07:46 AM

Hi Zerodha,

I have made a strategy as follows :
Buy: EMA(Close,3)>EMA(Close,5) Sell: EMA(Close,3)< EMA(Close,5)

Buy exit: CLOSE<EMA(close,5) Sell exit: CLOSE>EMA(close,5)

In this case, does it exit the existing lots and add a new lot into position or just exit the existing position.
I.e. I have a short at nifty 5851.4. At 5726 long trigger occured. so in that case it should exit current short position and need to add one long position. How can this be done. the above code is sufficient ?

View the full comment thread »