This message indicates that an invalid sentiment
was provided in the request. TradersPost requires that the sentiment
parameter be specified as one of the following values: bullish, bearish, or flat
. For compatibility with TradingView, the values long, short or flat
are also accepted as synonyms for bullish, bearish and flat
respectively. However, it is recommended to use the standard values when you are not using TradingView.
Any other value will be considered invalid and the request will not be processed.
Here is an example using the {{strategy.market_position}}
variable from TradingView to populate the sentiment
field.
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"sentiment": "{{strategy.market_position}}",
}
The variables above are placeholders for the TradingView strategy's order action and market position. The webhook alert message will be replaced by TradingView with the actual values when the alert is triggered:
{
"ticker": "AAPL",
"action": "buy",
"sentiment": "long",
}
Read more about TradingView alert variable values.