Inserting an input into an alert_messsge
Posted: Sat Jan 21, 2023 10:37 pm
Hi,
I have created an input for Long and Short 3Commas bot ID numbers. I would like to insert the bot ID number (which is "LongBotID") into the following (as indicated):
if (closeLongPosition)
strategy.close(id = 'Long Entry', alert_message = "{\n\"action\": \"close_at_market_price\",\n\"message_type\": \"bot\",\n\"bot_id\": LongBotID,\n\"email_token\": \"ac0cy3bb-582e-35b9-a771-9aa3c1342j434\",\n\"delay_seconds\": 0\n}")
The above doesn't work and I can't work out how to do it. Appreciate any assistance with this (if it is possible).
Kind regards,
Alistair
I have created an input for Long and Short 3Commas bot ID numbers. I would like to insert the bot ID number (which is "LongBotID") into the following (as indicated):
if (closeLongPosition)
strategy.close(id = 'Long Entry', alert_message = "{\n\"action\": \"close_at_market_price\",\n\"message_type\": \"bot\",\n\"bot_id\": LongBotID,\n\"email_token\": \"ac0cy3bb-582e-35b9-a771-9aa3c1342j434\",\n\"delay_seconds\": 0\n}")
The above doesn't work and I can't work out how to do it. Appreciate any assistance with this (if it is possible).
Kind regards,
Alistair