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 with screenshot of current chart

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

    sending email with screenshot of current chart

    Hello,
    my intention is to send a email with the current chart of the strategy. Is there a possiblity to get the chart by file or to get the current form?
    I tried this but I have no chance to get the current form informations:

    Rectangle bounds = this.Bounds;

    using(Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
    {
    using(Graphics g = Graphics.FromImage(bitmap))
    {

    g.CopyFromScreen(new Point( bounds.Left,bounds.Top), Point.Empty, bounds.Size);

    using (MemoryStream ms = new MemoryStream())
    {
    bitmap.Save(ms, ImageFormat.Jpeg);
    bytes = ms.ToArray();
    }
    }
    Well - currently I'm not able to get the bounds of the current window of the strategy.

    #2
    Hello mpower,

    There is no supported technique for this, but I would take a look at OregonSun's contribution here:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      great - that's what I was looking for. Thanks

      Comment


        #4
        Hello mpower or ryan or anybody else
        the link above does not work
        i am looking for the same answer
        anybody knows how to make a screenshot and send by mail?

        Comment


          #5
          Originally posted by yeshe View Post
          Hello mpower or ryan or anybody else
          the link above does not work
          i am looking for the same answer
          anybody knows how to make a screenshot and send by mail?
          click on link then search for 'OregonSun'

          Comment


            #6
            Hello yeshe,

            The user submitted apps have moved to the User App Share section of the NinjaTrader Ecosystem site.
            Below is a public link to this script.
            This strategy includes one function SendMailChart, which emails a strategy’s active chart to a specified email account. The strategy includes sample strategy logic to test the function, suggest running it in simulation mode on a 1 or 2 minute chart. Many emails may be produced, so cancel after waiting a few bars. The function uses […]
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello SweetYear7,

              This would be outside of what is supported by NinjaTrader Support.

              NinjaScript is written in C#. You might be able to use unsupported C# code to interface with your custom system.

              This thread will remain open for any community members that would like to assist.

              You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hello Wesker321,

                From my understanding the unsupported screenshot code is taking a picture of the screen using the boundaries of the chart. I do not think it will be possible to take a screenshot of something that is not displayed on the screen.

                However, this thread will remain open for any community members that would like to assist.

                You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Fran888, 02-16-2024, 10:48 AM
                3 responses
                43 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
                7 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  
                Started by Mindset, 05-06-2023, 09:03 PM
                10 responses
                265 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Working...
                X