NexusFi: Find Your Edge


Home Menu

 





indicator to email screen shot image


Discussion in NinjaTrader

Updated
    1. trending_up 2,812 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 visounds 
Sydney, Australia
 
Experience: Intermediate
Platform: NinjaTrader
Trading: CL,GC,6E
Posts: 8 since Jun 2010
Thanks Given: 0
Thanks Received: 0

Hi guys,

I have an indicator that emails me when a paint bar occurs with entry prices and targets. I want to add to this the function of adding the screen shot of that specific chart.

Since;

image>Email

is a standard function on the charts I suspect there is a code that can be added to my indicator for this.

any ideas?


Andrew


Started this thread Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 dmh24 
Denver, CO
 
Experience: Advanced
Platform: SierraChart
Broker: Optimus, Rithmic
Trading: ES
Posts: 67 since Sep 2011
Thanks Given: 6
Thanks Received: 34

I dont think there are any existing functions in NinjaScript to do this for you, but its fairly easy to do with some .NET classes in System.Drawing:

Rectangle - create a rectangle with the X/Y width / height of what you want to capture - you can use ChartControl.Width, height, and location (x/y point) to create a rectangle of the whole chart.

Bitmap - create a new bitmap the size of your rectangle with an appropriate pixel format.

Graphics - use an instance of this on your bitmap w/ Graphics.FromImage(). Then you can use CopyFromScreen() with your given rectangle to do the actual screenshot.

Then you can use your bitmaps instance Bitmap.Save with a desired file type like JPEG, to save it to a stream.

Once you have it saved, you'll have to email it. Unfortunately I dont know how to send a mail off the top of my head. I'm assuming System.Net.Mail.SmtpClient would make short work of this.


Reply With Quote




Last Updated on October 6, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts