Trading View Message

Hi,

I’m setting up an automated strategy using TradingView alerts with a webhook to Fyers.

I want to use the {{strategy.position_size}} variable in my alert message to determine the direction:

  • Positive → Long (Buy)

  • Negative → Short (Sell)

However, the Fyers webhook integration doesn’t natively support this variable. I need a solution that:

  1. Interprets the position_size value from the TradingView alert.

  2. Executes the corresponding Buy/Sell order on Fyers.

  3. Includes a safety check to ensure a Sell is only placed if a Buy was previously executed (and vice versa).

Could you please guide me on how to implement this?
Thank you.

I aggree. its best to allow custom payload, may with simple webhook. so in cases like above, we want 1 webhook to accept only few params as input , other params like quantity, exhange etc we can make it fix inside the automation.

currently simple webhook doesnt allow any extra param ( not in query nor as payload) , and doesnt allow any output values as well

Tradingview webhook, has fixed set of template, any custom other info required can not be passed.

why not allow custom payload ( like position_size) with simple webhook, and allow user to map the payload with variables to use downstream.