TvWebhookReceiver

=== 1.) Start ngok reverse proxy ========================================

TvWebhookReceiver running
Not photographed yet — this page is waiting on a capture.

TvWebhookReceiver

=== 1.) Start ngok reverse proxy ========================================

Open PowerShell (Administrator)

cd "D:\Projects\TvWebhookReceiver"

ngrok http 127.0.0.1:5000

=== 2.) Start TbWebHookReceiver ==========================================

Open PowerShell (Administrator)

cd "D:\Projects\TvWebhookReceiver"

dotnet run

=== 3.) Test POST with Invoke-RestMethod =================================

cd "D:\Projects\TvWebhookReceiver"

Open PowerShell (Administrator)

$uri = "https://chevronwise-megaphonically-jule.ngrok-free.dev/tv"
$body = '{"secret":"CHANGE_ME_TO_SOMETHING_LONG","ticker":"AAPL","price":150}'
Invoke-RestMethod -Method Post -Uri $uri -ContentType "application/json" -Body $body

=== 4.) Add WEBHOOK script to TradingView ================================

//@version=6
indicator("BASIC_WEBHOOK_TEST", overlay=true)

if barstate.isconfirmed
    json = '{"secret":"Test","ticker":"' + syminfo.ticker + '","exchange":"' + syminfo.prefix + '","timeframe":"' + timeframe.period + '","price":' + str.tostring(close) + ',"time":' + str.tostring(time) + ',"strategy":"BASIC_WEBHOOK_TEST"}'
    alert(json, alert.freq_once_per_bar_close)

=== 5.) Add Alert to trigger WEBHOOK script

After adding the script:

Click Alerts

Set:

Condition: BASIC_WEBHOOK_TEST → Any alert() function call

Webhook URL: https://chevronwise-megaphonically-jule.ngrok-free.dev/tv

Frequency: Once per bar close

Important: Script alerts only fire when Pine executes alert() So you must wait for a bar to close on a live chart.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.