Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

setting email alert upon order execution with custom email body

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

    setting email alert upon order execution with custom email body

    Hello Experts,


    Is it possible to set an Email alert upon order execution that should contain some details such as:


    1) Instrument for which order placed
    2) Price
    3) Order details (long/short, etc)
    4) Some additional custom static text



    Thanks

    #2
    Hello andrei.reiand,

    Yes, this is possible. In NT8 you can configure Share Services which can be used to send emails. From the user interface, you can configure alerts which send emails based on conditions but an execution would not specifically be one of those events. You could submit an order and send an email at the same time, but to have an email sent specifically for an execution would require NinjaScript. The items you listed would all be available while using NinjaScript. From the user interface, the following strings are available: https://i.imgur.com/VvuUAg8.png

    From NinjaScript, you could see the following guide:



    Based on your requirement, you would likely need to create an addon or an indicator which uses the addon methods to "watch" the account for executions. Once an execution is seen, you could have it send an email. Here is a sample of observing an account: https://ninjatrader.com/support/help...ount_class.htm

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

    Comment


      #3
      Understood ... also seen:





      where:


      args[1] = A string representing the email "Subject" field
      args[0] = A string representing the email "To" field,


      Is there a way to pass a short email body as well as part of a "Share" email service?
      I see these examples:
      // sending a screen shot to Twitter
      Share("Twitter","Check out this setup!",@"C:\MyImages\chart03.PNG");

      // using "args" as the Mail "To" and "Subject" parameters
      Share("Gmail","Test Message",newobject[]{"[email protected]", "Test Subject Line" });

      // using "args" as the StockTwit "Sentiment" parameter
      Share("StockTwits","Test Message",newobject[]{ShareServices.StockTwits.Sentiment.Bearish});


      but no body option available.




      Also, can one run:


      Share("gmail","test", new object[]{ "[email protected]", "Test Subject Line" });



      from within the: OnBarUpdate() function ... expecting the email message to be passed over?


      Thanks
      Last edited by andrei.reiand; 08-14-2018, 04:20 PM.

      Comment


        #4
        Hello andrei.reiand,

        Thank you for the reply.

        The email body, in this case, would be the "Message". Because the Share method is used for multiple services, "message" was chosen instead of Body.

        The Args you fill in would supply the subject and To field for the email share service specifically.

        You can use this type of syntax in OnBarUpdate but the share services are limited to being used in real-time to avoid sending a large number of messages for historical reloads.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by f.saeidi, Today, 01:32 PM
        2 responses
        4 views
        0 likes
        Last Post f.saeidi  
        Started by alifarahani, 04-19-2024, 09:40 AM
        9 responses
        55 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by mmckinnm, Today, 01:34 PM
        3 responses
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        3 responses
        60 views
        0 likes
        Last Post NinjaTrader_SeanH  
        Started by traderqz, Today, 12:06 AM
        9 responses
        16 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X