Announcement

Collapse
No announcement yet.

How to ID the color of the last bar and its background

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

  • How to ID the color of the last bar and its background

    Hi,

    Is there a way to reference the last color of a bar or its background?

    i.e.,

    if(ColorLastBar == Color.red) ...

    or,

    if(ColorLastBarsBackground == Color.red) ...

    Of course the "ColorLastBar..." variables I used here are fictitious, just used to clarify my question.

    Thanks

  • #2
    waynecd
    There currently isn't a function that will do that. You will need to keep track of the bar and background colors using your own variables and code logic
    Alex


    Originally posted by waynecd
    Hi,

    Is there a way to reference the last color of a bar or its background?

    i.e.,

    if(ColorLastBar == Color.red) ...

    or,

    if(ColorLastBarsBackground == Color.red) ...

    Of course the "ColorLastBar..." variables I used here are fictitious, just used to clarify my question.

    Thanks

    Comment


    • #3
      I found this (though not for bar color, just background):

      getChartBG()

      attached is a sample script

      Comment


      • #4
        waynecd
        getChartBG() retrieves the color of the background of the chart and not of the background of the bar [ie the one set through setBarBgColor()] which is what I believe you were asking about
        Alex


        Originally posted by waynecd
        I found this (though not for bar color, just background):

        getChartBG()

        attached is a sample script

        Comment


        • #5
          Hi Alex,

          Yes, I asked about the candle color.
          Just thought others reading this might find it useful since since that function is not found in the "eSignal EFS Developer's Reference".

          Cheers

          Comment


          • #6
            waynecd
            FWIW it is included in the EFS KnowledgeBase which is the most current developer's reference and that should be used as the primary resource
            Alex


            Originally posted by waynecd
            Hi Alex,

            Yes, I asked about the candle color.
            Just thought others reading this might find it useful since since that function is not found in the "eSignal EFS Developer's Reference".

            Cheers

            Comment

            Working...
            X