Announcement

Collapse
No announcement yet.

Color code / background color

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

  • Color code / background color

    Hi

    I´m searching the color code for "seagreen" for using in EFS.
    Besides that, I wonder how to change the background color for certain time cycles, for instance premarket, regular session, afterhours.

    Thanks in advance for your help,
    Swingie

  • #2
    Swingie,

    With efs you can specify an RGB value where it calls for a Color.
    So instead of using Color.red for a parameter, you could also do Color.RGB(255,0,0). If you play with it enough you should be able to get the color you want.

    If you want to change color due to time, you will have to use the getValue("Time") or getValue("RawTime") functions and use a conditional to check for specific times. For example for getValue time you would use the getHours() and getMinutes() functions like this:

    [code]

    vTime = getValue("Time");

    if (vTime.getHours() == 7 && vTime.getMinutes() == 30){ // Is it 7:30?
    setBarBgColor(Color.RGD(0,200,150); // Change BG color
    }
    [code]
    Garth

    Comment


    • #3
      Thank you very much for your help

      Comment


      • #4
        No Problem. Just be aware that getValue("Time") has some signifigant overhead associated with it. I wouldn't run too many formulas doing this opperation at the same time, or you could run into some CPU overhead issues.

        "RawTime" was created to combat some of these issues, and its scope will be expanded soon, but it is not well documented at this time.
        Garth

        Comment


        • #5
          In one of the upcoming releases we'll have

          Code:
          getYear(...)
          getMonth(...)
          getDay(...)
          getHour(...)
          getMinute(...)
          getSecond(...)
          This way you won't need to do all that / and % stuff with RawTime.?????

          m.
          Matt Gundersen

          Comment

          Working...
          X