NexusFi: Find Your Edge


Home Menu

 





Chart Picture through EL?


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,895 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?
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
TradingView Deploys AI to Monitor SEC Filings in Real Ti …
TradingView
Netherlands & Germany Surge as World Cup Field Narro …
Prediction Markets & Event Contracts
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
Orban at 29pct as Hungary Votes Tomorrow -- McIlroy Surg …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642


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