NexusFi: Find Your Edge


Home Menu

 





Chart Picture through EL?


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
 
westsider's Avatar
 westsider 
St Louis, MO
 
Experience: Intermediate
Platform: Ninjatrader TOS Jigsaw
Broker: Ninjatrader
Trading: MES
Posts: 114 since Jun 2011
Thanks Given: 55
Thanks Received: 127

Hello,
Does anyone know how to take a screen shot of a chart through easy language? It can be done if you buy an indicator but I like to do things myself.
Thanks
Westsider


Follow me on X Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Datafeed for Atas
Platforms and Indicators
Trump Media to sell instant access to market-moving soci …
Traders Hideout
My Rant with AMP Futures
Trading Reviews and Vendors
No book, only a stair: journaling fills where price move …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643


westsider,

it will likely be along the lines of using the command line to execute a macro or call the program that does the screenshot. The downside with the command line is that the commands are applied to the chart that currently has the focus (basically the one you last clicked into). This can lead to unwanted results.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #4 (permalink)
 
westsider's Avatar
 westsider 
St Louis, MO
 
Experience: Intermediate
Platform: Ninjatrader TOS Jigsaw
Broker: Ninjatrader
Trading: MES
Posts: 114 since Jun 2011
Thanks Given: 55
Thanks Received: 127

Thanks for your input ABCTG . Got me thinking. Since there is no way to do this I wrote app in Visual Studio. You would have to replace your email address and mail client then compile it and finally call the exe from within your EL code. Henry @ Multicharts wrote an elegant function to call apps or DLL's and its called

ShellExecute.pla sample

So I use that function to call my Exe file when I want to take a screenshot and email it to me from within TS.

Westsider

 
Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Mail;

using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Drawing.Imaging;
using System.Reflection;
using System.Windows.Forms;


namespace MailScreenShot
{
    class Program
    {
        static void Main(string[] args)
        {
            // Capture the screen to a stream
            Bitmap memoryImage = new Bitmap(SystemInformation.VirtualScreen.Width,
                                SystemInformation.VirtualScreen.Height,
                                PixelFormat.Format64bppArgb);       
            Graphics memoryGraphics = Graphics.FromImage(memoryImage);
            memoryGraphics.CopyFromScreen(SystemInformation.VirtualScreen.X,
                                       SystemInformation.VirtualScreen.Y,
                                       0,
                                       0,
                                       SystemInformation.VirtualScreen.Size,
                                       CopyPixelOperation.SourceCopy);
            System.IO.Stream stream = new System.IO.MemoryStream();
            memoryImage.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
            stream.Position = 0;

            // send mail
            string to = "[email protected]";       //  Replace with your email address
            string from = "[email protected]";   //  Replace with your email address
            MailMessage message = new MailMessage(from, to);  
            message.Subject = "Tradestation";
            message.Body = @"Trade Alert";
            Attachment attach = new Attachment(stream, "MyImage.Jpeg");
            message.Attachments.Add(attach);
            SmtpClient client = new SmtpClient("Your Mail Client");   // Replace with your email client
            // Credentials are necessary if the server requires the client 
            // to authenticate before it will send e-mail on the client's behalf.
            client.UseDefaultCredentials = true;
            try
            {
                client.Send(message);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception caught in CreateTestMessage2(): {0}",
                            ex.ToString());
            }
            return;
        }
    }
}


Follow me on X Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:




Last Updated on May 12, 2016


© 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