Downloading Buddha Trigger Points

As discussed in the last chapter,  Once a stock pops up in the watchlist of “Double Inside Bar”, “NR7+Inside Bar” and “Index Inside Bar”, We follow this follow the rules of famous Inside Bar strategy – 

  • Long if it breaks the high of the previous day with a stop loss at the previous day’s low.
  • Short if it breaks the low of the previous day with a stop loss at the previous day’s high.

In case of gap up above the previous day’s high or gap down below the previous day’s low, please avoid buying it or selling it respectively. It means – 

  • If there’s a gap up above the previous day’s high (the sell point), it implies that the sell trade has already been triggered, so we avoid this scenario.
  • Likewise, in the case of a gap down, we steer clear of situations where there’s a gap down below the previous day’s low (the buy point).

Also, the strategy does not demonstrate impressive performance when implemented on Narrow Range Bars. This is why, in the Buddha strategy, we focus on a watchlist comprising stocks that exhibit both “Narrow Range 7 Bars” and single “Inside Bar.” We call it NR7 Inside Bar.

Let's Backtest

We Shall backtest for types of patterns using the Inside Bar Strategy discussed earlier

  • Inside Bar of Index. 
  • Double Inside Bar.
  • Triple Inside Bar. 
  • Narrow Inside Bar = Narrow Range 7 + Inside Bar.
It will show the profitablity when the strategy is deployed on the candles that gets caught in the scanner. And, it will also show the failure of Triple Inside Bar Scanner. 

Download the CSV Files

These patterns are also integral to the Time Compression Strategy, which involves scanning stocks for these bars. You can go through this course of Coding Time Compression Scanners that shows how to scan the stocks for these bars from stratch.

Let’s download the dataset for backtesting – 

  • Inside Bar of Index. – The file used in this backtesting module is saved as a CSV file named index_ib.csv . It contains all dates when NIFTY and BankNIFTY Index exhibited Inside Bar Pattern since 2015 to today.
  • Double Inside Bar – The file used in this backtesting module is saved as a CSV file named double_ib.csv . It contains all the FNO stocks that has exhibited Double Inside Bar Pattern since 2015 to today.
  • Triple Inside Bar – The file used in this backtesting module is saved as a CSV file named tripple_ib.csv . It contains all the FNO stocks that has exhibited Triple Inside Bar Pattern since 2015 to today.
  • Narrow Inside Bar – The file used in this backtesting module is saved as a CSV file named nr7.csv . It contains  all the FNO stocks that has exhibited both Inside Bar Pattern and NR7 Pattern since 2015 to today,

The content of the CSV File looks like this – 

				
					date	symbol	marketcapname	sector
0	01-12-2015	NIFTYFINSERVICE	Smallcap	Indices
1	01-12-2015	BANKNIFTY	Smallcap	Indices
2	07-12-2015	NIFTYFINSERVICE	Smallcap	Indices
3	10-12-2015	NIFTY	Smallcap	Indices
4	10-12-2015	NIFTYFINSERVICE	Smallcap	Indices
...	...	...	...	...
558	31-07-2023	BANKNIFTY	Smallcap	Indices
559	04-08-2023	NIFTYFINSERVICE	Smallcap	Indices
560	07-08-2023	BANKNIFTY	Smallcap	Indices
561	10-08-2023	NIFTY	Smallcap	Indices
562	17-08-2023	NIFTY	Smallcap	Indices
563 rows × 4 columns
				
			

It shows the names of the stocks and the time in which they were triggered.  You can use the shared file as a starting point for the rest of the guide of backtesting. You may also use the data for other purposes.

Post a comment

Leave a Comment

Your email address will not be published. Required fields are marked *

×Close