Alert for atomate trading
Posted: Wed Nov 02, 2022 11:57 am
To all members, have a nice day
who sees my problem?
I want alerts for a bot in 3commas but when i save the script i get the error: Compilation error, Line 37: no viable alternative at character ´{¨
Line 37 is the first alert.
// Enter positions
if buyCondition
strategy.entry(id="Long", direction=strategy.long)
alert({ "message_type": "bot", "bot_id": 9990121, "email_token": "4479d3b1-1b4d-4fd6-****************f2d", "delay_seconds": 0}), alert.freq_once_per_bar_close
if buyCondition[1]
buyPrice := open
// Exit positions
if sellCondition or stopCondition
strategy.close(id="Long", comment="Exit" + (stopCondition ? "SL=true" : ""))
buyPrice := na
alert({ "action": "close_at_market_price", "message_type": "bot", "bot_id": 9990121, "email_token": "4479d3b1-1b4d-4fd6-af9e-42d8954f1f2d", "delay_seconds": 0}), alert.freq_once_per_bar_close
// Draw pretty colors
plot(buyPrice, color=color.lime, style=plot.style_linebr)
plot(stopPrice, color=color.red, style=plot.style_linebr, offset=-1)
plot(ma1, color=color.blue)
plot(ma2, color=color.orange)
who sees my problem?
I want alerts for a bot in 3commas but when i save the script i get the error: Compilation error, Line 37: no viable alternative at character ´{¨
Line 37 is the first alert.
// Enter positions
if buyCondition
strategy.entry(id="Long", direction=strategy.long)
alert({ "message_type": "bot", "bot_id": 9990121, "email_token": "4479d3b1-1b4d-4fd6-****************f2d", "delay_seconds": 0}), alert.freq_once_per_bar_close
if buyCondition[1]
buyPrice := open
// Exit positions
if sellCondition or stopCondition
strategy.close(id="Long", comment="Exit" + (stopCondition ? "SL=true" : ""))
buyPrice := na
alert({ "action": "close_at_market_price", "message_type": "bot", "bot_id": 9990121, "email_token": "4479d3b1-1b4d-4fd6-af9e-42d8954f1f2d", "delay_seconds": 0}), alert.freq_once_per_bar_close
// Draw pretty colors
plot(buyPrice, color=color.lime, style=plot.style_linebr)
plot(stopPrice, color=color.red, style=plot.style_linebr, offset=-1)
plot(ma1, color=color.blue)
plot(ma2, color=color.orange)