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
JSON
file with format:{ "startDt": "2019-09-09T10:16:00.000Z", "stopDt": "2019-09-09T10:36:00.000Z", "dir": "-1" }
where
startDt
andstopDt
define 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:%SZ
datetime string that delimits given data intervaldirection:
('left', 'right')
string defining direction from dtLimitnoCandles:
int
defining number of candles to be loaded per requestothers:
other user-defined parameters
Required return object:
pd.DataFrame
with['Date', 'Open', 'High', 'Low', 'Close']
columnsDate
column contains parsed datetimes- rows are sorted by ascending
Date
column - unknown candles starts with
Date
followed bynp.nan
values
- Loading methods must be referenced in ./data.py together with
others
parameters
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.