Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 BillieGeorge, Today, 04:05 AM
    0 responses
    4 views
    0 likes
    Last Post BillieGeorge  
    Started by Triple_M, Yesterday, 07:48 AM
    8 responses
    48 views
    0 likes
    Last Post Triple_M  
    Started by OllieFeraher, 07-21-2023, 10:01 AM
    5 responses
    71 views
    0 likes
    Last Post EvergreenGain  
    Started by Aundreooper, Today, 01:57 AM
    0 responses
    9 views
    0 likes
    Last Post Aundreooper  
    Started by guardiabldbla, Today, 01:22 AM
    0 responses
    7 views
    0 likes
    Last Post guardiabldbla  
    Working...
    X