Announcement

Collapse
No announcement yet.

MA Price Bar Color Change

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

  • MA Price Bar Color Change

    I have this formula and I'm trying to add the code so the price bars will change color- blue above MA and red below. I can't get it to work with this coding:

    this in your preMain()

    setColorPriceBars(true);

    and place this at the end of your Main(), but before your return value

    setPriceBarColor(Color.RGB(128,128,128))
    if (getSeries(xMA) < close()) setPriceBarColor(Color.RGB(0,0,255))
    if (getSeries(xMA) > close()) setPriceBarColor(Color.RGB(255,0,0))

    Anyone?

    Here is the efs:
    Attached Files

  • #2
    Re: MA Price Bar Color Change

    bugscoe
    In the formula you posted replace each instance of setBarFgColor(...) with setPriceBarColor(...)
    Then in the preMain function add the following two lines of code
    setColorPriceBar(true);
    setDefaultPriceBarColor(...);//insert the color you want as default usually Color.black

    Alex


    Originally posted by bugscoe
    I have this formula and I'm trying to add the code so the price bars will change color- blue above MA and red below. I can't get it to work with this coding:

    this in your preMain()

    setColorPriceBars(true);

    and place this at the end of your Main(), but before your return value

    setPriceBarColor(Color.RGB(128,128,128))
    if (getSeries(xMA) < close()) setPriceBarColor(Color.RGB(0,0,255))
    if (getSeries(xMA) > close()) setPriceBarColor(Color.RGB(255,0,0))

    Anyone?

    Here is the efs:

    Comment


    • #3
      Perfect. Thanks so much!

      Comment


      • #4
        bugscoe
        My pleasure
        Alex


        Originally posted by bugscoe
        Perfect. Thanks so much!

        Comment

        Working...
        X