GithubHelp home page GithubHelp logo

prateekmondal / trading-indicators-and-chart-patterns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from techietrader/trading-indicators-and-chart-patterns

0.0 0.0 0.0 27 KB

ATR, SuperTrend, Heiken Ashi, Renko

License: GNU General Public License v3.0

Python 100.00%

trading-indicators-and-chart-patterns's Introduction

I have written Python codes for an indicator and a couple of Advance Chart patterns.

  1. Indicators: -SuperTrend, ATR
  2. Chart Patterns: - Heiken Ashi, Renko

A Supertrend is a trend following indicator similar to moving averages. It is plotted on price and the current trend can simply be determined by its placement vis-a-vis price. It is a very simple indicator and constructed with the help of just two parameters- period and multiplier. It can be used in conjunction with any other indicator, something like a Crossover with a moving average or as a standalone with any chart pattern. You can find some cool videos on it on Youtube- https://www.youtube.com/results?search_query=supertrend

Heiken-Ashi Candlesticks are an offshoot from Japanese candlesticks. Heiken-Ashi Candlesticks use the open-close data from the prior period and the open-high-low-close data from the current period to create a combo candlestick. The resulting candlestick filters out some noise in an effort to better capture the trend. More can be found out on :- http://stockcharts.com/school/doku.php?id=chart_school:chart_analysis:heikin_ashi

This is how Heiken-Ashi calculated:-

  1. The Heiken-Ashi Close is simply an average of the open, high, low and close for the current period.

HA-Close = (Open(0) + High(0) + Low(0) + Close(0)) / 4

  1. The Heiken-Ashi Open is the average of the prior Heiken-Ashi candlestick open plus the close of the prior Heiken-Ashi candlestick.

HA-Open = (HA-Open(-1) + HA-Close(-1)) / 2

  1. The Heiken-Ashi High is the maximum of three data points: the current period's high, the current Heiken-Ashi candlestick open or the current Heiken-Ashi candlestick close.

HA-High = Maximum of the High(0), HA-Open(0) or HA-Close(0)

  1. The Heiken-Ashi low is the minimum of three data points: the current period's low, the current Heiken-Ashi candlestick open or the current Heiken-Ashi candlestick close.

HA-Low = Minimum of the Low(0), HA-Open(0) or HA-Close(0)

Renko Bars on the other hand are not like traditional OHLC candles but are more like a user defined size which can possibly be anything. Once price surpasses the top or bottom of previous bar, new renko bar is placed. Renkos are mostly time and noise independent and they don’t have shadows like candlesticks. Renko bars are mostly used in finding support and resistances. More on them: - https://www.investopedia.com/terms/r/renkochart.asp

Where to go next:

  1. Fork it and tweak it according to your own use
  2. Try backtesting trading strategies

Disclaimer:- Use at your own risk

trading-indicators-and-chart-patterns's People

Contributors

techietrader avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.