Announcement

Collapse
No announcement yet.

changing wick and outline colors

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

  • changing wick and outline colors

    Can someone please help me with this, I'm trying to change the wick color and body outline (if possible) only, and leave the fill color to the default colors.

    I'm not sure how to edit this line

    setPriceBarColor(Color, [WickColor], [bThinWick], [bHollow]);

    so as to show a green wick when my strategy is long and red when short?

    My problem is with the first entry (Color) how do I keep my default of green when up and red when down?

  • #2
    morpheus
    You would have to set each specific condition. For example

    if(Strategy.isLong()==true && close()>open())
    setPriceBarColor(Color.green,Color.green,true,fals e)

    else if(Strategy.isLong()==true && close()<open())
    setPriceBarColor(Color.red,Color.green,true,false)

    else if(Stratgey.isLong()==true && close()==open())
    setPriceBarColor(Color.blue,Color.green,true,false )

    else if(Strategy.isShort()==true && close()>open())
    setPriceBarColor(Color.green,Color.red,true,false)

    and so on from here for whatever other condition you may have including the ones when you are neither Long nor Short. (ie Strategy.isInTrade()==false)
    Alex
    Last edited by ACM; 08-14-2003, 07:35 AM.

    Comment


    • #3
      thanks, I think I got it, on a slightly different note, if I have the following condition

      if (
      Strategy.isLong())
      setBarBgColor(Color.RGB(233,255,233));

      it works great when the condition is true. I don't have setcomputeonclose on and my strategy is on close of THISBAR, so I get intrabar signals. However when the condition is not true intrabar I have to reload the EFS to clear the BarBgColor, so is there a way to remove BarBgColor if Strategy.isInTrade == false?

      Comment


      • #4
        setBarBgColor(Color.RGB(23,255,233);

        if (
        Strategy.isLong())
        setBarBgColor(Color.RGB(233,255,233));

        will set the bar color and then change it if needed.

        Comment


        • #5
          got it, I needed to add another )

          setBarBgColor(Color.RGB(23,255,233))



          thanks

          Comment

          Working...
          X