Announcement

Collapse
No announcement yet.

Questions about setBarBg(x,y)

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

  • Questions about setBarBg(x,y)

    I am using setBarBg(0,MyPlots) because is looks much nicer, but that blocks completelly the lines behind.

    I tried several methods but the only one that [really] works is to replicate all the plots [not histogramed] after all the histograms are declared.
    The problem is that this method makes an already busy chart even busier [see picture].

    Does anybody have a nicer way to do it?
    Thank you.


    Mihai Buta

  • #2
    Q2 about using setBarBg(x,y)

    I have a second problem when using setBarBg(x,y) that is really annoying.

    In busy times, I skip ticks and return previous values [which are stored in a ReturnArray].
    Of course, I have no way to include the setBarBg comand for those ticks.
    However, apparently, EFS Engine "remembers" that some plots need to be histogramed, but does not know to look at the actual values in the array.

    Consequently, it histograms the entire range [top to bottom].
    Obviously, chart look horrible and need to reload to fix it.

    Is there a way to avoid this problem and make setBarBg "remember" the last used values for x/y?

    Thank you
    Mihai Buta

    Comment


    • #3
      I dont know who and why put these two posts together.
      They are completelly diferent problems.

      But maybe he/she provides and answer.
      Q2 in particular is for internal eSignal people, as it pertains to anomalies of EFS engine.

      Thank you eSignal!
      Last edited by mbuta; 10-14-2008, 06:53 PM.
      Mihai Buta

      Comment


      • #4
        THANK YOU eSignal.

        You deserve every penny you pay you each month!

        This is not first time my questions do not receive ANY qualified answer.

        Sorry I dont have questions about two crossing MA's, or how to color one plot window when crossing above/below zero!

        That proves how much you care about your [existing] customers!
        ZERO!
        Mihai Buta

        Comment


        • #5
          Re: Q2 about using setBarBg(x,y)

          Mihai
          Based on your description it does not seem clear to me what the issue is.
          As suggested in the Posting Guidelines for EFS Studies forum you may want to provide a working sample script that illustrates the problem so that others can try to replicate it and offer a solution
          Alex


          Originally posted by mbuta
          I have a second problem when using setBarBg(x,y) that is really annoying.

          In busy times, I skip ticks and return previous values [which are stored in a ReturnArray].
          Of course, I have no way to include the setBarBg comand for those ticks.
          However, apparently, EFS Engine "remembers" that some plots need to be histogramed, but does not know to look at the actual values in the array.

          Consequently, it histograms the entire range [top to bottom].
          Obviously, chart look horrible and need to reload to fix it.

          Is there a way to avoid this problem and make setBarBg "remember" the last used values for x/y?

          Thank you

          Comment


          • #6
            Here it is:

            var ReturnArray = new Array;

            In main

            if (!RealTime || !BusyTimes) {
            var PlotID=0;
            ReturnArray[PlotID]=Val1;
            var yMin=0; var yMax=ReturnArray[PlotID];
            setBarBgColor(Color.xxx,PlotID,ymin,yMax);
            PlotID++;
            //Repeat for other plots, as needed.

            return ReturnArray;
            }
            else {//RealTime && BusyTimes, obviously
            return ReturnArray //Whatever was already calculated
            //Here is where the problem occurs.
            //It plot from top to bottom, like there was no yMin,yMax
            //Is this normal? Am I doing something wrong?
            }

            Additional info.
            Because it is a real time issue, it is hard to reproduce
            It may, or may not be important, but I determine "BusyTimes" is from how many ticks in 1 sec.
            Finding the "1S" tick in a higher interval is not trivial in eSignal. Most solutions are extremelly time consuming and unpractical.

            I tried many solutions and had the same problem.
            The last solution I use is with a seconds data series, as follows:
            var st1Sec = second(inv("1S"));
            I tested and plots seconds in real time just fine.

            Like I said, I don't know if this is relevant.
            The problem is setBgColor, nothing else.
            Last edited by mbuta; 10-18-2008, 07:45 AM.
            Mihai Buta

            Comment


            • #7
              Mihai
              Based on the code that you posted [which is insufficient to run any meaningful test to try to replicate the issue] the only guess I can make is that you are settting the background color somewhere else in your script.
              If this is not the case then please post a working script that illustrates the issue you are describing
              Alex


              Originally posted by mbuta
              Here it is:

              var ReturnArray = new Array;

              In main

              if (!RealTime || !BusyTimes) {
              var PlotID=0;
              ReturnArray[PlotID]=Val1;
              var yMin=0; var yMax=ReturnArray[PlotID];
              setBarBgColor(Color.xxx,PlotID,ymin,yMax);
              PlotID++;
              //Repeat for other plots, as needed.

              return ReturnArray;
              }
              else {//RealTime && BusyTimes, obviously
              return ReturnArray //Whatever was already calculated
              //Here is where the problem occurs.
              //It plot from top to bottom, like there was no yMin,yMax
              //Is this normal? Am I doing something wrong?
              }

              Additional info.
              Because it is a real time issue, it is hard to reproduce
              It may, or may not be important, but I determine "BusyTimes" is from how many ticks in 1 sec.
              Finding the "1S" tick in a higher interval is not trivial in eSignal. Most solutions are extremelly time consuming and unpractical.

              I tried many solutions and had the same problem.
              The last solution I use is with a seconds data series, as follows:
              var st1Sec = second(inv("1S"));
              I tested and plots seconds in real time just fine.

              Like I said, I don't know if this is relevant.
              The problem is setBgColor, nothing else.

              Comment


              • #8
                I am not surprised.
                The sample code I provided is correct.
                Your inability to reproduce comes from simulating "busy times in real time".

                "Real" code will do you no good, really.
                Who knows the answer to my question, knows it.
                Please see more details in the other post.
                Mihai Buta

                Comment


                • #9
                  Hi Mihai,

                  I think I understand what you are trying to do with the array and have some ideas, but I would only be guessing at this stage. I also read your post in the other thread on the subject.

                  If you would put together a working efs that contains:
                  - the array feature
                  - setBarBg command(s)
                  - a conditional similar to what you use to switch things if there is too much activity.
                  - the efs should be as simple as possible, but should work without modification.

                  I may be able to reproduce what you are seeing and troubleshoot things. It is possible to reproduce "busy times in real time" using Tick Playback, at least in my opinion. FWIW, I picked up the technique from some of Alex's posts several years ago.

                  As far as me writing the efs, I just do not have the time to re-create an efs that will duplicate the logistics you already have. I've done it before (with others), and each time I do, I end up making multiple posts and time-consuming modifications. It usually results in a commitment to myself to not doing it again.
                  Last edited by Guest; 10-22-2008, 06:17 PM.

                  Comment


                  • #10
                    Hi Steve,

                    Thank you for trying to help. I am sure you understand the problem, because it is very simple [as I re-explained it my third post on this problem].

                    setBarBg "loses" the ymin/ymax intra-bar and paints everything, from top to bottom.
                    It should either "remember" last values, or not execute period, unless specifically ordered [on every tick].

                    To me, this is an obvious EFS engine bug, but nobody from eSignal wants to escalate it to development team and fix the problem [nobody from eSignal even bothered to respond to this post].

                    Any "work around" this EFS design problem means additional code at very critical times and defeats the purpose.
                    The function should work properly and now does not.

                    Good to hear from you.
                    Mihai Buta

                    Comment

                    Working...
                    X