Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Screenshot of my ChartWindow

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

    Screenshot of my ChartWindow

    Hi,

    I want to be able to take a screenshot of my chart from within my indicator. I have been able to get it partially correct by using a handle to GetForeGroundWindow(), creating a rect, etc and this works.

    The part that I am stuck on is that if my chart is not the foreground window, or not the active window my screenshot is of some other window.

    If tried to use the function SetForeGroundWindow() but it relies on knowing your own window handle. Ive tried to get the handle using this.Handle but that doesnt compile.

    Could anybody tell me how to set the chart window from which my indicator is running to be the foreground window? or maybe some other method of getting the screenshot?

    Thanks.

    #2
    This might give you some ideas




    Originally posted by dontpanic View Post
    Hi,

    I want to be able to take a screenshot of my chart from within my indicator. I have been able to get it partially correct by using a handle to GetForeGroundWindow(), creating a rect, etc and this works.

    The part that I am stuck on is that if my chart is not the foreground window, or not the active window my screenshot is of some other window.

    If tried to use the function SetForeGroundWindow() but it relies on knowing your own window handle. Ive tried to get the handle using this.Handle but that doesnt compile.

    Could anybody tell me how to set the chart window from which my indicator is running to be the foreground window? or maybe some other method of getting the screenshot?

    Thanks.

    Comment


      #3
      Hello donotpanic,

      Thank you for your post.

      The link Sledge provides offers a possible solution to this matter. This is unsupported territory as there is no supported method within NinjaScript to take a screenshot. You will be using general C# programming to achieve this.

      Please let me know if I may be of assistance.
      Last edited by NinjaTrader_PatrickH; 08-24-2013, 02:25 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      562 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      325 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      547 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X