Description
Here's an example of how we can set up a bot act as a server to receive signals locally with Webhooks Notifications (i.e., TradingView, Zapier or others)
You might have to set up ports, but I recommend using Ngrok to save you the trouble. (Link ngrok)
Once you've downloaded it you can type on cmd:
ngrok.exe http http://localhost:3000 --host-header=rewrite
This would give you a link you can use for the webhook, here's a sample message you could send using Postman:
curl --location '<your ngrok link>' \
--header 'Content-Type: text/plain; charset=utf-8' \
--data ‘EURUSD Buy Signal’
Then you could place an order based on this message.
You should have only one instance of this bot running.
Please let me know if you have questions.
Support my work on ko-fi to create more tools:
https://ko-fi.com/waxycodes
Waxy
Joined on 12.05.2015
- Distribution: Free
- Language: C#
- Trading platform: cTrader Automate
- File name: SampleServerForWebhooks.algo
- Rating: 5
- Installs: 535
- Modified: 03/08/2023 21:41
Comments
ignore my previous comment, I missed the purpose of ngrok when first reading the description.
Thanks a lot for fast feedback on this - things are building now (might be worth putting the SDK requirements in description above?). Coffee is on me via https://ko-fi.com/waxycodes 👍
I'm not sure, I think it sounds like you're using the default compiler in cTrader, would you please try with downloading .net 6 and setting it up as your default.
Hi Waxy, this looks like promising demo of a sample server to receive notifications with. However, after installing my attempts at building the cBot is met with following error message:
"Build failed (1 error): Error CSI 566: Error reading resource 'SampleServerForwebh00ks.Properties_ Resources.resources' — 'Could not find the resource “System.Resources.NetStandard.SR.resources” among the resources "" embedded in the assembly "System.Resources.NetStandard.StrongName", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name:'
No idea how to start debugging since I'm new to the platform, any hints to be had? Your time is appreciated.
Thanks, Sunaj
This cBot is even better https://www.reddit.com/r/cTraderGuru/comments/1g0etby/how_to_copy_by_alerts_signals_from_tradingview_to/