Announcement

Collapse
No announcement yet.

Possible to color bars based on Close prices?

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

  • Possible to color bars based on Close prices?

    When viewing the OHLC bar's I noticed they are colored Green or Red based on whether or not the bar closes up or down, I thought they were supposed to be considered "up" or "down" based on the Close of the current bar versus the Close of the previous bar. Strangely, Volume has that option - but price does not. I'm seeing this while viewing Forex data. Is it possible to change the colors to be based on the Close?

  • #2
    fx5678
    AFAIK the traditional method is to color the "Up" or "Down" price bars based on the Last <> Open.
    Regardless the attached efs will color the bars based on the Close being above or below the prior Close.
    You can modify the colors through Edit Studies
    Alex
    Attached Files

    Comment


    • #3
      Re: Possible to color bars based on Close prices?

      Originally posted by fx5678
      When viewing the OHLC bar's I noticed they are colored Green or Red based on whether or not the bar closes up or down, I thought they were supposed to be considered "up" or "down" based on the Close of the current bar versus the Close of the previous bar. Strangely, Volume has that option - but price does not. I'm seeing this while viewing Forex data. Is it possible to change the colors to be based on the Close?
      I don't know what the standard is for OHLC bar coloring, but certainly coloring based on open-last (vs close-last) for candles is correct.

      Your comment about volume color though triggered a pet peeve I have with eSignal. Yes, there is the option to color volume bars based on the previous volume bar close (does anybody use that??) but what is missing, is coloring volume bars based on the relative price closes.

      If price gaps UP, but then moves down at all, the volume bar will show RED, even though current price is higher than the previous close. That is not right - it should be green!

      If price continues to fade until it is less than the previous close, then a red volume bar is correct. But as long as current (last) price is above the previous close, the volume bar should be green. I thought this was a Standard - its not even an option in eSignal.

      I'm no javascript programmer, but I'll make an attempt to modify Alex's EFS to fix volume color. Then, if I can integrate that with the EFS Jay did to display Nasdaq volume, I'll have two key indicators fixed!

      Regards
      shaeffer

      Comment


      • #4
        shaeffer
        I believe I have already written an efs that colors the volume bars based on relative closes. Run a Search using alexis as User Name (set it to Match partial name) and volume as the keyword
        Alex

        Comment


        • #5
          Thanks Alex

          I found it and will give it a try, first standalone, then integrating into the Nasdaq volume efs.

          I'm curious...... on the surface, your volume EFS does essentially the same as the standard volume indicator. But does the application of an efs vs a near identical standard indicator (study) result in any difference in computer resource usage? If I replaced all my standard indicators (say 50 charts with 5 indicators/chart) with the equivalent efs's with only minor tweaks, would my computer load differ much? Or does the application of any efs cause some whole new, more resource intensive, part of the eSignal program to run?

          Thanks again
          shaeffer

          Comment


          • #6
            First let me say Alex, that you have provided endless valuable help to me and others, so the following comments are directed towards eSignal, not you.

            I found your volume.efs file (the earlier one before colors could be set via edit studies), and it does not do what I wanted. As far as I can see, the option is built in to set volume bar color based on price changes, or based on volume bar height changes. Fine - a dual purpose efs.

            But I wanted to set volume bar color based on current (Last) price compared to previous close. In this efs, it appears that last is being compared to open. So I tried substituting close(-1) in place of open(0), in the Source==Price section of the efs, and colors from the Source==Volume section started appearing! Maybe the solution is simple, but I've given up trying to figure it out. Or maybe I'm working with the wrong efs.

            Two hours wasted today trying to figure this out (after two hours last week reviewing that javascript lesson) . eSignal, is your program for traders, or for programmers? Do you think traders have the time to learn javascript? I've no idea how many manhours have been spent internally to develop efs's, but do you imagine this is a tool that the average trader can pick up after even a few hours of study - the answer is no. So if your intent was to provide a tool to help progammers develop indicators, you have succeeded, but don't delude youself that the average trader can/will use this. Your cost/benefit ratio must be way out of whack considering how few of your users will ever use EFS's.

            What really burns me about this, aside from the hours wasted, is that all I'm trying to do is get volume bar colors that conform to the Standard.

            Maybe I'll be able to figure it out tomorrow, after I cool down.

            shaeffer

            Comment


            • #7
              shaeffer
              Try the attached efs that was created using only the Formula Wizard.
              Alex
              Attached Files

              Comment


              • #8
                shaeffer
                FWIW here is the thread that has the formula I told you I had written. I found it using the Search settings I suggested.
                Alex

                Comment


                • #9
                  Originally posted by Alexis C. Montenegro
                  shaeffer
                  FWIW here is the thread that has the formula I told you I had written. I found it using the Search settings I suggested.
                  Alex
                  My humble thanks, Alex,

                  I used the efs from your link above, and with a small change it did what I was after.

                  I did actually follow your search settings to find volume.efs (your note to cassy, 8/16/04). The efs you mention above is from a few months earlier - I didn't scroll back that far.

                  In any case, I should have figured it out. The color I thought yesterday was coming from the Price==Source section in volume.efs was actually the default color appearing. In both volume.efs and volumema.efs, by the third condition (2nd 'else' statement), all possibilities have not been addressed, hence the default color appearing. The small change I mentioned above was to change the 2nd 'else' condition to else if (close() == close(-1), then the default color will never appear and all volume bar colors are based on price closes.

                  I should have figured that out yesterday. So, particularly after my snooty note, I appreciate your directing me to volumema.efs. It works well, and I now know what I missed yesterday.

                  Regards
                  shaeffer

                  Comment

                  Working...
                  X