Announcement

Collapse
No announcement yet.

Single PriceBar Color Change at MACDxOver

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

  • Single PriceBar Color Change at MACDxOver

    Hi-

    I'm new to the forum and ask if anyone can help me.

    Am attempting to modify the attached MACDxOver efs in Formula Wizard, to generate a realtime pricebar color change to white when the MACD line crosses the zero-line, and a black colored pricebar when crosses below.

    Each event would be a one-bar occurance, although I would prefer the pricebar body color to be calculated on a tick by tick basis, so as to see the colors alternate between the white or black AND the default pricebar green/red.

    After the event/signal, the default green and red pricebars would resume.

    I would sincerely appreciate anyone looking at my attached study to identify what code changes need to be made.

    Sixcent
    Attached Files

  • #2
    Sixcent
    The attached revision of your efs will paint the price bar in white when the MACD crosses above 0 or in black when it crosses below. In all other conditions it paints the bars in the default green/red (cyan when close=open)
    Alex

    Attached Files

    Comment


    • #3
      Alex-

      Thank you for your quick response to my request for help.

      Your coding is so straightforward and efficient...I have alot to learn.

      I should have clarified that I'm using candlesticks, not pricebars. Don't know if that makes any difference in coding.

      Was hoping the candle painting would be limited to the single event, and not require conditioning 0r "repainting" of the other candles. Is that not possible?

      Again, thank you for stepping in to help.

      Sixcent

      Comment


      • #4
        Sixcent
        You are most welcome and thank you for the compliments.

        I should have clarified that I'm using candlesticks, not pricebars. Don't know if that makes any difference in coding.

        There actually are some extra parameters in setPriceBarColor() that are specific for candlesticks but these parameters are not available in the Formula Wizard and would have to be inserted manually with the Editor.
        Post an image of a chart that you use (without the efs) and I will try to replicate it.

        Was hoping the candle painting would be limited to the single event, and not require conditioning 0r "repainting" of the other candles. Is that not possible?

        Once you paint a price bar even if for a single event you then have to paint them all.
        Alex

        Comment

        Working...
        X