Giter Club home page Giter Club logo

algorithm_trading_01's Introduction

backtrader_sample

sample code from backtrader library

The macd and candlestick module are extrancting the pre existed Data to calcualte the some chart pattern and macd signal seperately.

Chart Pattern listed in candlestick module are:

  1. bearish engulfing
  2. bullish engulfing
  3. Hammer
  4. Grave stone
  5. dragon fly
  6. three white soldier
  7. morning start
# Macd signal with label
from Project_01.macd import macd
X,y=macd.signal_macd()
from  Project_01.candlstick import ca
data=ca.candstick(data='BTC-USD')

# Macd signal with label
from Project_01.macd import macd
X,y=macd.signal_macd()

MACD Stategy in machine leanring

  • We extract our signal of [buy and sell] by macd. those preiod of candles that happend before crossing buy(label as 1) and those number of candle that happend just before Crossing Sell(label as 0) are important for us. we gather them out and turn them into Tensor.

  • at the end we have a unshaped Tensor with the X_columns of OHCL,Volume,change etc and the one dimention y_label of 0 and 1. then we pass these unshaped matrix to our neural network to let the machnie learn to in what sequence of candles we would have buy or sell

In the Evaluation process we pass the 30-50 Previos Candle to our mdoel to check the buy,sell Probability of the next candle and so on....

algorithm_trading_01's People

Contributors

erfanvahdat avatar

Watchers

 avatar

Forkers

webclinic017

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.