'How to change subject in emails sent by alerts
Any idea how to change the email subject in an alert sent via email? The bot I'm using requires the the TV buy / sell strategy notification in the subject of the email. I have the 'Send email to SMS' checked off.
Changing the message of the body seems simple enough using alert_message in the strategy.entry/close. Just need to change the subject. Subject keeps defaulting to the "Alert: : alert() function calls only".
I'm using the below code for the alerts. Spacing is a little off, but you get the idea. I'm trying to get a certain subject for the sell trigger and another for the buy. Would appreciate any assistance. Thanks!
if isTimeGood and isEven
strategy.entry(id="Long", direction=strategy.long, when=isEven, alert_message=alert_message_open)
alert("TestingBuyMessage")
if isTimeGood and isOdd
strategy.close(id="Long", when=isOdd, alert_message=alert_message_close)
alert("TestingSellMessage")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
