Announcement

Collapse
No announcement yet.

Changing Background of Chart in retrospect

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

  • Changing Background of Chart in retrospect

    hi fellow coders,

    id like to know whether it is possible to change the chart background (background of a specific bar/candle that is!) AFTER a number of bars has passed.

    What I want to do:

    Condition1 = true // for the first time
    Condition1 = true // second time
    Condition1 = true // third time

    Now go back to where Condition1 is true for the first time and change the bar background color there - and the following bars to until Condition1 is false.

    I managed to paint the background for bar4 and the following bars but not for the first three ones! The function SetBarBgColor (I think thats the name) does not take arguments - so you cannot pass -2 or something to it. Is there a way to achieve what I'd like to do ?

    BTW it is possible for return values of indicators (nonprice pane) to go back and change the BG there.... is it really impossible to do the same in the price chart ?? (candlestick charts)

    your help very much appreciated, as always

    Thanx

    EZ-T

  • #2
    EZ-T
    You need to use the setBar() function.
    Click here for the syntax required by this function
    Alex

    Comment


    • #3
      EZ-T

      BTW it is possible for return values of indicators (nonprice pane) to go back and change the BG there.... is it really impossible to do the same in the price chart ??

      If you are asking if a non price study can also change the background in the price window then that is not possible.
      Alex

      Comment


      • #4
        thanx alexis!

        Geez....Once again my fault! In fact I tried setBar() but obviously I screwed up. I guess it was too late and my brains stopped working.

        Apart from my abysmal first try I even misinterpreted the function being only available in a Nonprice Pane, well....

        After I rebooted my head next morning and reading your response, Alexis ,I was able to fix my code. Big thanx again,

        EZ-T

        Comment

        Working...
        X