Announcement

Collapse
No announcement yet.

setBarBgColor on partial chart screen

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

  • setBarBgColor on partial chart screen

    I was wondering if it is possible to use the setBarBgColor command in such a way that only a small section at the bottom of the chart window will display the dynamic colors?

    In essence, I would like to implement a crossover study (without the need for a study pane), that would color only a limited section of the chart background (~1/10 of the height and all the way accross) based on the conditional statements.

    I hope the attached image gives a better clue...

    Many thanks!
    Attached Files
    --FOREX--

  • #2
    Can't be done with setBarBgColor() as far as I know but it could be done using drawTextRelative(). Something like:

    PHP Code:

        
    if ( close(0)>close(-10) ) {
            
    nColor Color.green;
        }
        else {
            
    nColor Color.red;
        }
        
        
    drawTextRelative05"  "nColornColorText.RELATIVETOBOTTOM Text.FRAME "Teletype"20nBarCounter ); 
    Chris

    Comment


    • #3
      Cris,

      Works like a charm!!! Many thanks and Happy Holidays!
      --FOREX--

      Comment

      Working...
      X