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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      164 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      319 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      246 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      350 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      179 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X