We deploy two type of exit strategy in same trading model.
Intraday: One is intraday i.e the trade is auto square off at the end of the day.
Positional: Another strategy is the positional approach, where either the trade will reach its stop loss or target, or it will be automatically squared off at the end of the 5-day period. Please note that these 5 days are calendar days and do not depend on whether the market is open for trading or not.
At the time of market opening, the market remains too volatile because of liquidity. So, We start our trade at 9:20 AM. Similarly, We auto square off at 14:20 PM to avoid day end’s volatility!
Similarly, Apart from the initial conditions of entry, exit and trade management, Here are two set of micro conditions that govern the strategy for the purpose of better stability and ease of exeuction.
Changing the parameters of these conditions does not alter the core startegy that much –
Although this case was already discussed but, 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 –
import pandas as pd
pd
” to refer to Pandas throughout our code, which makes it easier to use Pandas functions. double_ib.csv
file. It contains all the FNO stocks that has exhibited Double Inside Bar Pattern since 2015 to today.
Note – The process of import is same for index_ib.csv or tripple_ib.csv and nr7.csv.
df = pd.read_csv("/your/path/here/double_ib.csv")
This line of code does the actual work of reading the CSV file. Let me explain each part:
pd.read_csv()
: This is a Pandas function used to read CSV (Comma-Separated Values) files. It can read data from a local file or a URL."/your/path/here/double_ib.csv"
: This is the path to the CSV file you want to read. You would replace "/your/path/here/"
with the actual path to the directory where your “double_ib.csv
” file is located. Make sure to keep the file name and its extension (“.csv
“) as it is.df
: This is a variable that will store the data from the CSV file as a Pandas DataFrame. You can choose any variable name you like; “df
” is a common convention for a DataFrame variable name.So, when you execute this code, it will read the data from the “double_ib.csv
” file and store it in the variable df
. You can then perform various data manipulation and analysis operations on this DataFrame using Pandas functions.”