We backtest our algorithm to ensure max profit

We using zerodha Pi to backtest our intraday trading algorithm and optimised in such a way that we get maximum profit with limited stop loss. The algorithm soley contains technical indicators in 5 mint duration.

The following backtest data contains result of our PUT option algorithm of NIFTY 50 from Jun 5th (Budget 2019) – Aug 27th.

Backtest Days
%
Profit Percentage
Risk to Reward Ratio

services we provide

A complete walkthrough about stock market trading using technical analysis and indicators.

Daily recommendations for intraday trading in Nifty 50  and Future stocks.

Zerodha pi and Chartink Screeners are helpful to get entry points while doing intraday trading.

Nifty 50 SHORT - Backtest Code in Zerodha Pi

Buy Condition

CLOSE<OPEN
AND
AroonDown(25)>AroonUp(25)
AND
ADX(14)>REF(ADX(14),1)
AND
ADX(14)>14
AND
DIN(14)<45
AND
ADX(14)<(2*DIP(14))
AND
(
ADX(14)>MAX(REF(ADX(14),1),20)
OR
SMA(ADX(14),4)>REF(SMA(ADX(14),4),1)
)
AND
(
DIN(14)>ADX(14)
OR
ADX(14)>REF(ADX(14),1)
)
AND
DIP(14)<ADX(14)
AND
CLOSE<SMA(CLOSE,50)

Sell Condition

AroonUp(25)>AroonDown(25)
OR
ADX(14)<14
OR
(
(ADX(14)-DIN(14))>15
AND
ADX(14)<REF(ADX(14),1)
)

Zerodha Pi

Long Position

You can test the long positions by writing the ENTRY position condition in BUYLONG and exit condition in EXIT LONG. The more Positive profit % you get, the more good your algorithm is.

Short Position

There is no option to test the short conditions, but you can write the ENTRY condition in BUYLONG and exit condition in EXIT LONG. The more Negative profit you get the more good your algorithm is.

Backtest in Zerodha PI

The above script can be tested with zerodha PI Desktop version, If you don't have a zerodha account, please click the below button to open a trading account. If you find the coding hard, please don't mind giving us a ping on our social page.
Facebook
Google+
Twitter
WhatsApp
Telegram