Renko , SuperTrend , ATR , Heiken_Ashi Codes available

I have written codes for -

Indicators: -SuperTrend, ATR
Chart Patterns: - Heiken Ashi, Renko

Its in Python

Check them out-

PM me if stuck somewhere or raise issue in the repo

Inside the repo,
Examples directory contains Jupyter Notebook files with examples of Infy, ICICIBANK for Daily data.

  • rameshg
    Nice work !!! ...... do you have codes for live trading for the same ....
  • techietrader
    I am working on them, will release in a week.

  • shekar

    Downloaded your package from github and unzip done. Could you please detail a bit on how to run this package please.
  • techietrader
    Hi @shekar
    The codes are written in Python 2 with anaconda distribution with Pandas 0.18 version and fix_yahoo_finance (

    1. Assuming that you already have Python installed and using windows first install fix_yahoo_finance. This is the library that helps to fetch data from Yahoo.
    Open Command Prompt and type -> pip install fix_yahoo_finance

    2. Thats it. Open Command Prompt again and type- jupyter notebook. That shall open the notebook in your default web browser and you will see the directory. Navigate to the files where you have downloaded them (Preferably on desktop).

    3. Open the file that you wish to see (.ipynb extension are of Jupyter Notebook)

    4. Shift + Enter is how you execute codes in a cell and move on next cell.
    5. Ctrl + Enter is how you execute the cell to run codes in them and remain in same cell.

  • Parva
    Hey @techietrader

    Is there any update on supertrend code for live markets?

  • sshiremath2000
    for fix_yahoo_finance import, its giving error
  • suraj3003

    We can help you out with your above query, It is very much possible in our platform with more customizable options

    Kindly contact: [email protected]
    Call : +91 8879647666
    Website :
  • balu
    @techietrader , can you please help with ADX,+DI,-DI calculation, i am getting wrong values with below code
    def average_directional_movement_index(df, n, n_ADX):
    i = 0
    UpI = []
    DoI = []
    while i + 1 <= df.index[-1]:
    UpMove = df.loc[i + 1, 'High'] - df.loc[i, 'High']
    DoMove = df.loc[i, 'Low'] - df.loc[i + 1, 'Low']
    if UpMove > DoMove and UpMove > 0:
    UpD = UpMove
    UpD = 0
    if DoMove > UpMove and DoMove > 0:
    DoD = DoMove
    DoD = 0
    i = i + 1
    i = 0
    TR_l = [0]
    while i < df.index[-1]:
    TR = max(df.loc[i + 1, 'High'], df.loc[i, 'Close']) - min(df.loc[i + 1, 'Low'], df.loc[i, 'Close'])
    i = i + 1
    TR_s = pd.Series(TR_l)
    ATR = pd.Series(TR_s.ewm(span=n, min_periods=n).mean())
    UpI = pd.Series(UpI)
    DoI = pd.Series(DoI)
    PosDI = pd.Series(UpI.ewm(span=n, min_periods=n).mean() / ATR)
    NegDI = pd.Series(DoI.ewm(span=n, min_periods=n).mean() / ATR)
    ADX = pd.Series((abs(PosDI - NegDI) / (PosDI + NegDI)).ewm(span=n_ADX, min_periods=n_ADX).mean(),
    name='ADX_' + str(n) + '_' + str(n_ADX))
    df = df.join(ADX)
    return df

  • sonalisadhwani
    I have Live Trading bots ready for Supertrend, Renko, Heiken Ashi as well as a bunch of other indicators. If anyone is interested, ping me on Whatsapp at +91 9727140698.
  • Jigpylab
    working algo based on supertrend and zerodha is shared here.

Sign In or Register to comment.