This Python Flask/D3.js application provides fast and easy way to graphically extract patterns from candlestick (OHLC) data.
-
bullish (1) / bearish (-1) / neutral (0) patterns can be easily marked in a dynamic candlestick plot
-
Marked patterns are saved to provided
JSONfile with format:{ "startDt": "2019-09-09T10:16:00.000Z", "stopDt": "2019-09-09T10:36:00.000Z", "dir": "-1" }where
startDtandstopDtdefine pattern timespan (both limits are inclusive).
Sample interfaces from file, influxdb are currently implemented.
Actual loading methods can be found in dataLoad.py.
Check the implementation details to grap the whole concept.
Or implement your own interface
- Actual methods for data loading are implemented in ./dataLoad.py
These methods should follow the required structure.
Required parameters:
dtLimit:%Y-%m-%dT%H:%M:%SZdatetime string that delimits given data intervaldirection:('left', 'right')string defining direction from dtLimitnoCandles:intdefining number of candles to be loaded per requestothers:other user-defined parameters
Required return object:
pd.DataFramewith['Date', 'Open', 'High', 'Low', 'Close']columnsDatecolumn contains parsed datetimes- rows are sorted by ascending
Datecolumn - unknown candles starts with
Datefollowed bynp.nanvalues
- Loading methods must be referenced in ./data.py together with
othersparameters
python run.py
| Parameter | Comment |
|---|---|
| Loading method | File / InfluxDB / Your own interface |
| Datafile / Database | Path to file / Database name |
| Initial date and time | .. to use in data loading |
| Pattern file | (Non)empty JSON file to use for saving pattern positions |
| Fixed pattern length | If enabled, patterns contain only defined number of candles |
| Number of displayed candles | |
| Number of minutes between x ticks | |
| y-axis range | |
| y-axis step | |
| y-labels precision |
This project is licensed under the terms of the MIT license.
