Announcement

Collapse
No announcement yet.

Cursor label and study title colors

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cursor label and study title colors

    I'm trying to change the foreground and background colors of an item in the global cursor window. How do I do that? I couldn't find a function called setCursorLabelFGColor() or setCursorLabelBGColor().

    Also, the stochastics study shows its title in blue. I like that. How do I do this for another study? I didn't find a function called setStudyTitleColor().

    TIA,

    Ayman

  • #2
    Ayman
    It depends on which item you are referring to. The background colors of the studies depends on the color you set in the efs through either setDefaultBarFgColor() or setBarFgColor(), the background color of the OHLC values is controlled through the Study Properties (right click-> Edit Studies) and the background colors of all the other items depends on the Text color selected in the Properties of the chart (right click-> Properties). The latter also controls the text color of the study title of an efs
    Alex

    Comment


    • #3
      Hi, Alexis.
      I wasn't referring to chart or candle colors. I was referring to two things:
      1. The colors of fields in the global cursor window. How do I control them via EFS?
      2. The color of the study title. The chart properties set the color as black, but my stochastics study has its title in blue. How did that happen? I'd like to be able to use EFS to set the study title color.

      Thanks,
      Ayman

      Comment


      • #4
        Ayman
        Please read my reply again as it relates to the various items of a Cursor Window (note that the Global Cursor Window simply replicates the settings of a chart's Cursor Window)
        Only the Basic Studies color the title in blue. As indicated in my prior reply the title of an efs study is instead controlled by the Text color set in Properties
        Alex

        Comment


        • #5
          Originally posted by Alexis C. Montenegro
          Only the Basic Studies color the title in blue
          Aha! That's the explanation I was looking for. Thanks.

          Ayman

          Comment


          • #6
            Want to set custom study title text same as setDefaultBarFgColor

            Is there a way to set the study title text color on a per study basis? I.e. within the EFS code for the study itself? Doing the right-click->properties->text mentioned in this thread affects the study title text color of all custom EFS studies on the chart as well as the chart axis text. Don't want that. I want to have my custom EFS study title color be the same as what I've specified for its setDefaultBarFgColor(), so I can tell who is who when I've merged it with another study.

            Comment


            • #7
              Nevermind.
              Solution is:
              right-click->Edit Studies...
              Select my custom study, then use the Override/Color setting. This sets my BarFgColor and study title text to the same color.
              Don't need to do anything in the EFS code.

              Comment


              • #8
                Originally posted by xcritter

                Solution is:
                right-click->Edit Studies...
                Select my custom study, then use the Override/Color setting. This sets my BarFgColor and study title text to the same color.
                Don't need to do anything in the EFS code.
                That method works for a 1 line study. I have an efs that draws 2 lines: red and blue. Also, I'm coloring the background based on values of the study. The problem is the study Title params are in displayed in black and the rest of the chart is black background. If I override the color as above my red and blue lines both change to the color selected even though I have explicit color assigment with setDefaultBarFgColor and/or setBarFgColor. And setting the Text color in chart properties works for everything else except this efs.

                Are there any other ways to control the color of the study Title?

                and a second question: is there a way to select which params are displayed? It seems it is show all or nothing.

                Comment


                • #9
                  pj909

                  The problem is the study Title params are in displayed in black and the rest of the chart is black background.
                  The color of the chart description and study titles can be changed in Edit Studies using the color assigned to the background of the OHLC values of the Cursor window
                  As an example see the enclosed screenshot where the titles of the chart and studies are visible even on a black background

                  Are there any other ways to control the color of the study Title?
                  Not that I can think of at this time.

                  is there a way to select which params are displayed? It seems it is show all or nothing
                  That is correct. The setShowTitleParameters() function will display all the parameters or none
                  Alex




                  Originally posted by pj909
                  That method works for a 1 line study. I have an efs that draws 2 lines: red and blue. Also, I'm coloring the background based on values of the study. The problem is the study Title params are in displayed in black and the rest of the chart is black background. If I override the color as above my red and blue lines both change to the color selected even though I have explicit color assigment with setDefaultBarFgColor and/or setBarFgColor. And setting the Text color in chart properties works for everything else except this efs.

                  Are there any other ways to control the color of the study Title?

                  and a second question: is there a way to select which params are displayed? It seems it is show all or nothing.

                  Comment


                  • #10
                    pj909

                    Are there any other ways to control the color of the study Title?
                    Not that I know of

                    is there a way to select which params are displayed? It seems it is show all or nothing.
                    If you want to display only some of the parameters you could use setStudyTitle().
                    What you would do is use that function inside your main function [executing it at BARSTATE_ALLBARS or inside a bInit routine so that it executes once only on when loading or reloading the formula] and then together with the study title you would return the values of the parameters you want displayed eg
                    setStudyTitle("myTitle"+"("+myParameter1+", "+myParameter2+...+")")
                    Alex

                    Comment

                    Working...
                    X