Comment on Code your Technical Analysis strategy

sangi commented on 15 May 2013, 10:24 AM


You corrected my code for reversal strategy. thanks a lot. But tht code gives signal when a reversal candle gets formed and that too when i run scrip by scrip only.

But buy/sell is actually abv /blow the high/low of PR/NR. So Pls. give me a code tht generates signal on actual buy/sell with exit tgts as defined blow.

When I backtest, Should I go scrip by scrip? Or is there anyway to test this strategy in nifty 50 for a particular period?

My strategy for reversal:

Buy:abv the high of the positive reversal(PR) candle.SL is the low of the PR. exit for buy: closing the 50% buy posn at 1:1 and rest at 1.618 fibo extn(diff between high and low of th PR * 1.618) added to the high of the PR.

Sell: blow the low of the negative reversal candle. NR is just opposite of PR definition.

Definition of positive rev can:

Low of the current candle should be more than the low of the previous candle.
close of the current candle should be more than previous candles close and open of the current candle.
high of the current candle should be less than the high of the previous cndl.

RSI of the current candle should be more than 30 and RSI of the previous candle should be less than 30.

hope to get the reply soon. Thanks in adv.

View the full comment thread »