Announcement

Collapse
No announcement yet.

Bull and Bear candles - Close at high or low

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

  • Bull and Bear candles - Close at high or low

    I would like to be able to have a candle change to a predefined color based on if it closed at its high or low.

    For example, if on a 5min chart, there is an up candle that closes at its high (the candle shows no upper wick) that candle highlights, or changes color, or there is an arrow below it, etc. Some sort of signal that is easily seen. And visa versa for a down candle closing at its low.

    Is there such a efs out there now that does this?

    Thanks!
    Greg

  • #2
    solution

    In your preMain() setup function, you must tell eSignal to enable bar coloring. You can optionally specify a default price bar color at this point as well (if not specified, the default is black).

    Code:
      setColorPriceBars(true);
      setDefaultPriceBarColor(Color.black);
    In your main() function, you can place a call to set the current price bar color:

    Code:
        setPriceBarColor(Color.red);
    Or any price bar color in the series:

    Code:
      setPriceBarColor(Color.green, -5);
    If your syntax is right but you don't see the effect when you reload the formula, try reloading the chart by switching the display from candle->bar->candle.

    Hope that helps,

    -David

    Comment

    Working...
    X