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

sending email using SmtpClient from OnBarUpdate() function

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

    sending email using SmtpClient from OnBarUpdate() function

    Can one craft and send an email from OnBarUpdate() function using something similar to the below?


    I am trying to setup SMTP server on IIS for sending mails. The SMTP server is intended to be used by the ASP.NET code in C#. I was previously using gmail smtp wherein i provided the smtp.gmail.co...



    Thanks

    #2
    Most likely, yes, of course, if you have the programming skills to do so ... it's just C#.

    'NinjaScript' is just a marketing name for the class library made available by the .NET program called NinjaTrader.exe built and marketed by the company NinjaTrader, LLC.

    Technically, you could write your .NET programs and assemblies (for ex, NinjaScript 'plugins', such as Indicators, Strategies, and Addons) in any .NET language, such as VB or C# or F# -- it's all just .NET byte-code in the end -- but C# is the only officially supported language by NinjaTrader.

    Comment


      #3
      You can use the sendmail function in Ninjatrader. You would have to set up your email account in the Options -> General -> Share services tab.


      Example code:
      Code:
      SendMail("[email protected]", "Trade Alert", "Buy");

      Comment


        #4
        Hello andrei.reiand,

        Thank you for the post.

        Here is the help guide page to SendMail.



        I will be available to answer any additional questions.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        0 responses
        5 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        47 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X