From 12f78f052dbec1c108f04a831edd4f2aef4c7940 Mon Sep 17 00:00:00 2001 From: timelyart Date: Fri, 27 Jan 2023 09:44:54 +0100 Subject: [PATCH] Added webhook option to alert example files Signed-off-by: timelyart --- yaml/_alert.yaml | 20 +++++++++++--------- yaml/_alert_davo.yaml | 20 +++++++++++++++++++- yaml/_alert_multiple.yaml | 25 ++++++++++++------------- 3 files changed, 42 insertions(+), 23 deletions(-) diff --git a/yaml/_alert.yaml b/yaml/_alert.yaml index f74d916..1651f4d 100644 --- a/yaml/_alert.yaml +++ b/yaml/_alert.yaml @@ -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: @@ -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/"] # 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 @@ -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 @@ -56,6 +56,8 @@ 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 @@ -63,9 +65,9 @@ charts: # %TIMEFRAME, is self-explanatory # %SYMBOL is : # %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" @@ -97,15 +99,15 @@ summary: webhooks: # Define one ore more webhooks - url: ["https://hooks.zapier.com/hooks/catch///"] - # 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: @@ -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 diff --git a/yaml/_alert_davo.yaml b/yaml/_alert_davo.yaml index dec0987..47fd60f 100644 --- a/yaml/_alert_davo.yaml +++ b/yaml/_alert_davo.yaml @@ -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//] + # 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). @@ -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 @@ -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: diff --git a/yaml/_alert_multiple.yaml b/yaml/_alert_multiple.yaml index ba30624..cac8416 100644 --- a/yaml/_alert_multiple.yaml +++ b/yaml/_alert_multiple.yaml @@ -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. @@ -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//, https://www.tradingview.com/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. @@ -40,26 +40,25 @@ 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. @@ -67,7 +66,7 @@ charts: # %SYMBOL is : # %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" @@ -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 and tags but it is not necessary (Kairos will include them if they aren't found) + # Note: you may include and tags, but it is not necessary (Kairos will include them if they aren't found) html: '

my prepended text

%SUMMARY

my appended text

' # 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