Announcement

Collapse
No announcement yet.

Printing Chart Colors

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printing Chart Colors

    Can someone please help me with a Chart printing problem.

    I like to use charts with dark colored backgrounds and light indicator lines, but as you can imagine this is not a good format for printing. So can someone tell me how to write my efs so that I can change the colors going to the printer, preferably changing the background to white and white lines to black. This needs to happen without reloading the efs as I am plotting data read from GlobalValues generated by other charts.

    I know the background color change is possible because it is a feature in Woodies CCI code, but of course it is locked up and I can't view it.

    Thanks in advance.

  • #2
    Hello Snickers,

    Changing the EFS colors and chart background color through the EFS requires a reload of the formula. You won't be able to write code that sends a different color to the printer that is different than what the chart is displaying at the time of the print.

    To set up a user defined parameter to change the chart background color you can use this code snippet below.

    PHP Code:
    function preMain() {
        
    setPriceStudy(true);
        
    setShowCursorLabel(false);
        
        var 
    fp1 = new FunctionParameter("cBgColor"FunctionParameter.COLOR);
            
    fp1.setName("Chart Bg Color");
            
    fp1.setDefault(Color.green);
    }

    var 
    bEdit true;

    function 
    main(cBgColor) {
        if (
    bEdit == true) {
            
    setChartBG(cBgColor);
            
    bEdit false;
        }
        
        return;

    Here's a couple more ideas for you to try.
    1) Run two separate charts with your formula where one has a white background that you use for printing.
    2) Publish an image of the chart to your local disk and open that image in some photo or image editing software and use a fill color function to change the background color to white. Then print the modified image file.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      JasonK,

      Thanks for your post, but I know for a fact that it can be done on the background color, becase like i said Woodie's CCI EFS is doing it. That is it changes the background color only when printing, the background display never changes. This function is set at the start so no reloading is required.

      I have already tried doubling the charts and unfortunately this causes data delays as you might expect.

      Sure hope someone can tell me how. This is definitely slowing me down.

      Comment


      • #4
        Hello Snickers,

        I know for certain that we do not have any EFS extensions to give a user control over changing colors only for a print job. I don't believe it would be possible as EFS has no direct communication with the printer. I know we had some problems with previous versions not printing chart colors properly. Perhaps that is the problem your experiencing. What version are you currently using? I just tried printing the woodies CCI formula when the chart was displaying a green background and that's the color that printed (versoin 7.7 build 679).
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Jason,

          Sorry, I was wrong. It was described to me differently and even the instructions implied that the color change was only for printing. I should have tried it myself before I made such a statement. It does the same thing you described, adding an option.

          Well that's a bummer, but thanks for setting me straight

          Comment


          • #6
            charts

            With new charts at woodies cci club you can print charts in black and white...edit studies click print charts ..hope this helps...i have not done this but the person who makes my charts said it's there

            woodie

            Comment


            • #7
              Snickers
              Here is a workaround that should allow you to change some colors without reloading the efs (be it through Edit Studies or a Reload).
              In your efs add the following statement

              if(isReplayMode()){
              //here add the commands to change your current colors to the ones required for printing
              }


              Then when you want to print the chart right click it and select Tools->Enter Bar Replay Mode. That will set the chart to Bar Replay mode and the Cursor to Jump to a Bar pointer. The colors will not change yet but as soon as you click the last bar on the chart (or any other bar for that matter) the colors should switch to the ones you have set for Replay Mode. To revert back to the original color scheme close the Bar Replay Mode.
              Alex

              Comment


              • #8
                Color question

                Hello,
                I've been trying to find a reference that lists the color choices available to chose from for efs studies.
                Can you direct me?
                Thanks a lot

                Comment


                • #9
                  TraderJen
                  You can find them in the EFS KnowledgeBase under EFS Functions Reference
                  Alex

                  Comment

                  Working...
                  X