Back

SMS and Email messages

I was using Tradier, but as it turns out, they don't have access to buy or sell the EFT fund I want to trade. So, as a work around, I decided I'll use QuantConnect to perform the technical analysis, and I'll do the trading manually.

To help me in this effort, I wrote a simple little function to notify me via email and SMS. From what I understand, the algorithm must be running in "Live" mode to send emails and sms messages. To test it, I'm sending one email and one SMS message when the algorithm initializes. But, I'm not receiving any SMS or email messages.

Here's the little function I wrote to send the SMS and email messages.

public void SendMessage(string msg_body, string msg_subject, string email_address, string cell_number) {
if (sendEmail) {
Notify.Email( email_address, msg_subject, msg_body, "" );
}

if (sendSMS) {
Notify.Sms( cell_number, msg_body);
}
}


Does anyone have any ideas on why this isn't working?
Update Backtest








P.S. I ran the algo using "live" mode and "paper trading"
0

Hey Mike! Sorry about that you found a bug in the system :) When sending messages from Initiatlize specifically it was loosing the messages.

We did several tests and sending from the OnData/any other location will work fine. We pushed the bug fix and will deploy it to live in the next week.

A work around for now is simply setting a "first" boolean and only sending the message once in OnData:

bool first = true;

//in on data:
if (first) {
Notify.Sms()
first = false;
}
1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


No problem. Thanks for the workaround! I'll give it a shot.
0

I just wanted to say, the work around worked like a charm. Thanks so much!
0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed