Category Other  Published on 03/08/2023

Receive Alerts via Webhook Example

An update for this algorithm is currently pending moderation. Please revisit this page shortly to access the algorithm's latest version.
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's avatar
Waxy

Joined on 12.05.2015

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: SampleServerForWebhooks.algo
  • Rating: 5
  • Installs: 359
Comments
Log in to add a comment.
EV
Eventured · 5 months ago

ignore my previous comment, I missed the purpose of ngrok when first reading the description.

SU
Sunaj · 7 months ago

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 👍

Waxy's avatar
Waxy · 7 months ago

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.

SU
Sunaj · 7 months ago

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