Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Send Mail with some account info

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

    Send Mail with some account info

    I've set the share "Mail" service and it works. Now I'm re-coding an old Algo from NT7 which had this line for email:

    Code:
    SendMail ("[email protected]", "[email protected]", "SERVER DOWN ! ", Position.MarketPosition.ToString() + " " + Position.Quantity.ToString()+" at " +Position.AvgPrice.ToString("0.00"));
    But I'm reading in the manual that the send mail service contains 3 arguments. Is there any way to send it equally as NT7 did it?

    Thanks

    #2
    Hello pstrusi,

    SendMail(string to, string subject, string text)

    Below is a link to the help guide.


    Unfortunately, the from address cannot be specified, as this will be the email address used for the share service.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response, Chelsea, What I'm really looking for is not the "from address", What I want is to put in the body of email, certain account info, as I put above.
      Can be done?

      Comment


        #4
        Hello pstrusi,

        The string text is the is body of the email.

        You can send any info that is text that you want.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          So if you wanted to send certain account info like Position, Quantity, Price...etc, Do they have this info converted previously to text in order to put it in the body or can I put it directly" ?

          Nevermind, silly me. Obviously, this info is converted to text. Sorry

          Comment


            #6
            Hello pstrusi,

            Yes. Your suggested code in post # 1 does this.

            You just need to use the proper overload parameters (i.e. remove the from address parameter).
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            63 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            40 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            21 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            23 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            51 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X