Closed adrien44 closed 1 year ago
Hi, At where are you hosting this tool? Render.com?
Yes. I followed your tuto and did exactly the same.
the tradingview strategy is fairly simple. Only long position. Only one trade at a time. Buy then sell and so on.
I see, Have you set up the Disk feature on Render.com? https://tv-connector.gitbook.io/docs/setuup/run-on-cloud-service
Yes
at your web service page of Render.com, go to Manual deploy -> deploy latest commit
Do the strategy name must match something ? My strategy name on trading view was BOT ETH/USD, I gave the alert the same name. I already redeployed the code and even recreated a web service from scratch. (Yesterday)
No, the strategy name does not need to be matched something. Could you try changing your strategy name to "BOT ETHUSD", for example? remove "/" from your strategy name.
I will try that and get back to you. Thanks
Hi Junta, I just re-start a strategy after removing "/" in the name as you suggested. So far, it's working (following correctly the orders from tradingview strategy). I will let it run for a few days and keep you posted on the results.
Hi, 4 days and everything works great. Thanks for your time on this !
I just run into another error probably because i don't use correctly your system. Is it possible to set alert of 2 differents currency on the same service ?
I created an alert for ETH and another for AVAX using the same webhook.
The first trade has been trigger at the same time for my 2 strategies.
It worked great.
But just now, an alert for one of the two strategy was triggered but the order didn't executed. The log indicate that it has been identify as a first order whereas it isn't.
Feb 23 04:00:10 PM Recieved Tradingview strategy alert: { Feb 23 04:00:10 PM exchange: 'dydx', Feb 23 04:00:10 PM strategy: 'Bot AVAXUSD', Feb 23 04:00:10 PM market: 'AVAX_USD', Feb 23 04:00:10 PM size: '99.393', Feb 23 04:00:10 PM reverse: false, Feb 23 04:00:10 PM order: 'sell', Feb 23 04:00:10 PM position: 'flat', Feb 23 04:00:10 PM price: '19.96', Feb 23 04:00:10 PM passphrase: '' Feb 23 04:00:10 PM } Feb 23 04:00:11 PM strategyData { reverse: false, isFirstOrder: 'true' } Feb 23 04:00:11 PM this alert is first and close order, so does not create a new order.
Thanks for your time
Yes, you can set alert of 2 different currencies on the same service.
Do you give a different strategy name to ETH and AVAX bot?
I used the same script name "Bot crypto" but created 2 alerts.
First one name : Bot AVAX with this message :
{ "exchange": "dydx", "strategy": "Bot AVAXUSD", "market": "AVAX_USD", "size": "{{strategy.order.contracts}}", "reverse": false, "order": "{{strategy.order.action}}", "position": "{{strategy.market_position}}", "price": "{{strategy.order.price}}", "passphrase": "" }
Second one : Bot ETH with this message
{ "exchange": "dydx", "strategy": "Bot ETHUSD", "market": "ETH_USD", "size": "{{strategy.order.contracts}}", "reverse": false, "order": "{{strategy.order.action}}", "position": "{{strategy.market_position}}", "price": "{{strategy.order.price}}", "passphrase": "" }
Hmm, I don't get why this happens. Could you try several other alerts triggered with a minimum amount and check whether the same error happens?
Ok, I will test it and get back to you
Hi, Thank a lot for your work.
I tried your web service but I can not make it works perfectly. It follows my alert but sometimes I get this error which break my strategy :
strategyData undefined /app/dist/services/validateAlert.js:5 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } ^ TypeError: Cannot read properties of undefined (reading 'isFirstOrder') at /app/dist/services/validateAlert.js:92:41 at Generator.next (<anonymous>) at fulfilled (/app/dist/services/validateAlert.js:5:58) at processTicksAndRejections (node:internal/process/task_queues:96:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. yarn run v1.22.18 $ tsc && NODE_ENV=production ts-node dist/index.js TV-Connector web server listening on port 10000
Can you help me understand it ? Thanks for your time