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 love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        45 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Working...
        X