Comment on algoZ- a simple example

Dk0046 commented on 17 Sep 2013, 12:47 PM

Hello, I can see a few trades when I put the historical data for 1 yr..
Also, I am just writing simple script for 20EMA.
Buy expression is:
(CLOSE > EMA(CLOSE,20))
Buy Exit expression is:
(CLOSE < EMA(CLOSE,20)) Sell expression is: (CLOSE < EMA(CLOSE,20)) Sell Exit expression is: (CLOSE > EMA(CLOSE,20))

So I should see say buy entry and then buy exit and at the same price sell entry and so on.. However, I am seeing exit only on a couple of places.. what wrong.. I should have only one position at a time as per the coding which is buy when Price is > 20EMA and exit when < 20EMA and short at the same price.. but back test doesn't show this pattern..

View the full comment thread »