The Data Science project begins from the problem statement and ends with the solution of the problem. Depending on the problem statement, approaching the problem also differs. We must work on some fields like data extraction, data cleaning, EDA… like many processes are there. …


For Short

import datetime

trade=0
Trade= pd.DataFrame(columns=['Trade_Date'])
for i in range(len(df_options)):
if (trade==0) & (df_options['Time'][i]>=datetime.datetime.strptime('10:00:00', '%H:%M:%S').time()) & (df_options['Time'][i]<=datetime.datetime.strptime('10:05:00', '%H:%M:%S').time()):
Entry_Price=df_options['Open'][i]
Entry_Time=df_options['Time'][i]
Entry_date=df_options['date'][i]…

Complete Python Code for Super Trend:

def TrueRange(data):
data = data.copy()
data["TR"] = np.nan
for i in range(1,len(data)):
h = data.loc[i,"high"]
l = data.loc[i,"low"]…


Donchian Channel(DC) and Super Trend

About DC — https://en.wikipedia.org/wiki/Donchian_channel

About Super Trend — https://investobull.com/what-is-super-trend-indicator-and-how-to-use-it/

Here I am going to explain DC-super trend back testing with python.

Donchian Channel(DC) formula:

upper channel = highest high of last N-periods

lower channel = lowest low of last N-periods

middle channel =( (upper channel + lower channel)/2)

python code:

vamsi krishna

I'm a Data Science enthusiast who loves to play with machine learning and deep learning.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store