alleyway / add-tradingview-alerts-tool Goto Github PK
View Code? Open in Web Editor NEWAutomated entry of TradingView alerts for bot trading tools such as 3Commas, Alertatron, CryptoHopper, etc.
License: MIT License
Automated entry of TradingView alerts for bot trading tools such as 3Commas, Alertatron, CryptoHopper, etc.
License: MIT License
Hey, I saw below error when trying to run the script:
~/add-tradingview-alerts-tool ❯❯❯ npm run add-alerts
> @alleyway/[email protected] add-alerts
> npx tsc && node -r source-map-support/register lib/add-tradingview-alerts.js
Using config file: config.yml
Press Ctrl-C to stop this script
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
at Object.open (node:fs:473:10)
at ReadStream._construct (node:internal/fs/streams:64:17)
at constructNT (node:internal/streams/destroy:288:25)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
I was able to login to tradingview and the chart was loaded. Before it was able to add any alert, I got this error.
My config is as following:
files:
input: software.csv
tradingview:
# The chart which has the indicator you'd like to use
chartUrl: https://www.tradingview.com/chart/xxxxx/
# (optional) set the chart interval before adding pairs, otherwise interval of last saved chart is used
# examples: 1s | 30s | 1m | 15m | 1h | 1D | 1M
interval: 30min
alert:
option: Once Per Bar Close
actions:
notifyOnApp: false
showPopup: false
sendEmail: false
webhook:
enabled: true
url: "https://xxxxx"
# alert name is optional - can override in csv if you add a "name" column. can use {{symbol|base|quote}}
# name: "MI dev3 for {{base}} {{quote}}"
# indentation matters! {{quote}} and {{base}} are swapped out for quote asset(eg. USDT) and the base (eg. BTC)
# message: >
# {
# "message_type": "bot",
# "bot_id": 999999,
# "email_token": "fffffff-fffff-fffff-ffff-ffffffffff",
# "delay_seconds": 0,
# "pair": "{{quote}}_{{base}}"
# }
Is it because I commented out some optional fields? Thanks!!
i get an error when running npx atat add-alerts
terminal says:
ERROR All collection items must start at the same column 01:09:44
at Collection.parse (node_modules/yaml/dist/parse-cst.js:331:24)
at node_modules/yaml/dist/parse-cst.js:1605:29
at CollectionItem.parse (node_modules/yaml/dist/parse-cst.js:92:19)
at node_modules/yaml/dist/parse-cst.js:1586:25
at Collection.parse (node_modules/yaml/dist/parse-cst.js:350:20)
at node_modules/yaml/dist/parse-cst.js:1605:29
at Document.parseContents (node_modules/yaml/dist/parse-cst.js:622:26)
at Document.parse (node_modules/yaml/dist/parse-cst.js:685:19)
at Object.parse (node_modules/yaml/dist/parse-cst.js:1729:18)
at parseDocument (node_modules/yaml/dist/index.js:43:24)
Please let me know the solution. If i can get this to work, it will be incredible.
Thanks!
Hello,
I have this error when I want to have the .csv file... Could you help me please ?
`$ npm run fetch:binance usdt
@alleyway/[email protected] fetch:binance C:\Users\Neetoo\Desktop\Trading\add-tradingview-alerts-tool-master\test\add-tradingview-alerts-tool
npx tsc && npx cross-env EXCHANGE=BINANCE node --es-module-specifier-resolution=node -r source-map-support/register dist/fetch-pairs.js "usdt"
node: --es-module-specifier-resolution requires --experimental-modules be enabled
npm ERR! code ELIFECYCLE
npm ERR! errno 9
npm ERR! @alleyway/[email protected] fetch:binance: npx tsc && npx cross-env EXCHANGE=BINANCE node --es-module-specifier-resolution=node -r source-map-support/register dist/fetch-pairs.js "usdt"
npm ERR! Exit status 9
npm ERR!
npm ERR! Failed at the @alleyway/[email protected] fetch:binance script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Neetoo\AppData\Roaming\npm-cache_logs\2021-04-10T15_52_26_678Z-debug.log
`
Great tool buddy! One issue with fetching the pairs:
In config is set:
input: ftx_perp_pairs.csv
Error:
> @alleyway/[email protected] fetch:ftx
> npx tsc && npx cross-env EXCHANGE=FTX node -r source-map-support/register dist/fetch-pairs.js "perp"
(node:7361) ExperimentalWarning: The ESM module loader is experimental.
TypeError: csv.format is not a function
at file:///Users/sam/dev/add-tradingview-alerts-tool/src/fetch-pairs.ts:27:27
at Generator.next (<anonymous>)
at fulfilled (file:///Users/sam/dev/add-tradingview-alerts-tool/dist/fetch-pairs.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Within my TradingView strategy, I have the following
if (longCondition[1] and barstate.isconfirmed)
strategy.entry("ENTER LONG (BUY)", strategy.long, alert_message = long_entry_message)
long_entry_message is an input variable where I enter the deal entry message for the platform I trade with, 3Commas in this case but could be used with others.
Same scenario for strategy.exit. Then on the actual alerts message box I simply enter {{strategy.order.alert_message}}
This allows me to have one alert that can do both (enter and exit trades) depending on which signal is triggered.
Works great as it saves me alerts from my package limit. However I have to update Pair information manually for each alert. Using your tool, it saves me some time but I still have to manually change the Pair information one by one afterwards since my message is built into the strategy
That being said, is there anything you can think of I could do? Is it possible to create an If statement within your JSON message that would fire a message to enter a deal or another one to close at market depending on whether strategy.entry or strategy.exit is TRUE? If so that would be great because I could take advantage of your magic "{{quote}}_{{base}}" to swap Pairs information automatically.
I know this is more of an issue for me rather than an issue of the tool itself but I would be surprise if I am the only one who uses 1 alert to do both enter and exit trades.
Hello
I'm using this tool since V 1.0.0 and works fine, but when I update to last version the routine stucks when have to choose options
Only once
Only once per bar close, etc....
and give this error.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @alleyway/[email protected] add-alerts: npx tsc && npx cross-env node -r source-map-support/register dist/add-alerts.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @alleyway/[email protected] add-alerts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Any help?
Thanks in advance.
Hey this tool is amazing!!! I have been doing this manually with over 200 alerts for a long time!
Not sure how troublesome this might be for you but adding the exchanges Bittrex and Coinbase would be awesome but no rush!
Alternatively I wonder if there could be a possibility to add the option for the trader to fill up a .csv file with symbols and exchange/broker information and allow the tool to simply add the alerts based on such file without the need to connect/download symbols from a particular broker/exchange. This would allow those interested in Forex and/or Stocks to take advantage of the tool as well
Will be donating some ETH at the end of the week _/_
Hello - I am creating an alert that uses Primary Left and Primary Right.
The issue is the Primary Right does not show up until the Secondary option is changed to Crossing Down.
Is there a way to change the order of operation to change the secondary option to Crossing Down before entering the Primary Options?
Wondering if the same tool can be used with strategy alerts instead of indicator alerts?
By the way this is a wonderful application and contribution of your part!!!🙏
Any idea what could be wrong
SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @alleyway/[email protected] fetch:binance: `npx tsc && npx cross-env EXCHANGE=BINANCE node -r source-map-support/register dist/fetch-pairs.js "usdt"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @alleyway/[email protected] fetch:binance script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Hello,
Thank you for creating and sharing this tool.
I am having trouble to sign in reliably before running the script.
I don't know if it is expected behavior but, in my case, when I run the script, two Chromium windows appear.
One with a full navigation bar and the other with no navigation bar.
Signing into one, also signs you in the other.
After signing in for the first time, I close Chromium, terminate the script (Ctrl+C) and re-run it. Most of the times, I am asked to sign in again. A few times, I am signed in and, therefore, I am able to run the script.
I have tried different combinations but I can't find the pattern that works reliably:
Sometimes it works, but I don't know what exactly made it work.
An added nuisance is that, after the script is completed successfully, both browsers are closed and, therefore, a new sign in is required for a new run. Would it be possible to not terminate the Tradingview session after completing the script?
I understand that the general idea is to leave the tool working and come back in a while. However, right now, at this stage when I am playing with the tool for the first time, I am just modifying config.yml to understand the possibilities and test different alerts. My scripts only create 1 or two alerts at a time. It is cumbersome to have to sign in again and again, specially during the initial testing phase, specially with the sign in issue.
Finally, there is a 4-5 seconds delay between each step in the alert creation process. Is there a parameter that can be modified to reduce the delay between steps so alerts are created faster? (I am using a Mac Mini M1 8GB).
Thank you for your help.
Hello, it seems that fetch:binance:btc does not work as it runs tsc && env QUOTE_ASSET=BTC node lib/fetch-binance-pairs.js > binance_btc_pairs.csv instead of tsc && cross-env as in fetch usdt pairs
"env" is not recognized as an internal program
2020-11-13T19_01_37_316Z-debug.log
.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @alleyway/[email protected] fetch:binance:btc: tsc && env QUOTE_ASSET=BTC node lib/fetch-binance-pairs.js > binance_btc_pairs.csv
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @alleyway/[email protected] fetch:binance:btc script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I'm not a programmer myself so please forgive me if I'm doing something wrong. I was trying to run the script manually but was not really successful
Hello, thanks for your great work
I want to ask if there is any script that I can automatically delete alerts besides adding them.
Hi there, clicked the link to install the extension and it shows a 404 page. Is there an alternative? thanks
It would be great if we could run it in headless mode.
ERROR Failed to launch the browser process! 10:38:19
[28712:28712:0323/103819.554005:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Hi there! First, thanks a lot for maintaining this project. It's really an underserved feature.
Just to let you know that, at least for me, the XPath Generator download link is not working, and the tool is not running without it. I have tried some alternatives, to no avail, or.....
The problem may be different: I am using the tool to add strategy alerts. With this option a bunch of options disappear (once per bar, and some other tertiary fields) I am eliminating those from the config file, since the tool won't find any. Am I doing something wrong? Apart from being unable to install the XPath Generator, I am following the instructions (bear with me, I am a nurse with zero coding experience whatsoever).
Thanks a lot for your guidance! I really appreciate it.
Diego
Just curious if the tool can be used to add alerts in bulk to Forex and Stocks?
I kept getting input errors when trying to use the tertiary right number input with a Greater than secondary input. Changing the xpath selector for that input seemed to do the trick. Not sure if this will break a bunch of stuff, so I will skip the PR.
ERROR EXAMPLE
TimeoutError: waiting for XPath `//div[@class='tv-control-number-input tv-control-number-input--size_small js-number-input__wrap js-period-input-wrap']/input[@class='tv-alert-dialog__number-input tv-control-input tv-control-input--size_small js-number-input' and 1]` failed: timeout 1000ms exceeded
at new WaitTask (/Users/lucasn/localdev/add-tradingview-alerts-tool/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:505:34)
at DOMWorld.waitForXPath (/Users/lucasn/localdev/add-tradingview-alerts-tool/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:441:26)
at Frame.waitForXPath (/Users/lucasn/localdev/add-tradingview-alerts-tool/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:866:51)
at Page.waitForXPath (/Users/lucasn/localdev/add-tradingview-alerts-tool/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1288:33)
at /Users/lucasn/localdev/add-tradingview-alerts-tool/src/add-tradingview-alerts.ts:33:16
at step (/Users/lucasn/localdev/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:33:23)
at Object.next (/Users/lucasn/localdev/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:14:53)
at /Users/lucasn/localdev/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:8:71
at new Promise (<anonymous>)
at __awaiter (/Users/lucasn/localdev/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:4:12)
FIX
const inputXpathQueries = {
tertiaryLeft: "//div[@class='tv-control-number-input tv-control-number-input--size_small js-number-input__wrap js-move-value-input-wrap']/input[@class='tv-alert-dialog__number-input tv-control-input tv-control-input--size_small js-number-input' and 1]",
tertiaryRight: "//*[@id=\"overlap-manager-root\"]/div/div/div[2]/div[1]/div/div/p/form/fieldset/div[3]/span/div[2]/div"
}
Cheers!
On one of my indicators to obtain the correct alert i need to select the Pair in the condition section, not the indicator name. The indicator is selected in the tertiary & quaternary sections.
A couple of questions:
Can i select the pair in condition section even though it changes dynamically with each alert created (as per the CSV pair list file) when the tool is run? Is it even possible or can the config.yml file be setup to just select the drop down position in condition not the pair name which in my case would be 1? Unfortunately the default sets to indicator name
.
Can i edit the config.yml file to have a quaternary left / right ? As you can see in the screenshot i wish to alert entering a channel which needs Upper and Lower bounds
Condition: Pair (current - position 1)
Secondary: Entering Channel
Tertiary: Left = Indicator Right = Indicator
Quaternary: Left = Indicator Right = Indicator
Thanks for your help and btw awesome job.
Is there a quick fix I can do to get the coins listed at Binance.US as supposed to Binance.com?
hi again, i tried on both versions 14.16.1 and 16.1.0 of node.js and get errors fetching pairs (tried all pairs including binancefutures usdt).
See below error for 14.16.1
npx atat fetch-pairs binance usdt
npx: installed 1 in 8.925s
command not found: atat
The rest of the installation went smoothly. Any ideas on what is going wrong? thanks for the help.
Love the script, thanks so much.
I am using it with Market Cipher.
The issue is that the condition is selected correctly but the secondary which is the actual indicator selects the first item in the drop down which is blue wave cross up (green dot) rather than the third option which is just Green Dot and the one I need.
How can i adjust so the drop down select the third option?
Hi,
Your tool is working great. Thank you so much!
I'm running it in a Ubuntu VM which is fairly slow. When I have multiple tickers in my input CSV, I sometimes get the same ticker twice as the webpage was too slow to load the ticker. I gave the VM as many resources as possible, which reduces the error count significantly. However, I still have a few ticker doubles.
Procedure:
Is it possible to create (or increase if already existent) a timeout after a ticker was chosen?
I know the pairs are really close but having it be one to one would be really nice
Hello, I am having an issue when I make changes to the message part in the config.yml.
Can I add custom text ? When I try to use my own message format, and I run the tool, it gives this error and quits ....
I would like to add my own message in a format like this :
message: >
{
"key": "H1aJKI67711",
"msg": "Long signal at {{close}}
",
"pair": "{{quote}}_{{base}}"
}
when I add this and I run the tool I get this output :
Using config file: config.yml
Press Ctrl-C to stop this script
<ref *1> YAMLSyntaxError: All collection items must start at the same column
at Collection.parse (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/parse-cst.js:331:24)
at /home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/parse-cst.js:1605:29
at Document.parseContents (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/parse-cst.js:622:26)
at Document.parse (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/parse-cst.js:685:19)
at Object.parse (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/parse-cst.js:1723:18)
at parseDocument (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/index.js:43:24)
at Object.parse (/home/user/add-tradingview-alerts-tool/node_modules/yaml/dist/index.js:55:15)
at /home/user/add-tradingview-alerts-tool/src/add-tradingview-alerts.ts:207:25
at step (/home/user/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:33:23)
at Object.next (/home/user/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:14:53) {
source: Collection {
error: [Circular *1],
range: Range { start: 0, end: 894 },
valueRange: Range { start: 0, end: 893 },
props: [],
type: 'MAP',
value: null,
items: [
[PlainValue],
[CollectionItem],
[PlainValue],
[CollectionItem],
[PlainValue],
[CollectionItem],
[PlainValue],
[CollectionItem],
[PlainValue],
[CollectionItem],
[PlainValue]
],
resolved: YAMLMap {
items: [Array],
schema: undefined,
range: [Array],
type: 'MAP'
}
}
}
Its working for a while then i receive error ERROR Cannot read property 'toLowerCase' of undefined
Last part of log file
ℹ Adding symbol: BINANCE:IOSTUSDT ( IOST priced in USDT )
› ...waiting 1800ms = 2 x 900 let things settle from processing last alert
› ...selector: //div[@id="header-toolbar-symbol-search"]
› ...waiting 900ms = 1 x 900
› ...selector: //input[@data-role='search']
› ...waiting 1800ms = 2 x 900 after navigating to ticker
› addAlert()...pressing shortcut key
› ...waiting 900ms = 1 x 900 after clicking shortcut for new alert dialog
› Processing primaryLeft: My Algo v12
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of primaryLeft
› ...selector: //div[contains(@class, 'tv-alert-dialog__group-item--left ')]/span[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small']/span[@class='tv-control-select__control tv-dropdown-behavior__button']
› Found dropdown! Clicking element of primaryLeft
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for My Algo v12
› Found! Clicking My Algo v12 (80, 1.4, 200, 10, 5, Open/Close, 200, Dotted, 1)
› Processing primaryRight: null
› ...waiting 630ms = 0.7 x 900
› Processing secondary: Smart Buy
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of secondary
› ...selector: //*[@class='tv-control-fieldset__value tv-alert-dialog__fieldset-value js-condition-operator-input-wrap']/*[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small' and 1]/span[@class='tv-control-select__control tv-dropdown-behavior__button' and 1]
› Found dropdown! Clicking element of secondary
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for Smart Buy
› Found! Clicking Smart Buy Alert
› Processing tertiaryLeft: null
› ...waiting 630ms = 0.7 x 900
› Processing tertiaryRight: null
› ...waiting 630ms = 0.7 x 900
› ...waiting 450ms = 0.5 x 900
› Selecting option: Once Per Bar Close
› ...selector: //*[text()='Once Per Bar Close']
› ...waiting 270ms = 0.3 x 900
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-push']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='show-popup']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-email']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-toggle']
› ...waiting 270ms = 0.3 x 900
› typing webhook url: https://XXX.net
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-url']
› Setting Alert Name: AA5m
› ...selector: //input[@name='alert-name']
› ...waiting 450ms = 0.5 x 900
› Setting message: {"secret":"XXX","market":"{{ticker}}","type":"buy","tf":"{{interval}}","price":"{{close}}"}
› ...selector: //textarea[@class='tv-control-textarea']
› ...waiting 450ms = 0.5 x 900
› clickSubmit()
› ...selector: //div[contains(@class, 'tv-dialog')]/*/div[@data-name='submit']
› ...waiting 1800ms = 2 x 900
› clickContinueIfWarning()
› ...selector: //div[@data-name='warning-modal']/*//button[@name='ok-button']
› ...waiting 2700ms = 3 x 900 waiting after clicking 'continue anyway' button
ℹ Adding symbol: BINANCE:ZENUSDT ( ZEN priced in USDT )
› ...waiting 1800ms = 2 x 900 let things settle from processing last alert
› ...selector: //div[@id="header-toolbar-symbol-search"]
› ...waiting 900ms = 1 x 900
› ...selector: //input[@data-role='search']
› ...waiting 1800ms = 2 x 900 after navigating to ticker
› addAlert()...pressing shortcut key
› ...waiting 900ms = 1 x 900 after clicking shortcut for new alert dialog
› Processing primaryLeft: My Algo v12
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of primaryLeft
› ...selector: //div[contains(@class, 'tv-alert-dialog__group-item--left ')]/span[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small']/span[@class='tv-control-select__control tv-dropdown-behavior__button']
› Found dropdown! Clicking element of primaryLeft
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for My Algo v12
› Found! Clicking My Algo v12 (80, 1.4, 200, 10, 5, Open/Close, 200, Dotted, 1)
› Processing primaryRight: null
› ...waiting 630ms = 0.7 x 900
› Processing secondary: Smart Buy
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of secondary
› ...selector: //*[@class='tv-control-fieldset__value tv-alert-dialog__fieldset-value js-condition-operator-input-wrap']/*[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small' and 1]/span[@class='tv-control-select__control tv-dropdown-behavior__button' and 1]
› Found dropdown! Clicking element of secondary
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for Smart Buy
› Found! Clicking Smart Buy Alert
› Processing tertiaryLeft: null
› ...waiting 630ms = 0.7 x 900
› Processing tertiaryRight: null
› ...waiting 630ms = 0.7 x 900
› ...waiting 450ms = 0.5 x 900
› Selecting option: Once Per Bar Close
› ...selector: //*[text()='Once Per Bar Close']
› ...waiting 270ms = 0.3 x 900
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-push']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='show-popup']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-email']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-toggle']
› ...waiting 270ms = 0.3 x 900
› typing webhook url: https://XXX.net
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-url']
› Setting Alert Name: AA5m
› ...selector: //input[@name='alert-name']
› ...waiting 450ms = 0.5 x 900
› Setting message: {"secret":"XXX","market":"{{ticker}}","type":"buy","tf":"{{interval}}","price":"{{close}}"}
› ...selector: //textarea[@class='tv-control-textarea']
› ...waiting 450ms = 0.5 x 900
› clickSubmit()
› ...selector: //div[contains(@class, 'tv-dialog')]/*/div[@data-name='submit']
› ...waiting 1800ms = 2 x 900
› clickContinueIfWarning()
› ...selector: //div[@data-name='warning-modal']/*//button[@name='ok-button']
› ...waiting 2700ms = 3 x 900 waiting after clicking 'continue anyway' button
ℹ Adding symbol: BINANCE:BNTUSDT ( BNT priced in USDT )
› ...waiting 1800ms = 2 x 900 let things settle from processing last alert
› ...selector: //div[@id="header-toolbar-symbol-search"]
› ...waiting 900ms = 1 x 900
› ...selector: //input[@data-role='search']
› ...waiting 1800ms = 2 x 900 after navigating to ticker
› addAlert()...pressing shortcut key
› ...waiting 900ms = 1 x 900 after clicking shortcut for new alert dialog
› Processing primaryLeft: My Algo v12
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of primaryLeft
› ...selector: //div[contains(@class, 'tv-alert-dialog__group-item--left ')]/span[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small']/span[@class='tv-control-select__control tv-dropdown-behavior__button']
› Found dropdown! Clicking element of primaryLeft
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for My Algo v12
› Found! Clicking My Algo v12 (80, 1.4, 200, 10, 5, Open/Close, 200, Dotted, 1)
› Processing primaryRight: null
› ...waiting 630ms = 0.7 x 900
› Processing secondary: Smart Buy
› ...waiting 630ms = 0.7 x 900
› Searching potential dropdown xpath of secondary
› ...selector: //*[@class='tv-control-fieldset__value tv-alert-dialog__fieldset-value js-condition-operator-input-wrap']/*[@class='tv-control-select__wrap tv-dropdown-behavior tv-control-select--size_small' and 1]/span[@class='tv-control-select__control tv-dropdown-behavior__button' and 1]
› Found dropdown! Clicking element of secondary
› ...waiting 450ms = 0.5 x 900 let dropdown populate
› searching menu for Smart Buy
› Found! Clicking Smart Buy Alert
› Processing tertiaryLeft: null
› ...waiting 630ms = 0.7 x 900
› Processing tertiaryRight: null
› ...waiting 630ms = 0.7 x 900
› ...waiting 450ms = 0.5 x 900
› Selecting option: Once Per Bar Close
› ...selector: //*[text()='Once Per Bar Close']
› ...waiting 270ms = 0.3 x 900
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-push']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='show-popup']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='send-email']
› ...waiting 270ms = 0.3 x 900
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-toggle']
› ...waiting 270ms = 0.3 x 900
› typing webhook url: https://XXX.net
› ...selector: //div[contains(@class, 'tv-dialog')]//input[@name='webhook-url']
› Setting Alert Name: AA5m
› ...selector: //input[@name='alert-name']
› ...waiting 450ms = 0.5 x 900
› Setting message: {"secret":"XXX","market":"{{ticker}}","type":"buy","tf":"{{interval}}","price":"{{close}}"}
› ...selector: //textarea[@class='tv-control-textarea']
› ...waiting 450ms = 0.5 x 900
› clickSubmit()
› ...selector: //div[contains(@class, 'tv-dialog')]/*/div[@data-name='submit']
› ...waiting 1800ms = 2 x 900
› clickContinueIfWarning()
› ...selector: //div[@data-name='warning-modal']/*//button[@name='ok-button']
› ...waiting 2700ms = 3 x 900 waiting after clicking 'continue anyway' button
ERROR Cannot read property 'toLowerCase' of undefined
at isBlacklisted (src/add-alerts.ts:102:24)
at src/add-alerts.ts:118:13
at Generator.next (<anonymous>)
at fulfilled (dist/add-alerts.js:4:58)
Hello
I tray to use today after the Tradingview update
And stucks after opens the Chromium browser and gives this error.
TimeoutError: waiting for XPath //*[@id="header-toolbar-symbol-search"]/div/input
failed: timeout 30000ms exceeded
at new WaitTask (C:\Users\tresmastres\add-tradingview-alerts-tool\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:411:34)
at DOMWorld.waitForXPath (C:\Users\tresmastres\add-tradingview-alerts-tool\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:336:26)
at Frame.waitForXPath (C:\Users\tresmastres\add-tradingview-alerts-tool\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:866:51)
at Page.waitForXPath (C:\Users\tresmastres\add-tradingview-alerts-tool\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1325:33)
at C:\Users\tresmastres\add-tradingview-alerts-tool\src\add-tradingview-alerts.ts:31:16
at step (C:\Users\tresmastres\add-tradingview-alerts-tool\lib\add-tradingview-alerts.js:33:23)
at Object.next (C:\Users\tresmastres\add-tradingview-alerts-tool\lib\add-tradingview-alerts.js:14:53)
at C:\Users\tresmastres\add-tradingview-alerts-tool\lib\add-tradingview-alerts.js:8:71
at new Promise ()
at __awaiter (C:\Users\tresmastres\add-tradingview-alerts-tool\lib\add-tradingview-alerts.js:4:12)
I've noticed that when I attempt to create an alert using a strategy rather than it doesn't want to work, I've attempted to look into the code, I'll be honest I would have no idea what to change, I figure I just need to disable Secondary and tertiary elements for it to work, as the strategy already establishes under what criteria it would need to send an alert, please could someone assist me, I'll make it worth your while! I promise!
Hi. Backtest a strategy with several combination of parameters is a pain in TV. It'd be great to have a way to set a combination of parameters and get metrics for each run. Is it something you're planning to add?
Hi,
I love your current script. I am not always programming but it was so easy to use and I was wondering if it would be possible to add the functionality to take screenshots (Alt+S) and then copy the code similar to what they try to do here:
Thank you very much!
Jan, [Mar 13, 2021 at 2:52:11 PM]:
hi, you are the guy from the Tradingview Alerts Tool, right? great work! i use it since a few days. Is it possible to get the .csv for the FTX Pairs
here is the API https://ftx.com/api/markets
i am not so good in programming, but i guess i only have to change some things in the "fetch-binance-pairs.ts" file
is that true? if yes i will give it a try and when it works i can send you
I could use the tool before. However I can't manage to upgrade to new version.
And I also get crashing browser on the version that used to work for me
Error: Command failed: cd /Users/.../AUTO Alerts creation/tradingview-alerts-home && npm install
at checkExecSyncError (node:child_process:690:11)
at execSync (node:child_process:727:15)
at initializeMain (file:///Users/.../.npm/_npx/5455a11893b177f3/node_modules/@alleyway/create-tradingview-alerts-home/dist/index.js:76:9) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 7570,
stdout: null,
stderr: null
}
@mlake
Tried in powershell and Ubuntu, same error both times.
1st pair does get correctly generated however.
PS C:\Scratch\alert\add-tradingview-alerts-tool - backup> npm run add-alerts
@alleyway/[email protected] add-alerts
tsc && node lib/add-tradingview-alerts.js
Using config file: config.yml
Adding symbol: BINANCE:BTCUSDT ( BTC priced in USDT )
TimeoutError: waiting for XPath //*[text()='Continue anyway']
failed: timeout 30000ms exceeded
at new WaitTask (C:\Scratch\alert\add-tradingview-alerts-tool - backup\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:411:34)
at DOMWorld.waitForXPath (C:\Scratch\alert\add-tradingview-alerts-tool - backup\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:336:26)
at Frame.waitForXPath (C:\Scratch\alert\add-tradingview-alerts-tool - backup\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:866:51)
at Page.waitForXPath (C:\Scratch\alert\add-tradingview-alerts-tool - backup\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1325:33)
at C:\Scratch\alert\add-tradingview-alerts-tool - backup\src\add-tradingview-alerts.ts:31:16
at step (C:\Scratch\alert\add-tradingview-alerts-tool - backup\lib\add-tradingview-alerts.js:33:23)
at Object.next (C:\Scratch\alert\add-tradingview-alerts-tool - backup\lib\add-tradingview-alerts.js:14:53)
at C:\Scratch\alert\add-tradingview-alerts-tool - backup\lib\add-tradingview-alerts.js:8:71
at new Promise ()
at __awaiter (C:\Scratch\alert\add-tradingview-alerts-tool - backup\lib\add-tradingview-alerts.js:4:12)
After successfully logging in, ATAT attempts to add the first alert and fails with the following error. This is on MacOS 10.15.7
$ npx cross-env node -r source-map-support/register dist/add-alerts.js
Current Log level: 3 (you can set env variable ATAT_LOG_LEVEL=5 for verbose logging) 14:59:28
Base delay: 1000 (you can set env variable BASE_DELAY=1000 to increase/decrease speed) 14:59:28
Using config file: config.yml 14:59:28
Press Ctrl-C to stop this script 14:59:28
Adding symbol: BINANCEUS:BTCUSD ( BTC priced in USD ) 14:59:55
ERROR waiting for XPath //div[@id="header-toolbar-symbol-search"] failed: timeout 20000ms exceeded 15:00:17
at new WaitTask (node_modules/puppeteer/src/common/DOMWorld.ts:776:28)
at DOMWorld.waitForXPath (node_modules/puppeteer/src/common/DOMWorld.ts:671:22)
at Frame.waitForXPath (node_modules/puppeteer/src/common/FrameManager.ts:1189:47)
at Page.waitForXPath (node_modules/puppeteer/src/common/Page.ts:1982:29)
at src/service/tv-page-actions.ts:14:20
at Generator.next (<anonymous>)
at dist/service/tv-page-actions.js:7:71
at new Promise (<anonymous>)
at __awaiter (dist/service/tv-page-actions.js:3:12)
at fetchFirstXPath (src/service/tv-page-actions.ts:11:82)
$ npm list
@alleyway/[email protected] /Users/tedwardd/git-work/add-tradingview-alerts-tool
├── @fast-csv/[email protected]
├── @fast-csv/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
When you run npm run fetch:binance usdt
, the resulting list includes BTCSTUSDT
.
However, the BTCSTUSDT spot market does not exist. BTCSTUSDTPERP futures market does.
I don't know if this is an issue on Binance side or in the way ATAT process the information returned by Binance.
(ATAT = Add Tradingview Alerts Tool).
Hi:
Thanks for your works, saving lots of time!
I helped two friends setting up this tool, but they encountered different problems:
The first one, it can't find the expected Chromium (even after npm i chromium)
The second one, it can't launch the browser process. Went to puppeteer's troubleshooting page but can't find much help. What can I do for them? Thanks!
it would be helpful to also select timeframe
Hi, first of all, thank you for developing this code!
I want to create alerts in bulk also for non crypto assets. So I exported the list of tickers from my trading view list in CSV, changed the input file in the config.yml to this new csv file, changed to my trading view chart URL also and the indicator parameters. I don't know if the error is related to me trying to use the script for these different tickers.
I have pasted the error below. Thanks!
Felipe@MacBook-Pro add-tradingview-alerts-tool % npm run add-alerts
@alleyway/[email protected] add-alerts /Users/Felipe/add-tradingview-alerts-tool
tsc && node lib/add-tradingview-alerts.js
Using config file: config.yml
Press Ctrl-C to stop this script
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received null
at Object.open (fs.js:443:10)
at _openReadFs (internal/fs/streams.js:142:15)
at new ReadStream (internal/fs/streams.js:119:5)
at Object.createReadStream (fs.js:2003:10)
at /Users/Felipe/add-tradingview-alerts-tool/src/add-tradingview-alerts.ts:20:12
at new Promise ()
at readFilePromise (/Users/Felipe/add-tradingview-alerts-tool/src/add-tradingview-alerts.ts:17:12)
at /Users/Felipe/add-tradingview-alerts-tool/src/add-tradingview-alerts.ts:241:37
at step (/Users/Felipe/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:33:23)
at Object.next (/Users/Felipe/add-tradingview-alerts-tool/lib/add-tradingview-alerts.js:14:53) {
code: 'ERR_INVALID_ARG_TYPE'
}
^Cnpm ERR! code ELIFECYCLE
npm ERR! errno 130
npm ERR! @alleyway/[email protected] add-alerts: tsc && node lib/add-tradingview-alerts.js
npm ERR! Exit status 130
npm ERR!
npm ERR! Failed at the @alleyway/[email protected] add-alerts script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Felipe/.npm/_logs/2021-02-06T16_09_40_080Z-debug.log
Felipe@MacBook-Pro add-tradingview-alerts-tool %
Hello guy,
I try this:
alert:
condition:
primaryLeft: MA Emperor insiliconot
primaryRight: P
secondary: Croisement vers le haut
tertiaryLeft: MA Emperor insiliconot
tertiaryRight: MA 2
quaternaryLeft:
quaternaryRight:
Step Primary is ok
Step Secondary is ok
Step tertiaryLeft is ok
Step tertiaryRight is ko
This last one can't be change, it could not open the dropdown menu.
Error:
ERROR waiting for XPath (//div[contains(@Class, 'tv-alert-dialog__group-item--right ')]/div[contains(@Class, 'js-number-input')]/input)[1] failed: timeout 3000ms exceeded
I am using the version 1.8.0.
Kind regards,
Thomas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.