title: Tradingview and Pine Script: code question
body: <p>I have zero experience with coding. I am using a publicly available strategy (Pine Script v2) on TradingView and I want to connect it to my 3Commas bot using TradingView's custom signals.</p>
  <p>What I need to do is to add a comment to the line of code that calls for long or short positions so that when the alert is triggered, it communicates with my bot.</p>
  <p>I followed an online tutorial and the docs from 3Commas. The comment arguments below is where I get stuck: I keep receiving the &quot;<strong>no viable alternative at character '{'</strong>&quot; error. They would be on lines 7 and 11 below:</p>
  <pre><code>//============ signal Generator ==================================//
  period = input('720')
  ch1 = security(tickerid, period, open)
  ch2 = security(tickerid, period, close)
  longCondition = crossover(security(tickerid, period, close),security(tickerid, period, open))
  if (longCondition)
      strategy.entry(&quot;BUY&quot;, strategy.long, comment=&quot;{\n\&quot;message_type\&quot;: \&quot;bot\&quot;,\n\&quot;bot_id\&quot;: xxxxxxx,\n\&quot;email_token\&quot;: \&quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\&quot;,\n\&quot;delay_seconds\&quot;: 0\n}&quot;)
      
  shortCondition = crossunder(security(tickerid, period, close),security(tickerid, period, open))
  if (shortCondition)
      strategy.entry(&quot;SELL&quot;, strategy.short, comment=&quot;{\n\&quot;message_type\&quot;: \&quot;bot\&quot;,\n\&quot;bot_id\&quot;: xxxxxxx,\n\&quot;email_token\&quot;: \&quot;xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\&quot;,\n\&quot;delay_seconds\&quot;: 0,\n\&quot;action\&quot;: \&quot;close_at_market_price\&quot;\n}&quot;)
  </code></pre>
  <p>I would appreciate any help in fixing the code. Thank you in advance.</p>