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 cmoran13, 04-16-2026, 01:02 PM
            0 responses
            70 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            41 views
            0 likes
            Last Post PaulMohn  
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            166 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            101 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            164 views
            2 likes
            Last Post CaptainJack  
            Working...
            X