我正在使用这个策略:
if (非na(vrsi))
if (ta.crossover(vrsi, overSold) and ta.crossover(source, lower))
strategy.entry("RSI_BB_L", strategy.long, comment="RSI_BB_L")
alert("BUY alert", alert.freq_once_per_bar)
else
if (ta.crossunder(vrsi, overBought) and ta.crossunder(source, upper))
strategy.close(id = "RSI_BB_L", comment="close")
alert("SELL alert", alert.freq_once_per_bar)我需要将此字符串添加到购买提醒消息中:
{ "message_type":“机器人”,"bot_id":6517352,"email_token":"d106a1fc-6b41-410c-9532-38253f7273c5","delay_seconds":0}
当我尝试这样做时:
alert("{"message_type":“机器人”,"bot_id":6517352,"email_token":"d106a1fc-6b41-410c-9532-38253f7273c5","delay_seconds":0}",alert.freq_once_per_bar)
我得到:不匹配的输入'message_type‘应为')’
任何建议都是很棒的:)
发布于 2021-11-16 06:36:52
使用'‘来转义"“。
alert('{ "message_type": "bot", "bot_id": 6517352, "email_token": "d106a1fc-6b41-410c-9532-38253f7273c5", "delay_seconds": 0 }')https://stackoverflow.com/questions/69983571
复制相似问题