Announcement

Collapse
No announcement yet.

MA Color help

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

  • MA Color help

    Does any know how to add code to following formula so that when price is above the MA it is blue and below it is red?
    Attached Files

  • #2
    i wasnt sure whether you meant youwanted to color the price bars or the MA itself so if you want to color the price bars, place 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))




    if you wanted to color the MA, then you dont need anything in your preMain(), and just place this immediately before your return value in Main()

    setPriceBarColor(Color.RGB(128,128,128))
    if (getSeries(xMA) < close()) setDefaultBarFgColor(Color.RGB(0,0,255), 0)
    if (getSeries(xMA) > close()) setDefaultBarFgColor(Color.RGB(255,0,0),0)
    Last edited by kalzenith; 08-22-2008, 11:57 AM.

    Comment


    • #3
      Perfect! Thank you so much!

      Greg

      Comment


      • #4
        youre very welcome

        Comment

        Working...
        X