Comment on Zerodha Email- Launch of algoZ
Pradeep,
Had seen your query in my email, had one too many requests today on this. I am taking all these queries in the following blog: http://www.zerodha.com/z-connect/blog/view/code-your-technical-analysis-strategy
To enable, send an email to [email protected]
Anyways your expression would be something like this:
Buy expression:
SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC>MAXOF(REF(HAC,1), REF(HAC,2), REF(HAC,3), REF(HAC,4))
Buy exit: 0
Sell expression:
SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC < MINOF(REF(HAC,1), REF(HAC,2), REF (HAC,3), REF (HAC,4))
Sell exit: 0