Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'm trying to add SendMail() to my strat for when it enters, moves my stop to breakeven and closes. Since I'm using CalculateOnBarClose = false, I can't use the regular SendMail() code as it produces a zillion emails. Does anyone know of a work around? It's the usual easter egg hunt on the Ninja forum and I think I'm currently moving in reverse. Also, if it matters, I'm using a breakeven, a trail and an exit. I'd like to get an email when the first of those is filled.
Thanks,
Dave
Can you help answer these questions from other members on NexusFi?
I'm off to work now but wanted to thank you for your quick reply. This looks very promising. Question, though. Do I need to insert this code with each condition or can I just post it anywhere under the respective overrides? For example:
It looks good.
I use in this example a variable _ordefilled which needs to de defined and correctly initialized, but you have the idea I think: send the email only if the order is really filled. Maybe the good place for this is in OnOrderUpdate(), with something like:
Okay, now I'm getting confused. I'm one year older today and closer to senility so please take it easy on me. Do I use both or should I just use the code in your last post and then add something to variables and Initialize()?
It's up to you, 2 choices:
- send the email when the order is sent, or
- send the email when he order is filled
So not both, unless you want two emails, one went the order is sent, an other one when it's filled (so you'll need another boolean variable).
I think I have an example, I was doing similar stuff but with sending sms, I'll try to put it in this thread later.
When the order is filled is probably better. If you have an example, I'd greatly appreciate it as I'm getting a little lost on this one. Oh, and thanks for the birthday wishes. As you can probably imagine, my head currently hurts.