Announcement

Collapse
No announcement yet.

setPriceBarColor issue

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

  • setPriceBarColor issue

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("day");
    }

    function main() {
    if(getDay()%2 == 1)
    setPriceBarColor(Color.RGB(0,0,255));

    if(getDay()%2 == 0)
    setPriceBarColor(Color.RGB(255,0,0));
    return null;
    }

    draws the price bars red on the even numbered days of the month and blue on the odd numbered days of the month.

    However, and this happens with another efs I have with setPriceBarColor, when the chart and efs load, all bars are blue. Until I adjust the width of the chart, the red bars do not show up.

    Is this a bug, or am I doing something else wrong?

  • #2
    Re: Reply to post 'setPriceBarColor issue'

    David
    A similar behavior was happening to me too with another formula and Dion
    suggested I add the following in premain which fixed it.

    setColorPriceBars(true);

    That aside your formula seems to work fine here, so maybe the above
    suggestion may not be relevant.
    Alex

    Comment


    • #3
      problem fixed, thx Alex and Dion

      Comment

      Working...
      X