Comment on Code your Technical Analysis strategy

Nasrudeenh commented on 16 Aug 2013, 09:29 AM

Dear Sir,

I use 10 day simple moving average to initiate trades. My strategy is as follows:

Buy if price moves up from below and crosses 10 SMA of yesterday;
Sell if price moves down from above and crosses 10 SMA of yesterday

For example:
Nifty Futures Contract closed yesterday at 5600 and the 10 day SMA of Nifty Future at market close yesterday was 5500. So, today I would intiate short only if Nifty breaks below 5500.

However, your system initiates trade by calculating 10 day SMA starting from the live market hours which is not my strategy. The code should look like this:


Kindly help me code the strategy as mentioned above.

Kind Regards,

View the full comment thread »