GithubHelp home page GithubHelp logo

marlonsc / stolgo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stockalgo/stolgo

0.0 0.0 0.0 5.74 MB

Price Action Trading APIs, Algorithmic approach, Dealing with securities. Get APIs to detect candlestick patterns, identify trends, support resistance, and price breakout.

Home Page: http://stolgo.com

License: MIT License

Python 100.00%

stolgo's Introduction

Stolgo is Price Action Trading Analysis Library. Whenever the price reaches resistance during an upward trend, more sellers will enter the market and enter their sell trades. This is a simple price action rule. But How to automate this rule? How to write backtest for this? Stolgo provides APIs for Price Action Trading.

Why Stolgo?

There are many libraries to backtest technical indicators (such as moving average crossover, MACD, RSI, etc.) base strategies, But What about the Price Action Trading? A Price Action Trader uses support/resistance, candlestick pattern, trend, breakout, and other parameters based on price. You can use Stolgo to backtest your price action trading rules.

Installation

Use the package manager pip to install stolgo.

pip install stolgo

For data feed, Stolgo uses bandl.io , Where by just calling get_data API, You can get data from your favourite broker, directly from exchange website or yahoo finance.

Usage

Get the data, for example using yahoo finance module form bandl

pip install bandl

Example: Get Indian (NSE/BSE) stock data using Yahoo finance

from bandl.yfinance import Yfinance
testObj = Yfinance() # returns 'Yfinance class object'.
dfs = testObj.get_data("SBIN",start="21-Jan-2020") #retruns data from 21Jan 2020 to till today

Example: Get the data of Apple (US Stock) from Nasdaq

from bandl.nasdaq import Nasdaq
testObj = Nasdaq() # returns 'Nasdaq class object'.
dfs = testObj.get_data("AAPL",periods=90) # returns last 90 days data

check for bullish engulfing pattern

from stolgo.candlestick import CandleStick
candle_test = CandleStick()
is_be = candle_test.is_bullish_engulfing(dfs)

check for an inverted hammer candle pattern

from stolgo.candlestick import CandleStick
candle_test = CandleStick()
is_it = candle_test.is_inverse_hammer_candle(dfs)

check for breakout

from stolgo.breakout import Breakout
breakout_test = Breakout()
is_be = breakout_test.is_breaking_out(dfs,periods=None,percentage=None) #periods:Number of candles,percentage: range of consolidation in percentage

Todo

  • Add unittest
  • Add more features such as Support Resistance, momemtum, etc.
  • Add Event-Driven Backtester

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Kindly follow PEP 8 Coding Style guidelines. Refer: https://www.python.org/dev/peps/pep-0008/

Please make sure to update tests as appropriate.

License

MIT

stolgo's People

Contributors

chiranjeevg avatar gmtpritam avatar israni1995 avatar stockalgo 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.