NexusFi: Find Your Edge


Home Menu

 





How do I get strategy to send me ONE email?


Discussion in NinjaTrader

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




 
Search this Thread

How do I get strategy to send me ONE email?

  #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

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
  #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,714 since May 2010
Thanks Given: 203
Thanks Received: 2,686


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 Twitter 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,463 since Jun 2009
Thanks Given: 33,236
Thanks Received: 101,661


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 Twitter 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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts