Updated code for the T7 JNSAR system earlier published here -
Following updates made to the code

1. Buy / Sell arrows now appear when the corresponding conditions are met.
2. Support for Heikin-Ashi Candles added
3. Different Backtesting Position Sizing Algorithms added for evaluation

Also am republishing the trading rules here again with some modification

1. Go Long when the daily close is above the JNSAR line. Go Short when the daily close is below the JNSAR line. JNSAR line is the varying green line overlayed over the price chart. Once a signal comes at market close enter in the direction of the signal @ market price @ next day market open.

2. Trade only Nifty Index. This system was developed and backtested only for NIFTY Index. So trade in its Futures or Options, as you may deem fit. My recommendation is to choose futures for simplicity. If you want to reduce the trading cost and go with options, trade with deep in the money options, preferably 2 strikes far from the spot price.

3. Trade all signals. Markets trend only 30-35% of the time and hence the system is only accurate to that extend. But system tends to make enough money, in this small trending window, to keep the overall profitability in good health. But one never knows when a big trend may come and when it comes its absolutely imperative that you take it. To ensure that, trade all signals and don't be choosy about what signals you are going to trade. Also I wouldn't recommend using your own analysis to trade this system. Too many drivers will crash the car.

4. Like all trend following systems, this system will have many whipsaws during flat markets along with large trade and account drawdowns. Also some months and even years may not be profitable. But to trade this system profitably, it is necessary to take these in one's stride and keep trading. As the backtester results from 1990 to 2016 proves, this system is profitable overall thus far. Take confidence from that objective fact.

5. Trade with only that amount of money you can afford to loose. Initial capital that you need to have to trade one lot of NIFTY should be atleast - (Margin Money required to take and hold 1 lot position + maximum drawdown amount per lot)*1.2. Be prepared to add more if need be, but the above formula will give a rough idea of what you need to have to start trading and be in the game always.

6. Place an After Market Order @ Market Price with your broker after market close so that you get to execute the trade next trading day @ Market open to capture near similar price as the daily open price seen on the chart. This execution mode will give you the best chance to minimise the slippage and mimic the backtester results as closely as practically possible.

7. Follow all the 6 rules above religiously, as if your life depends on it. If you cant, then don't trade this system; You will certainly loose money.

Happy Trading !!! As always am looking out for your valuable feedback.
Release Notes: Updated to Pine V5. Happy Trading !!!

Syam @ T7 Wealth Creators Pvt Ltd - Makes Life Easier.

You can support me by opening an account with Dhan via link - https://www.t7wealth.com/trading-account
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?