Releases: timelyart/Kairos
Major release
This is a major release and adds the following features:
- Signals: signals uses indicator values to determine if a setup has fired (instead of alerts).
- Strategies: allows you to automate back testing on TradingView.
- Import triggered symbols into a watchlist on TradingView
- Generate/update watchlists from TradingView's screener page.
- Export data to Google Sheets.
- Export data to web hooks.
Additionally, advanced users can optimize the python code using Cython to compile to C.
Please, see README for full instructions on installing and configuring Kairos.
Patch: pause on create alert dialog
- Fixed: pause on create alert dialog and empty error message
Patch: "Continue anyway" dialog bug
- Fixed: xpath changed for the "Continue anyway" dialog when setting alerts
Patch: clear inactive alerts
- Fix: issue with clear_inactive_alerts whereby alerts weren't cleared at all
Patch: urllib3 version conflict
- fix for urllib3 version conflict
Patch: TV removed the option of sending SMS directly
- TV removed the option of sending SMS directly
Patch: Sending alerts
- Fixed a bug when sending alerts to Google Sheets
- Added wait time after clearing inactive alerts. This solved a potential error
- Added links on how to obtain Gmail password when 2fa is enabled
Patch: fixed a few bugs and updated documentation
- Fixed the clear_on_start_up option
- Fixed crash when log directory doesn't exist
- Fixed a bug when sending alerts to Google Sheets
- Updated documentation
Spring update
Please read the release notes carefully. In particular the paragraphs Performance improvements and Moved example YAML files as they contain settings that you might want to change. Additionally, the Load YAML in YAML paragraph shows how you can organize your YAML files in a different way.
Performance improvements
Kairos no longer relies on Selenium's implicit wait times. In order to see the performance gains you'll need to adjust the values for wait_time_implicit
and check_if_exists_timeout
under [webdriver]
in kairos.cfg. For example:
[webdriver]
...
; Defines how long chromedriver should wait for finding elements (seconds).
; 30 seconds should be ample and - unless you have serious issues running the script - you should not change this.
; Kairos is no longer dependant on implicit wait times. This should be zero or a single digit
wait_time_implicit = 0
; Defines how long the script should wait finding elements (seconds).
; 10 seconds should be enough. If you get a lot of retries, try to up this number.
check_if_exists_timeout = 10
Moved example YAML files
The example YAML files have been moved from /tv to /yaml
NOTE: you can set the directory for the YAML files in your kairos.cfg under [tradingview]
-> settings_dir
. For example:
[tradingview]
...
; Directory where your yaml files reside. Can be either a relative path to Kairos, or an absolute path.
settings_dir = yaml
...
Auto-accept TradingView warning when creating an alert
TradingView may, or may not show a popup when creating an alert. It warns you about unintended consequences. It's annoying to say the least. If your setup generates one, it will close the popup automatically. If your setup doesn't generate a warning you'll notice that your first alert will take up to 40 seconds (Kairos is searching for the popup). If after that time no popup is found, Kairos will stop searching for every other alert you are creating with that setup.
Webhook headers
You can now set headers as part of the webhook configuration in your YAML file.
For example:
headers: {Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6ImU.BjYgTigAEYUlL_N0mQhuljs8KKu303fAhSfGMRXabJo}
Headers by request
You can now set the value of headers with the response to a request. That request can be defined with set_headers_by_request
construct which would be part of the webhook configuration in your YAML file.
# list of headers that should be set with a separate request, each separate request can set multiple headers if you so desire
set_headers_by_request:
# define the request to get the value
# - url define the end point
# - type should be POST
# - headers define the headers of the request
# - body define the body of the request
# - response_values define the top level key per header that holds the value in the response JSON).
# if you leave it empty Kairos will assume that it is the whole of the response text
- request: {url: "https://api.example.com/authentication", type: POST, headers: {Accept: "application/json", Content-Type: "application/json"}, body: {uid: "[email protected]", pwd: "some_password"}, response_values: {Authorization: "my_token"}}
Load YAML in YAML
Any part of a YAML file can be it's own YAML file. Thereby providing a way to share parts between multiple YAML files. Simply put the keyword file with a path to the yaml to load, e.g. file: my_snippets/snippet.yaml
.
WARNING: it's a recursive function! If you load from a YAML file the same YAML file (or from further down the path) this will result in an infinite loop.
Kairos will load all YAML files it finds and make it into a temporary file called <yaml_file>.tmp
. If for some reason the resulting YAML file contains error Kairos will make a temporary file called <yaml_file>.err
. Use this file to find errors.
For example:
tv/root.yaml
root:
- branch:
- branch: ["leaf", "leaf", "leaf"]
- file: "branch_in_branch.yaml"
- branch: ["leaf", "leaf", "leaf"]
- file: "branch_in_branch.yaml"
yaml/branch_in_branch.yaml
branch:
- file: "branch.yaml"
- file: "branch.yaml"
- branch: ["leaf", "leaf", "leaf", "leaf"]
- file: "branch.yaml"
yaml/branch.yaml
branch: ["leaf", "leaf", "leaf"]
From these 3 files, Kairos will generate the following:
root:
- branch:
- branch: [leaf, leaf, leaf]
- branch:
- branch: [leaf, leaf, leaf]
- branch: [leaf, leaf, leaf]
- branch: [leaf, leaf, leaf, leaf]
- branch: [leaf, leaf, leaf]
- branch: [leaf, leaf, leaf]
- branch:
- branch: [leaf, leaf, leaf]
- branch: [leaf, leaf, leaf]
- branch: [leaf, leaf, leaf, leaf]
- branch: [leaf, leaf, leaf]
Infinite loop
If you would change yaml/branch.yaml to the following:
branch:
- branch: ["leaf", "leaf", "leaf"]
- file: "branch_in_branch.yaml"
... and leave the other files in the aforementioned example unmodified, then this will create an infinite loop.
Logs
Kairos will write the log file of it's run where your YAML file resides. If you run Kairos with my_setup.yaml
it will create a my_setup.log
log file.
From this release onward Kairos will also write the browser logs. Browsers can have multiple logs (Chrome has 5) but logs are only written if their is actually something in them. Under normal conditions this leads to /log/browser.log
being created / updated.
Removed windows-only dependency on PyAutoGui
Kairos no longer needs to rely on PyAutoGui to import watchlists. Since it was a windows-only solution, this means that importing watchlists now also will work for linux.
Ubuntu 18.04 tested
This release was tested on 18.04
Patch: inconsistent error on login
- Fixed: inconsistent error on login "Message: unknown error: Element [...] is not clickable at point (1085, 97). Other element would receive the click: [...]