Skip to content
Automatically find resistance lines in BTC (USD) pricing trading data using Meanshift Clustering
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
data
ml
tmp
.dockerignore
.gitignore
Dockerfile
LICENSE
Readme.md
docker-compose.yml
env.rb
recompose.sh
requirements.txt
run.sh
serve.sh
setup.sh

Readme.md

py-scikit-resistance-lines-btcusd

Example of a Chart Annotator script that draws Resistance Lines

Automatically finds resistance lines in pricing trading data

This repo has an example of an annotated SciKit Learn example of ML Classification using the Clustering Algo Meanshift

The target of this code is to find resistance lines in trading chart data (OHLC)

The example set is BTCUSD from bitstamp.

Installation

Run:

./setup.sh

This will install everything and it will also automatically starts an HTTP server

Running

To execute the "data crunching" and "chart annotating" job, use run.sh:

./run.sh

Running (Docker version)

To build and execute python via docker-compose, run:

./recompose.sh

Serve

Run a server, for example the python SimpleHTTPServer via:

./serve.sh

Then visit http://localhost:3000/

Docs

https://scikit-learn.org/stable/modules/generated/sklearn.cluster.MeanShift.html

Sources

Project forked from https://github.com/jonromero/forex_algotrading

Improvements

Currently it doesn't draws the direction yet - TODO: 'feature', not yet in the backlog)

Screenshot

Images sometimes are better than many words :D

"recent" image

Jun '19

First run (Apr '19)

If you want to use it "as it is" you will need to configure the AWS S3 credentials as that's the current way I'm saving/publishing the results. You want to comment all that code if you just to run it locally instead of automated inside docker.

You probably want also to tune quantile for the MeanShift clusterization to match the current price action. A range in between x and x should do that (The target is to find a quantile value that generates min 3-4 to max 8-10 clusters)

Enjoy!

@makevoid

You can’t perform that action at this time.