• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Send email with every trade

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Send email with every trade

    Hello,

    I need that my strategy sends an email when every trade is completed. How can I do it?

    Thanks in advance and regards.

    #2
    Hello,

    Thank you for the question.

    You could use the SendMail() method to send the email which there is an example of here: http://www.ninjatrader.com/support/h...htsub=sendmail

    For catching filled orders you could use the OnExecution overload or something like the following:

    Code:
    protected override void OnExecution(IExecution execution)
    {
         if (execution.Order != null && execution.Order.OrderState == OrderState.Filled)
         {
               //SendMail() with your parameters
         }
    }
    http://www.ninjatrader.com/support/h...ub=onExecution

    I look forward to being of further assistance .
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Jurase, Today, 06:47 PM
    2 responses
    5 views
    0 likes
    Last Post Jurase
    by Jurase
     
    Started by GTBrooks, Today, 05:53 PM
    0 responses
    1 view
    0 likes
    Last Post GTBrooks  
    Started by jeronymite, Today, 04:50 PM
    0 responses
    5 views
    0 likes
    Last Post jeronymite  
    Started by daigo1, Today, 04:41 PM
    0 responses
    14 views
    0 likes
    Last Post daigo1
    by daigo1
     
    Started by Harrylwd4, Today, 03:15 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X