NexusFi: Find Your Edge


Home Menu

 





indicator to email screen shot image


Discussion in NinjaTrader

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




 
Search this Thread

indicator to email screen shot image

  #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

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
 
  #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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts