• 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

Email when StopLoss is Triggered in NT8

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

    Email when StopLoss is Triggered in NT8

    I have this code working in NT7 which it will email when stoploss is triggered,


    protected override void OnExecution(IExecution execution)
    {
    if (execution.Name == "Stop loss")
    {
    SendMail("xxxxxx, "xxxxxxx", "Alert, "Stop Loss Triggered");
    Print("Stop Loss Triggered");
    }



    How do I get it working in NT8 and as the OnExecution code is different in NT8?

    #2
    Hello trdmark,

    The process to send an email has changed slightly in NT8, you now need to configure a Default Share Service (your email account) first and then you can use the send mail function.
    We have some information on configuring share services here:
    https://ninjatrader.com/support/help...gShareServices

    Once you have configured, and successfully tested the service you can use SendMail:
    https://ninjatrader.com/support/help...htsub=SendMail

    OnExecution has been renamed to OnExecutionUpdate. You can find a sample of the syntax in the help guide here:
    https://ninjatrader.com/support/help...ub=onexecution

    Common items like OnExecution are also listed in the code-breaking changes guide, this can help to know what code to use in place of NT7 syntax:
    https://ninjatrader.com/support/help...ng_changes.htm


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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Cyanez, Today, 05:05 PM
    0 responses
    2 views
    0 likes
    Last Post Cyanez
    by Cyanez
     
    Started by Polo Trader, Today, 03:28 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by Mykro, Today, 03:26 PM
    2 responses
    9 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Polo Trader, Today, 03:14 PM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_Tyler  
    Started by kantkant2, Today, 03:20 PM
    3 responses
    15 views
    0 likes
    Last Post kantkant2  
    Working...
    X