NexusFi: Find Your Edge


Home Menu

 





How do I get strategy to send me ONE email?


Discussion in NinjaTrader

Updated
    1. trending_up 4,040 views
    2. thumb_up 6 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 lblanks 
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
Posts: 51 since Jun 2011
Thanks Given: 126
Thanks Received: 15

I want my strategy to send me ONE email when the trade is filled? I realize this needs to be done with some type of variable. Does anyone have an example?


Started this thread Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
3 thanks
  #2 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,715 since May 2010
Thanks Given: 203
Thanks Received: 2,689


lblanks View Post
I want my strategy to send me ONE email when the trade is filled? I realize this needs to be done with some type of variable. Does anyone have an example?

You woudl declare a bool variable like:

private bool sentMail = false;

then in your code where you send mail you would do something like:

if (!sentMail)
{
SendMail("sendAddress", "fromAddress", "subject", "message");
sentMail = true;
}


Follow me on X Reply With Quote
Thanked by:
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,577


And then reset the bool to false when you are flat, probably.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 lblanks 
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
Posts: 51 since Jun 2011
Thanks Given: 126
Thanks Received: 15


NinjaTrader View Post
You woudl declare a bool variable like:

private bool sentMail = false;

then in your code where you send mail you would do something like:

if (!sentMail)
{
SendMail("sendAddress", "fromAddress", "subject", "message");
sentMail = true;
}

Thanks for the help that works perfectly


Started this thread Reply With Quote
  #5 (permalink)
 lblanks 
South Carolina
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: 6E, ES
Posts: 51 since Jun 2011
Thanks Given: 126
Thanks Received: 15


Big Mike View Post
And then reset the bool to false when you are flat, probably.

Mike

Thanks. Very effective


Started this thread Reply With Quote
Thanked by:




Last Updated on June 23, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts