839 9 53
JNSAR stands for Just Nifty             -0.14% Stop & Reverse. This is a Trend Following Daily Bar Trading System for NIFTY             -0.14% . Original idea belongs to ILLANGO @ http://tradeinniftyonly.blogspot.in. I coded the pine version of this system based on a request from @stocksonfire. Use it at your own risk after validation at your end. Neither me or my company is responsible for any losses you may incur using this system. Hope you like this system and enjoy trading it !!!

Updated V3 code for the T7 JNSAR system earlier published here V2 and here V1

Following updates made to the code

1. Added a 22 Period Simple moving average filter over and above the standard JNSAR value for generating trading signals. This simple filter reduces the whipsaw trades drastically along with similar improvements in the max draw down and overall profitability of the system. The SMA filter is turned ON by default but can be turned OFF by user through the settings window.
2. Backtest option is now turned ON by default.

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             -0.14% Index. This system was developed and backtested only for NIFTY             -0.14% 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 2017 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             -0.14% 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 minimize 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.
Remove from Favorite Scripts Add to Favorite Scripts
IS THE SAME CODE AVAILABLE FOR AMIBROKER?
Reply
@hasmu2, No not yet. But can be developed at a small price. Please PM me for more details.
Reply
Sir,

Please let me know how to use to 22 periods SMA filter. My understanding is go long when the daily close is above the JNSAR and SMA line. Go short when the daily close is below the JNSAR and SMA line. Am i right? Please clarify. Thanks.
Reply
syam-mohan-vs PRO ShekarSrinivasan
@ShekarSrinivasan, U r rite. Anyway you just need to see the arrows which will appear promptly when the conditions you stated are met. The plots are just for added effects....
Reply
ShekarSrinivasan syam-mohan-vs
@syam-mohan-vs, Sir one clarification, please... I notice the arrows appear once the price closes below or above the 22 period SMA. Then what is the relevance of JNSAR? We can just follow 22 periods SMA. Because when its long 22 SMA is always above the JNSAR line and vice versa. Need your guidance. Thanks.
Reply
syam-mohan-vs PRO ShekarSrinivasan
@ShekarSrinivasan, Both are used together in code as the SMA filter overlayed above the JNSAR gives a better result. There is an option of turning off SMA filter and you can view the backtester results with and without the same. I have tested with just the plane SMA as well but the results were inferior to the combined JNSAR, SMA signalling. Hope this helps.
Reply
ShekarSrinivasan syam-mohan-vs
@syam-mohan-vs, Thank You.
Reply
ShekarSrinivasan syam-mohan-vs
@syam-mohan-vs, Sir, One more clarification please, how do you arrive those numbers Jnsar Long +126, Jnsar short -123 etc.?
Reply
syam-mohan-vs PRO ShekarSrinivasan
@ShekarSrinivasan, Those are the actual contracts traded by the backtester. Default position size is based on fixed rupee value for all trades. The number of contracts are adjusted based on the spot value to achieve this.
Reply
India
United States
United Kingdom
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out