Announcement

Collapse
No announcement yet.

Color candle efs issue?

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

  • Color candle efs issue?

    Hello

    I created a simple efs based on these conditions. When price crosses above 9ema & 30 ema and MACD + cross then candle will go green, and the reverse means it goes Red. When these condtions are not ALL true then the candles go white. When all three conditions are satisfied again then the candles will go either green or red depending on the condition ...and then the white candles will turn black.

    Is there a way to choose before hand to have a default that when the conditions are not true that the white candles can be any color you wish and also that the black candles can be any color you wish.

    Please refer to a GOOG chart. the last four candles are white. then 1 green, then 6 red candles, then red candles based on this efs.

    So it seems like when past conditions are partially NOT TRUE then the candles will default to black. And when present conditions are partially TRUE they turn white. How do you change both colors at will. And where would you add the code if it is at all possible.


    Thanks

    Pogman : )

  • #2
    color candle efs here

    Sorry, the efs disappeared.

    Here it is below
    Attached Files

    Comment


    • #3
      Pogman
      What you are seeing happens because you have not defined a [default] color for the price bars when none of the conditions are true so the chart engine defaults the color to white. You have two solutions available to correct this.
      Open the efs with the Editor and add a setDefaultPriceBarColor(Color.black); statement in preMain just below the setColorPriceBars(true) statement.
      If instead you would like to be able to define a default price bar color from within the Formula Wizard then you need to add a Set (this should always be the last one) in which you write a condition that is always true by definition such as for example 1==1. Then in "the following will happen every time" set the color of the price bar to your desired default color
      Alex

      Comment


      • #4
        Hi Alex

        Worked perfectly just as you said. Thanks a milliion.

        Have a great night and wonderful tommorrow.

        Pogman
        ))

        for those that want it here is the attachment below
        Attached Files

        Comment


        • #5
          Pogman
          You are most welcome
          Alex

          Comment

          Working...
          X