Comment on Trading Systems

ADV. ANAND commented on 19 Jun 2014, 09:20 PM

Hello,
ZERODHA,
I have just started backtesting my strategies and I want to know what script should I write if I want to make position as follows:
BUY when two EMAs (7 period EMA & 14 period EMA) goes ABOVE three other EMAs(50 EMA, 100 EMA and 200 EMA); AND Price close is above PSAR (.002,.02)
Exit Long when Either close price crosses (goes below) PSAR(.002,.02) ; OR two EMAs (7 period EMA & 14 period EMA) goes BELOW three other EMAs(50 EMA, 100 EMA and 200 EMA)
SELL when two EMAs (7 period EMA & 14 period EMA) goes BELOW three other EMAs(50 EMA, 100 EMA and 200 EMA); AND Price close is BELOW PSAR (.002,.02)
Exit Short when Either close price crosses (goes above) PSAR(.002,.02) ; OR two EMAs (7 period EMA & 14 period EMA) goes Above three other EMAs(50 EMA, 100 EMA and 200 EMA)

Thanks,
K R ANAND

View the full comment thread »