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 helpwanted, Today, 03:06 AM
        1 response
        10 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        8 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X