Skip to content

Commit

Permalink
Added webhook option to alert example files
Browse files Browse the repository at this point in the history
Signed-off-by: timelyart <[email protected]>
  • Loading branch information
timelyart committed Jan 27, 2023
1 parent 149cec4 commit 12f78f0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 23 deletions.
20 changes: 11 additions & 9 deletions yaml/_alert.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This example creates alerts on TradingView in the same way as you would do normally by hand (just automated)
# Use a url + other settings per type of alert you want to set
# Use an url + other settings per type of alert you want to set
# Note that all values are case-sensitive
# Define one or more charts by providing the link(s) to your charts
charts:
Expand All @@ -20,7 +20,7 @@ charts:
# Optional. When set, the interval will be omitted from links in the alert. This is useful if you want to link to a multiple chart layout. Default is no.
# Please, note that Kairos will only process and set an alert on the first chart (top/left) in a multi chart layout.
show_multi_chart_layout: no
# List of charts (url's) to include in the alert (these will be picked up by the summary mail as well) instead of the default one
# List of charts (urls) to include in the alert (these will be picked up by the summary mail as well) instead of the default one.
include_screenshots_of_charts: ["https://www.tradingview.com/chart/<my_chart>"]
# Kairos tries to find conditions based upon the values you provide below.
# Set the conditions as you would do manually in order from left to right and from top to bottom
Expand All @@ -39,7 +39,7 @@ charts:
open-ended: no
# Show a popup in TradingView when this alert triggers
show_popup: no
# Sound optisns
# Sound options
sound:
# Play a sound?
play: no
Expand All @@ -56,16 +56,18 @@ charts:
email-to-sms: no
# Get a push notification in TradingView's app
notify-on-app: no
# Send to a webhook. Optional. Leave the value empty or remove the line if you don't want to define a webhook.
webhook: https://test
message:
prepend: no
# Use `\n` to add and an ENTER
# Use keywords to add dynamic information in your text.
# %TIMEFRAME, is self-explanatory
# %SYMBOL is <exchange>:<ticker symbol>
# %NAME is the name of the alert
# %CHART add a url to the chart (inc. timeframe and symbol)
# %CHART add an url to the chart (inc. timeframe and symbol)
# %GENERATED is the text that TradingView generates
# %SCREENSHOT add a url to a screenshot (only available when config option tradingview_screenshot is set to true)
# %SCREENSHOT add an url to a screenshot (only available when config option tradingview_screenshot is set to true)
# NOTE: TradingView's default link is incomplete. I recommend including %CHART at all times.
# NOTE: If you want to create summary mails and generate a watchlist don't change this.
text: "%NAME %TIMEFRAME: %SYMBOL\n%CHART\n%SCREENSHOT\n%GENERATED"
Expand Down Expand Up @@ -97,15 +99,15 @@ summary:
webhooks:
# Define one ore more webhooks
- url: ["https://hooks.zapier.com/hooks/catch/<my_id>/<my_hook>/"]
# Only export signals that contain one of the following of the keywords. If the list is empty, signals will always be send.
# Only export signals that contain one of the following of the keywords. If the list is empty, signals will always be sent.
search_criteria: ["Golden Cross"]
# Define how many signals should be send per batch
# Define how many signals should be sent per batch
batch: 25
# Enabled?
enabled: no
# Export data to Google Sheets
# To use this feature you'll need to have the following:
# - a google-api.json file to be able to login to your Google Drive and open spreadsheets
# - a google-api.json file to be able to log in to your Google Drive and open spreadsheets
# - the location of the google-api.json file set in kairos.cfg
# - set your API call limit in kairos.cfg
google_sheets:
Expand All @@ -115,7 +117,7 @@ summary:
sheet: "Diary"
# Index, i.e. the row number where the data should be inserted. Use 1 for the top row, or 2 if the top row contains your column titles.
index: 2
# Only export signals that contain one of the following of the keywords. If the list is empty, signals will always be send.
# Only export signals that contain one of the following of the keywords. If the list is empty, signals will always be sent.
search_criteria: ["Golden Cross"]
# Enabled?
enabled: no
Expand Down
20 changes: 19 additions & 1 deletion yaml/_alert_davo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ charts:
# Optional. When set, the interval will be omitted from links in the alert. This is useful if you want to link to a multiple chart layout. Default is no.
# Please, note that Kairos will only process and set an alert on the first chart (top/left) in a multi chart layout.
show_multi_chart_layout: no
# list of charts (urls) to include in the alert (these will be picked up by the summary mail as well) instead of the default one
# List of charts (urls) to include in the alert (these will be picked up by the summary mail as well) instead of the default one.
include_screenshots_of_charts: [https://www.tradingview.com/chart/<chart_id>/]
# Kairos tries to find conditions based upon the values you provide below.
# Set the conditions as you would do manually in order from left to right and from top to bottom
# It is sufficient to only set the first word for each condition.
conditions: ["Davo"]
# The options below correspond with the options on the Alert dialog, as are the available values for each option.
# How often is the alert allowed to triggers?
trigger: "Only Once"
expiration:
# Future date time (note TradingView uses local time to set expiration and Kairos will check the computer's time against TV expiration).
Expand All @@ -26,15 +31,27 @@ charts:
time: 5
# Note that open-ended is for premium users only and - when set - will ignore the value for 'time'
open-ended: no
# Show a popup in TradingView when this alert triggers
show_popup: no
# Sound options
sound:
# Play a sound?
play: no
# Define the ringtone
ringtone: Chirpy
# For how long should the sound play?
duration: Once
# Communication options
send:
# Send an email?
# Note that in order to create a watchlist or send a summary email this needs to be set to yes
email: yes
# Send a server side sms (for Premium users only)
email-to-sms: no
# Get a push notification in TradingView's app
notify-on-app: no
# Send to a webhook. Optional. Leave the value empty or remove the line if you don't want to define a webhook.
webhook: https://test
message:
prepend: no
# Use `\n` to add and an ENTER
Expand All @@ -48,6 +65,7 @@ charts:
# NOTE: TradingView's default link is incomplete. I recommend including %CHART at all times.
# NOTE: If you want to create summary mails and generate a watchlist don't change this.
text: "%NAME %TIMEFRAME: %SYMBOL\n%CHART\n%SCREENSHOT\n%GENERATED"
# The options provided here are only available if you have set up the [mail] section in your kairos.cfgs
summary:
# Create email
email:
Expand Down
25 changes: 12 additions & 13 deletions yaml/_alert_multiple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ charts:
wait_time_implicit: 30
# Optional. Defines how long the script should wait finding elements (seconds).
check_if_exists_timeout: 30
# Optional. Defines delays in seconds. If a particular delay isn't set, it will fall back to that particular delay in the config file
# Optional. Define delays in seconds. If a particular delay isn't set, it will fall back to that particular delay in the config file
# Options are: change_symbol, submit_alert, break, break_mini and clear_inactive_alerts
delays: {change_symbol: 1, submit_alert: 2.5}
# Alert listed under alerts must be available from the chart which is loaded through the 'url' parameter.
Expand All @@ -26,7 +26,7 @@ charts:
# Optional. When set, the interval will be omitted from links in the alert. This is useful if you want to link to a multiple chart layout. Default is no.
# Please, note that Kairos will only process and set an alert on the first chart (top/left) in a multi chart layout.
show_multi_chart_layout: no
# list of charts (url's) to include in the alert (these will be picked up by the summary mail as well)
# list of charts (urls) to include in the alert (these will be picked up by the summary mail as well)
# if you want to include additional screenshot then the option screenshot_timing must be set to 'summary' (without quotation marks) in your kairos.cfg (section [tradingview])
include_screenshots_of_charts: [https://www.tradingview.com/chart/<your_chart>/, https://www.tradingview.com/chart/<your_chart>/]
# Conditions need to be listed in order of TV's Create Alert dialog form, i.e. from left to right and from top to bottom.
Expand All @@ -40,34 +40,33 @@ charts:
time: 2
# Note that open-ended is for premium users only and - when set - will ignore the value for 'time'
open-ended: no
# Note: pop-ups may hinder Kairos to continue it's process faultless.
# Recommended to turn this off if the 'expiration' is likely to be smaller than the time Kairos needs on your machine to complete it's run.
# Recommended to turn this off if the 'expiration' is likely to be smaller than the time Kairos needs on your machine to complete its run.
show_popup: no
sound:
# Note: as with pop-ups, sounds may hinder Kairos to continue it's process faultless.
# Recommended to turn this off if the 'expiration' is likely to be smaller than the time Kairos needs on your machine to complete it's run.
# Recommended to turn this off if the 'expiration' is likely to be smaller than the time Kairos needs on your machine to complete its run.
play: yes
# For a full list of options please open the alert dialog manually.
ringtone: "Chirpy"
# Possible values for duration are "Once", "5 seconds", "10 seconds", "30 seconds", "Minute".
duration: "10 seconds"
send:
# Send an email?
# Note that in order to create a watchlist or send a summary email this needs to be set to yes.
email: yes
# Send a server side sms (for Premium users only)
email-to-sms: no
# SMS is only for premium members.
# If you set this to yes and don't have a premium subscription this will break the script as it will produce a pop-up denying the script from accessing the Create Alert dialog underneath.
sms: no
# You'll need to have the iOS app installed and enabled push notifications for it on your iOS device.
# Also, make sure to have manually set this checkbox first in TradingView and check the 'Do not show this message again' checkbox when it generates a popup (if there is no popup you are all good).
# Get a push notification in TradingView's app
notify-on-app: no
# Send to a webhook. Optional. Leave the value empty or remove the line if you don't want to define a webhook.
webhook: https://test
message:
# Use `\n` to add an ENTER
# Use keywords to add dynamic information in your text.
# %TIMEFRAME, is self-explanatory
# %SYMBOL is <exchange>:<ticker symbol>
# %NAME is the name of the alert
# %GENERATED is the text that TradingView generates
# %SCREENSHOT add a url to a screenshot (only available when config option tradingview_screenshot is set to true)
# %SCREENSHOT add an url to a screenshot (only available when config option tradingview_screenshot is set to true)
# Recommended value: "%NAME %TIMEFRAME: %SYMBOL\n%CHART\n%SCREENSHOT\n%GENERATED"
text: "%NAME %TIMEFRAME: %SYMBOL\n%CHART\n%SCREENSHOT\n%GENERATED\n lorem ipsum"
- name: "Example 2 %SYMBOL"
Expand Down Expand Up @@ -119,7 +118,7 @@ summary:
subject: 'TradingView Alert Summary'
# Use keyword %SUMMARY in your text and/or html to include the Kairos generated summary
text: 'my prepended text %SUMMARY my appended text'
# Note: you may include <html> and <body> tags but it is not necessary (Kairos will include them if they aren't found)
# Note: you may include <html> and <body> tags, but it is not necessary (Kairos will include them if they aren't found)
html: '<p>my prepended text</p>%SUMMARY<p>my appended text</p>'
# If you just want to send the signals to webhooks (see your config file) or import them as a watchlist, set this to no
send: yes
Expand Down

0 comments on commit 12f78f0

Please sign in to comment.